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!
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