Hi.
I have been unable to successfully test a purchase of a non-consumable on IOS when the user has to agree to new Apple Terms and Conditions first during the purchase process. After agreeing to the terms and conditions the user is informed by Apple that the purchase was successfully completed. However, Unity IAP received a Failure with Reason UNKNOWN (in OnPurchaseFailed).
It is not until the app is restarted that the ProcessPurchase function is called and the app acknowledges the
purchase (and removes ads in my case).
To test this I am using a sandbox user with the option checked to Interrupt Purchase. This causes the message to be displayed to the user about reading the Terms and Conditions first before proceeding with the purchase. As soon as the user agrees onPurchaseFailed is called with an UNKNOWN reason.
There does not appear to be a way to force the successful result to be returned to ProcessPurchase without restarting the app.
I have tried the following so far.
-
Recalling Initialize function to force the purchase through without rebooting. Based on other threads this is not recommended and doesn’t appear to work any way.
-
Restarting the scene instead of the whole app. This does call start() and subsequently initialize but does not cause processPurchase to be called.
-
Informing the user that they must restart the app for their purchase to work. This has multiple issues including that I only have an UNKNOWN reason, so I don’t really know whether this was caused by Terms and Conditions. The average user doesn’t know how to restart and app and it is hardly a seamless approach.
-
Using OnDeferredPurchase (in IAP 4.0.0) by registering it as a callback function. I could not get this is trigger in the case of an interruption caused by agreeing to Terms and Conditions. This appears to be for Ask To Buy functionality where a parent approves a child’s request to purchase.
So now I’m at a standstill. Does anyone have any suggestions on how to approach this?
Much appreciated.