App Store Receipt Verification Sandbox Fallback #28
-
I am currently implementing this library but I've got a question about the behaviour of receipt validation/how this library is best used. In the Apple documentation for verifyReceipt (https://developer.apple.com/documentation/appstorereceipts/verifyreceipt) it advises to verify the receipt first against the production endpoint and then to fallback to the sandbox if the status code 21007 is received. The reasons they state for doing this seem to make sense to me, allowing you to use the same server for requests which might be coming from the sandbox and the production environment at the same time. For example, you might have live users sending production receipts at the same time as Apple reviewers are sending sandboxed receipts whilst testing new releases. How do you deal with this when using this library? It seems that just using the 'appstore_sandbox' parameter would make it difficult to continue development on an app once in production. I would be grateful on any thoughts on this. Thanks your your work on this library! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Hi @robert-nash,
UpdateThis is handled in version 0.8.5. 🎉 🎉 |
Beta Was this translation helpful? Give feedback.
Hi @robert-nash,
Thank you for starting this discussion! Would you mind adding a reply with answers to the below questions?
Update
This is handled in version 0.8.5. 🎉 🎉
Now, the Verifier uses the production URI by default. When it encounters the code
21007
, it resends the verification request to the sandbox URI.