I am trying to figure out something with IAP.
In the documents I see that I need to call finish transaction only after the purchased content ha successfully downloaded for the user:
Your application should call finishTransaction: only after it has successfully processed the transaction and unlocked the functionality purchased by the user.
I have this situation -
BUT what if I get an invalid receipt? Should I call finishTransaction ? or simply remove transaction ?
Other scenario is when the download fails, and the user leaves the app for a while. Is there away to cancel the purchase and let him restart it later ?
Thanks
If the validations fails you should call finishsTransaction but not deliver the content and advice the user that something went wrong.
You can't cancel the purchase, once you get a receipt the purchase has been done. You have to code your own mechanism for retrying the download whenever is posible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With