Apple In receiving an app purchase in the wrong format

I am checking my receipts against Appstore following Apple's guide. The receipt is retrieved from the package using the following code:

NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL];
NSData *receipt = [NSData dataWithContentsOfURL:receiptURL];
NSString *base64Receipt = [receipt base64EncodedStringWithOptions:0];

      

The encoded receipt is a signed binary as described in the documentation. However, in some strange cases, the get is not the expected binary, but an NSDictionary with the form

{
 pod = 50;
 "purchase-info" = "ewo...";
 signature = "Apdx...";
 "signing-status" = 0;
}

      

When I try to check these receipts against the AppStore, the result is always 21002 ("Data in the receive data property was malformed or missing"). Any ideas on why the receive received from the package is in the wrong format?

+3
ios in-app-purchase


source to share


No one has answered this question yet

Check out similar questions:

8
Base64 encoding error for iOS7 purchase receipt server validation
five
iOS in App Purchase Receipt Confirmation - Sandbox or Product Number?
five
iOS on an app purchase receipt with another itunes user
4
Checking App Status AppReceiptStoreURL 21002
2
Server check. Purchasing an app from an OSX app.
1
Authenticating in-app purchases on the server and newline characters
1
iOS inapp buys receipt extra payload
0
IOS - upon receipt of confirmation of app purchase
0
How do I check the receipt of an in-app purchase?
0
Keep getting {"status": 21002} by checking for Apple In-App Purchase



All Articles
Loading...
X
Show
Funny
Dev
Pics