问题
Is it anyone else's experience that lately (Nov. 2011) the production URL for validating In App Purchase receipts now works to validate sandbox-generated receipts?
If this can be relied upon its a huge boon for me. It means that the build I submit to Apple can be exactly the same as the build I test with (except for final code signing.)
I'm referring to https://buy.itunes.apple.com/verifyReceipt and https://sandbox.itunes.apple.com/verifyReceipt.
回答1:
I noticed this too, and it is May 2012 so I guess this has been working for awhile.
回答2:
This is no longer working as of 7/26/2012 (just found this post here, trying to figure out when it originally changed). You'll need to go back to the prod -> sandbox failover code, detailed in this tech note - http://developer.apple.com/library/ios/#technotes/tn2259/_index.html
I'm guessing this is because of all the hacking of IAPs going on, and Apple now closing possible loopholes.
回答3:
If you want identical development and life behaviour (plus identical behaviour while your app is being reviewed): Verify the purchase first with the life server, and if it fails with the sandbox server.
来源:https://stackoverflow.com/questions/8186778/in-app-purchase-production-receipt-validation-now-validating-sandbox-purchases