Anyone else having issues with sandbox receipt validations today? (Apr 6)

Hi,


We're finding that Apple's production servers are currently rejecting sandbox purchases with a 21002 error (malformed receipt data) instead of a 21007 error (receipt for test environment). This change is significant because Apple's recommendation is that you send all purchases to the production server first, and if you get the 21007, then redirect them to the sandbox server.


Anybody else having this issue? Anyone know if the recommended strategy has changed? Are we being dumb? 🙂


(PS - Yes, one of my devs has reported it - case number 1084158746).


Paul.

(PS - This was working yesterday!)

Replies

Yep, have the same issue.

Same issue here.


Sending an older sandbox receipt, like from 2016-03-14, yields the expected results: status 21007 from live endpoint, status 0 from sandbox endpoint.

Current receipts we generate from a testflight build however fail like you described.

So maybe it's something with testflight or ios 9.3 in general?


I also asked on twitter if someone else has this problem and got multiple positive replies.

Yep, have the same issue.

Yep, have the same issue.


Is there any possiblity that this problem would occur in live validation servers?

We are also seeing this issue.

Same issue here, Apple please help fix it.

I also have this issue

Hi folks - we have a new theory / observation on this.


Further testing is showing that the production servers are only rejecting sandbox purchases that are using Apple's old receipt format. If you update your app to use the new iOS 7+ receipt format, our tests show that the Production servers *do* give back the appropriate response.


Please let us know if this works for anyone else as well?


Thanks,


Paul.

Some further notes from our developer:


As of iOS 7 apps recommends using the USERs full receipt instead of the transactions receipt. Warnings also outline that the old style getter is deprecated as of iOS 7.0.


Replace:


NSData *receiptData = transaction.transactionReceipt;


with


NSData *receiptData;

if (NSFoundationVersionNumber >= NSFoundationVersionNumber_iOS_7_0)

{

receiptData = [NSData dataWithContentsOfURL:[[NSBundle mainBundle] appStoreReceiptURL]];

}

else

{

receiptData = transaction.transactionReceipt;

}


It appears that the new USER receipt information properly handles redirecting receipts from production to sandbox correctly. However, the OLD style receipts (per transaction) are malformed and get rejected by apple servers.


We have confirmed with the NEW Style receipt for purchasing works successfully with our servers.


---


Note - still looking for external confirmation since well, IAP testing is complicated - want to ensure that folks agree that this appears to be a good work-around.

Paul.

Can the other people please respond ---- are you having trouble with the new receipt ([[NSBundle mainBundle] appStoreReceiptURL]) or just the old, deprecated transaction.transactionReceipt? Further, can you confirm that a transaction.transactionReceipt, sent to an app running iOS6 and operating in the sandbox still generates a 21007 when sent to production for verification? iOS7? iOS8?

Did a few test on my iPhone 6+ running iOS 9.3.1 (13E238). Unfortunately we don't have access to a Device running iOS 6 anymore.


Using XCODE Version 7.3 (7D175) with SDK 9.3 I made a build of our product:

using deployment target 7.1 and new method "appStoreReceiptURL"

-> works


I also made a build of our product:

using deployment target 6.1 and old method "transaction.transactionReceipt"

-> does not work: live url yields 21002


The current version of our product as it is downloaded from the app store also uses the old method, but works as expected.

But that version was made using and older xcode and probably a different sdk version.

yes, same issue...checking now to verify that the new receipt format works...luckily we were already working towards using the new format on our backend servers

If the device is running iOS6 I am pretty sure it will still get a valid transaction.transactionReceipt back from the App Store. If the device is running iOS9.3 and above I am pretty sure it will no longer get a valid transaction.transactionReceipt. What happens in between is anyone's guess, but please contribute to the database by responding. This is what 'deprecated' means in practice.

We just verified that the new receipt bundle format works in this scenario

We have the same issue from 4/6.