question

frismos avatar image
frismos asked

Delivering Reward

HI. We're implementing Amazon MAA in our game and we've got a question about delivering the bundled digital reward to the user. I wonder if we should deliver the reward when the user receives their order (and if yes how could I know if the order is received) or after getting purchase response ? And if the purchase response is in PENDING state then how can we check whether it's state changed to successful? Any help is appreciated!
mobile associates
10 |5000

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

1 Answer

Mudeem@Amazon avatar image
Mudeem@Amazon answered
Hello, Thank you for writing to us. You should grant the digital bundle when the receipt for the purchase is delivered to your app. You will have to request for the receipt as part of the purchase call by setting the receiveReceipt flag to true. You should only set this flag to true if you are implementing a digital bundle. When you set receiveReceipt to true, if the PurchaseResponse.Status is SUCCESSFUL in onPurchaseResponse, you can call PurchaseResponse.getReceipts() to retrieve the receipt for the purchase and grant the digital bundle. If you receive PurchaseResponse.Status as PENDING, you will have to rely on ShoppingService.getReceipts(..) to get the receipt for the purchase. You must call getReceipts in the onResume method of the main activity and also in onResume of any activity that implements the Mobile Associates API functionality. This will ensure that when the transaction goes through, your app receives the receipt and grants the digital bundle. Regards Mudeem
10 |5000

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