I successfully integrated inapp purchase in my application. But I left with a doubt and searching on how to handle that situateion.
When user initiates inapp purchase, provides his authentication details. But due to some reason the app crashed before I handled finishedTransaction method and unlock the features in the app.
Next time when the app is started, how will I know whether the purchase is successful or not?
I successfully integrated inapp purchase in my application. But I left with a doubt
Share
Only
finishTransactiondeletes the transaction frompaymentsQueue. So if the crash occures before that, the payment will stay at the queue, and next time users launches the app, he will be asked to enter his password, and you’ll be able to proceed the purchase again.But if the crash occures after
finishTransactioncall,right before you have provided content, user will notice thta dontent is not provided, so he will be able to press the restore button.Or you could male a flag yourself after finishTransaction and check if you provided what you should had provided.