Our app has been integrated with IAP.Under normal circumstances,the IAP works well.But something was wrong in the following case,in which case I was testing my app through the sandbox environment.I attempted to purchase some bijous through the IAP function and after I clickedthe "Purchase" button, and then a "thank you" dialog appeared.Next,I powered off the kindle device without closing the "thank you" dialog.I started up the device again and logged in the game only to find that I didn't receive bijous I had purchased. I have learned from an answer to some question in FAQ that in the case above,the amazon client should have automatically retrieved the response and sent it to the application when the client was capable.If that was the case,I should have received the bijous but I didn't.Then,where is the problem?Thanks for watching:-) Message was edited by: aidigame
You need to click on the thank you dialog to complete the purchase process. However, if you have not closed the thank you dialog box after purchase, the purchase receipt will be with the server and will be pushed to your device after next successful purchase. You cannot purchase the same IAP item again as you already own the content.
Thanks very much for your reply.You mean that if I complete a purchase process after the above failed deal, I will receive the receipt kept by the server besides the one of this purchase,right?But,I purchased some bijous successfully but I didn't receive the bijous lost in the last failed purchase and it seems like that the game didn't receive the receipt sent by the server,what should I do?Besides,I have another question here,how the amazon knows whether an app integrated with IAP has received the receipt successfully in a purchase process?
By the way,considering there is only one type of purchasable item:consumable content,I never call the initiatePurchaseUpdatesRequest in my app,not to speak of implementing the onPurchaseUpdatesResponse method.Does it have anything to do with my problem?[b][/b][b][/b]
Consumable content is not available anywhere other than the device it is purchased from. There is no entitlement for consumable content and the purchase history of consumables are not reflected in purchaseUpdateRequest responses. The purchase receipt will be pushed back only in case of entitlement or subscriptions and not in case of consumable items. onPurchaseUpdatesResponse is used to sync purchases made from other devices onto current device, and sync revoked entitlements across all instances of your app. It returns receipts for Entitled Content and Subscription Content. Hope this answer your question.
Dear Saching, I'm so grateful for your reply.I didn't realize I had made a serious mistake until last night,when I searched the logcat only to find the app has received the receipt before the device shutting down
completely.As I developed app with Android NDK and the process of PurchaseResponse object is devided into two parts.One part is performed in asynchronized manner while the other in synchronized way and that't the problem.When kindle device is shutting down,the synchronized part is too late to perform resulting in my loss of bijous.Thank you again for your help and hope this can help friends stuck with similar problems. Message was edited by: aidigame