简体   繁体   中英

iOS 6 In App Purchases - Access completed transaction data without using 'restoreCompletedTransactions' which requires user password

I have an app that uses auto-renewal subscriptions. I need to access completed transactions to determine if a user has a valid subscription or not. I understand that 'restoreCompletedTransactions' will do this for you, however, it annoyingly requires the user to re-enter their iTunes password.

Is there a better way of doing this? Storing the receipt data locally would make no sense, as I would have to check the latest transaction to ensure the expires_date has not been met yet, so I would assume I need to always download the transaction data from Apple directly.

you want to store the receipt data and your sharedsecret if you want to know the user is valid or not you want to post the receipt data an your shared secret to apple server and the apple will respond to the latest receipt and an status of the latest receipt it that status is "0" then the user is valid or else if status is "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. verify this link

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM