question

MochiBits avatar image
MochiBits asked

Restoring entitlements for a deleted app.

Hi. I'm trying to figure out the best way to restore entitlements, if a person purchased the IAP, then deleted the app, then purchased the IAP again. I don't see how to get back which entitlements were purchased. Perhaps I could use somehow save the requestId or receipt, but that would have been deleted when the app is deleted correct?
iap
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sachin@Amazon avatar image
Sachin@Amazon answered
Entitled content is available anywhere the customer is logged into the Amazon Client. The entitled content does not expire. Customers can purchase entitled content one time. Once purchased, the entitled content is granted to the customer's Amazon account. You should always make call to getPurchaseUpdatesRequest() whenever the app starts. When you re-launch or uninstall and re-install your app, you can check for valid entitlements using the receipts you got from the API. On a successful response, a response object (PurchaseUpdateResponse) is passed which contains the request id, request status, a set of previously purchased receipts, a set of revoked SKUs, and the next offset is applicable. If a user download your app on another device or uninstall and re-install your app, this call is used to sync up this device with all users purchases. You can find more information at the following link: https://developer.amazon.com/sdk/in-app-purchasing/documentation/entitlement.html
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

regularstormy avatar image
regularstormy answered
How can I accomplish the same thing using the Amazon Unity Plugin? AmazonIAP doesn't seem to have an equivalent function. Thanks!!
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Regularstormy, In Unity, the initiatePurchaseUpdatesRequest function is automatically called by the AmazonIAPPlugin.class's implementation of onSDKAvailable. You do not need to take further action to ensure that this method is called aside from implementing the Unity IAP plugin and calling a itemDataRequest in order to register the receiver.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.