I have an app which uses In App Purchase 2, however my submission was rejected due to requiring receipt validation.
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.
They link me to the following for validation urls, however when I try hit the urls I get cors errors:
[Error] Preflight response is not successful [Error] XMLHttpRequest cannot load https://sandbox.itunes.apple.com/verifyReceipt due to access control checks. [Error] Failed to load resource: Preflight response is not successful (verifyReceipt, line 0)
This is how I implemented it in the code for now:
//TODO try production first this.inAppPurchase.validator = "https://sandbox.itunes.apple.com/verifyReceipt";
Have I missed something? I am using
Thanks in advance