Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48977

In app purchase 2 receipt validation CORS

$
0
0

Hi there,

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 capacitor 3.2.0

Thanks in advance

Liam

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48977

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>