尝试下面方法,不知道是否正确。如果可行,告知一下。
http://stackoverflow.com/questions/6439482/how-does-apple-notify-ios-apps-of-refunds-of-in-app-purchases-iap
The strategy is:
a. You save the latest_receipt ("MIIUJgYJKoZIhvc..." base64) field in your DB, associated with the user account.
b. Every day you query apple to validate all the receipts, by sending them the base64 receipt from saved latest_receipt field.
c. In the receipt you check if there is a cancellation_date field. If you find it, treat it according to apple documentation:
https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ReceiptFields.html
Cancellation Date
For a transaction that was canceled by Apple customer support, the time and date of the cancellation.
ASN.1 Field Type 1712
ASN.1 Field Value IA5STRING, interpreted as an RFC 3339 date
JSON Field Name cancellation_date
JSON Field Value string, interpreted as an RFC 3339 date
Treat a canceled receipt the same as if no purchase had ever been made.