In app purchase is working on the sandbox environment but not working on production environment

In app purchase is working on the sandbox environment but not working on production environment and money got debited from the account.I am not able to find answer to this please help me, app was released 2.5 months back.

Replies

If the user was charged, then one can assume that the app was called to the updatedTransactions delegate method with the SKPaymentTransactionStatePurchased event. As the app is responsible for providing content to the user, for some reason, the app failed to do so. Based on these assumptions, my first guess is that the app attempted to validate the receipt against the wrong (sandbox) verifyReceipt server and the status result 21008 was returned (production receipt sent to sandbox validation server for validation). Such setting works fine in App Review as the app is always reviewed in the sandbox environment. I refer you to Tech Note 2413 In-App Purchase FAQ,


<https://developer.apple.com/library/content/technotes/tn2413/_index.html#//apple_ref/doc/uid/DTS40016228-CH1-RECEIPTURL>


for the proper algorithm to implement for validating an appStoreReceipt. If your process sends the base64 encoded appStoreReceipt to a server for processing, the issue can quickly be fixed with a code change on the server.


If this is not the issue, then there is something else going on once the updatedTransactions delegate method receives the SKPaymentTransactionStatePurchased event.


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI