Hello, I submitted an iOS App where you can purchase the full game (first ten levels are free) and it got rejected with the following message: "We found that your in-app purchase products exhibited one or more bugs when reviewed on iPad running iOS 12.2 on Wi-Fi. When we attempted to purchase the full game, the activity indicator spun indefinitely and no purchase was triggered. When validating receipts on your server, your server needs to be able to handle a production-signed app getting its receipts from Apple’s test environment. The recommended approach is for your production server to always validate receipts against the production App Store first. If validation fails with the error code "Sandbox receipt used in production," you should validate against the test environment instead." So far I don't use receipt validation and it is not mandatory right? Does the message mean the only problem is that I don't handle the failed purchase properly or do I really have to test against production/test environment somehow? If so I wouldn't now how to do that. Or is it enough for me to just hide the spinner and not unlock the full game if the purchase fails? Thanks!
Do purchases work in your testing? Is IAP Initialization succeeding? Are you handling the OnPurchaseFail callback? Also, you MUST follow the steps here, including filling out Business Tax information on iTunes Connect https://docs.unity3d.com/Manual/UnityIAPAppleConfiguration.html
Thanks for the quick reply. Everything works fine on Testflight. I can purchase the full game in Sandbox environment. Actually I was not handling the OnPurchaseFail properly. That's why the spinner stayed. Fixing this is not a problem. I was just wondering if Apple expects me to handle it in a certain way or if it is okay to just hide the spinner and not unlock the full game. "If validation fails with the error code "Sandbox receipt used in production," you should validate against the test environment instead." I wouldn't know how to validate against the test environment.
Please refer to the documentation link earlier for instructions on testing in TestFlight. If purchase fails, you obviously don't want to unlock the product. Could be an invalid credit card or any number of reasons.
Thank you, it looks like I just had to handle the OnPurchaseFailed properly. The app got accepted now.
In my case if someone starts the purchasing process I show a loading spinner in the background. If the purchase failed for any reason I didn't hide the spinner and you could not continue playing. That was the reason why it got rejected.
I am getting the same problem (Apple rejected, stuck with infinite spinner trying to purchase). IOS 12.4, Ipad on wifi. I think I handle the failed purchase properly. In the fake store (in the editor) I get the CodelessIAPStoreListener::OnPurchaseFailed, which calls IAPButton::OnPurchaseFailed which calls my function, which removes the spinner and reports the failure to the user. I tested with test users on the device as well, with the same result. If for example I disable wifi, I will get a failure, and if I enable it, purchase completes. But for some reason Apple review is getting the infinite spinner, which means my code neither gets a fail nor success. What could be causing this? Thanks
We have no control over your app behavior, or the Apple review process. Have you tested on TestFlight with an invalid purchase attempt?