youknowone / itunes-iap

Apple iTunes In-app purchase verification tool
http://itunes-iap.readthedocs.io
Other
136 stars 50 forks source link

wrond status #47

Closed vanzhiganov closed 6 years ago

vanzhiganov commented 7 years ago

Library works incorrect sometimes, when I sending request with receipt that was expired, library output status code: {'status': 21007} But, when I make request using curl, then I see ..."status": 21006...

youknowone commented 6 years ago

Did you sent it to corret server? 21006 and 21007 have different meaning:

expires_da

21006 | This  receipt is valid but the subscription has expired. When this status  code is returned to your server, the receipt data is also decoded and  returned as part of the response.Only returned for iOS 6 style transaction receipts for auto-renewable subscriptions.
-- | --
21007 | This  receipt is from the test environment, but it was sent to the production  environment for verification. Send it to the test environment instead.

See: https://developer.apple.com/library/archive/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html#//apple_ref/doc/uid/TP40010573-CH104-SW5