Will ProcessPurchase be called again if app crashes?

Hi - I’m designing our app’s IAP system and looking to harden the payment flow across all edges. We do fulfill the purchase on our server, therefore we need to return PENDING when ProcessPurchase is called. However, since it is possible that our server may not be reachable at that moment I’ll need to cache locally enough information to resume this flow later, even in a later session.

I intend to cached from within ProcessPurchase but before the return statement (obviously). But what if the act of caching causes a crash and so no PurchaseProcessingResult is returned at all. Will ProcessPurchase() be called again in the next session?

Yes. ProcessPurchase will get called again as long as the transaction could not be completed.

1 Like

Thanks Baroni. If I successfully return PENDING, will I also receive more ProcessPurchase calls in future sessions until I eventually return COMPLETE or manually complete it?

Note: I went to refer to the documentation again but some of it is unavailable this morning. I assume it is somehow related to the 2018.2 release. (Example 404: https://docs.unity3d.com/ScriptReference/Purchasing.IStoreListener.html)

That is correct.

Thanks for reporting this. I’ll look into this.