For example, if you buy 2000 gems in the game with an account on iPhone, then you can log in to the same account on iPad and choose to resume buying, and you will also get the same 2000 gems. This function is mainly used for stand-alone games, not for online games.
Users resume transactions to maintain access to the content they have purchased. For example, when they get a new mobile phone, they won't lose any products they bought on the old one. Include some mechanisms in the application that allow users to restore their purchase records, such as the restore purchase button. Restoring the purchase record is to prompt the user to apply for the store's credentials, thus interrupting your application process, so don't automatically restore the purchase record, especially every time the application starts.
In most cases, your application only needs to refresh its receipt and pass the product in the receipt. The refreshed receipt contains the purchase records of the user in this device or other devices in the application. However, some applications need to take another approach for the following reasons:
If you use Apple to host content, Apple will provide some transaction objects for your application to download the content to recover the completed transaction.
If you need to support the version before iOS7, you need to store all the completed transactions, because the previous version did not support the application receipt function.
If your application uses a non-updating subscription, the application is responsible for the recovery process.
A refresh receipt is a copy of the latest receipt in the request store. Refreshing the receipt does not create any new transactions. Although you should avoid multiple refreshes in the same row, multiple refreshes are the same as one refresh. Restoring a completed transaction is to create a new transaction for each completed transaction made by the user, which is essentially to repeat the history of your transaction queue observer. When transactions are resumed, the application maintains its own state to monitor why it wants to resume transactions and how it needs to handle them. Multiple restores will create multiple restored transactions for each completed transaction.
Note: If the user tries to buy the product he has already bought again instead of using the recovery interface in the application, the app store will create a regular transaction instead of resuming the transaction. Users don't need to pay for the product again. Treat these transactions as if they were original transactions. Properly control what users can download again. For example, you can't download a daily newspaper for three years at a time, or you can't download a game level with the size of 10M at a time.