question

mrmervill avatar image
mrmervill asked

Critical issue in Amazon flow when using the Unity3d Plugin.

Hi! This issue is simmilar to the one discussed in this thread: https://forums.developer.amazon.com/forums/thread.jspa?threadID=538&tstart=0 Except that I am using the Unity3d plugin provided in the Amazon SDK to integrate in-app purchasing. During the Amazon menu flow, just after you purchase an item, Amazon displays a "Thank you for purchasing X" screen, with an close button that returns the user to the Unity environment. If the application process is interrupted before the user closes this Thank-you screen (Ex: Killing the process or shutting off the device). Unity never receives a message about the successful transaction, essentially charging the user but failing to give them items correctly. This is an especially critical bug with consumables, since a record of consumable purchases cannot be retrieved from the Amazon server. Is there a fix for this? Google seems to have failed me in trying to track down a solution. Thanks! Specific steps to reproduce: - Initiate a purchase for a consumable item though the Amazon IAP plugin. - Follow the Amazon IAP flow until you are presented with the Thank-you screen: "Thank you for purchasing X" - Kill the application process or restart the device. - Restart the application. Result: The app does not recognize that a successful transaction has taken place.
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
Hi, In the case of Entitled and Subscription content your app should retrieve the receipt data through the PurchaseUpdateRequest call next time it starts. For Consumable content, the purchase responses are queued up on the Amazon servers for retrieval by the Amazon Apps client. When the Amazon Apps client is capable, it will automatically retrieve the response and send it to the app. Purchase responses are implemented in an asynchronous manner, and your app must be designed to handle them as such or you may run into issues with error use cases.
10 |5000

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

estatic001 avatar image
estatic001 answered
I don't see the PurchaseUpdateRequest method exposed for the unity plugin. I'm looking in AmazonIAP.cs
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 EdBo, It's there.AmazonIAP contains initiatePurchaseUpdatesRequest and the callback is returned to AmazonIAPManager.purchaseUpdatesRequestFailedEvent and AmazonIAPManager.purchaseUpdatesRequestSuccessfulEvent respectively. https://developer.amazon.com/sdk/in-app-purchasing/documentation/unity-iap-entitle.html#Section2
10 |5000

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

td0239 avatar image
td0239 answered
I don't see that at all, in my AmazonIAP class I just have - initiateItemDataRequest - initiatePurchaseRequest - initiateGetUserIdRequest Is this a new feature?
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 td0239, These APIs are old and provided in AmazonIAP.cs class under AmazonIAPAndroid plugin. You should be able to see in MonDevelop while exploring the given plugin. Thanks for writing.
10 |5000

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