- Home /
Codeless IAP iOS restore error
I have a problem trying to use codeless IAPButton on iOS.
Purchase works OK (sandbox environment) but after uninstall/reinstall then ProcessPurchase/OnPurchaseComplete are called immediately and my purchase is restored inthe same way as on Google Play.
After this my test account password is requested - too late - already restored!!
I have set up a restore button but the code is never called.
Can anyone shed any light on this?
Answer by nathanf-unity · Mar 26, 2017 at 05:54 PM
It sounds like the transaction may not have been finished, which would clear it from the transaction queue.
If your codeless IAP button has the "Consume Purchase" box checked then it will complete the transaction for you.
If "Consume Purchase" is not checked, then the transaction will be left in a Pending state, and it is up to you to call IAPButton.IAPButtonStoreManager.Instance.StoreController.ConfirmPendingPurchase and pass the Product. This will mark the transaction as finished and clear it from the transaction queue.
You would need to do this, for example, if you wanted to send the receipt to your own server to verify the receipt before finishing the transaction. More information can be found in the Unity manual: https://docs.unity3d.com/Manual/UnityIAPProcessingPurchases.html
Your answer
![](https://koobas.hobune.stream/wayback/20220612112714im_/https://answers.unity.com/themes/thub/images/avi.jpg)