question

ibrahim23 avatar image
ibrahim23 asked

Consumable purchase not saving

My purchase is failing for some reason and these are the logs I get. I/SampleIAPEntitlementsApp( 2144): onPurchaseResponse: requestId (467ee943-f4a5-4a53-9c39-c2ae47fd3953) userId (DefaultTestUser) purchaseRequestStatus (SUCCESSFUL) I/SampleIAPEntitlementsApp( 2144): onPurchaseResponse: receipt itemType (CONSUMABLE) SKU (dollars_1000) purchaseToken (eyJ0eXBlIjoiQ09OU1VNQUJMRSIsInNrdSI6InN0aWNrZG9sbGFyc18xMDAwIn0) I/SampleIAPEntitlementsApp( 2144): onPurchaseResponse: call savePurchaseReceipt for requestId (467ee943-f4a5-4a53-9c39-c2ae47fd3953) I/SampleIAPEntitlementsApp( 2144): savePurchaseReceipt: requestId (467ee943-f4a5-4a53-9c39-c2ae47fd3953) does NOT match any requestId sent before! I/SampleIAPEntitlementsApp( 2144): onPurchaseResponse: could not save purchase receipt for requestId (467ee943-f4a5-4a53-9c39-c2ae47fd3953), skipping fulfillment V/ActivityStack( 204): Prepare close transition: finishing ActivityRecord{41b2f8f0 com.amazon.mas.test/com.amazon.testclient.purchase.PurchaseActivity} What am I doing wrong? The purchase is successful but it is not saved for some reason. As a result my "onPurchaseResponseSuccess'' method is not called.
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.

1 Answer

ibrahim23 avatar image
ibrahim23 answered
Found the issue. I was not saving the purchase data on pressing buy button. Adding that fixed this issue for me
10 |5000

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