question

Ted avatar image
Ted asked

In-App Purchase Integration Questions

1. Where should I use App ID and Release ID?

2. When finished purchasing, our game failed receiving In-App Purchase response from app store, what should we do?

iappurchasing
10 |5000

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

Levon@Amazon avatar image
Levon@Amazon answered

Hi Ted,

Thanks for posting! Do you mean App ID and Release ID that you see in Dev Portal? You don't need to use those. If your app is not receiving a response from Appstore, most likely it's missing a receiver in the manifest. In either case, please follow this guide step by step:

https://developer.amazon.com/public/apis/earn/in-app-purchasing/docs-v2/implementing-iap

and also see various questions and answers on IAP in this space:

https://forums.developer.amazon.com/spaces/70/In-App+Purchasing+2.0.html

for example:

PurchasingListener doesn't get called

onPurchaseUpdatesResponse() gets called before onPurchaseResponse()

10 |5000

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

Ted avatar image
Ted answered

Hi Levon,

Thanks for your reply!

For the 2nd question, what if it's under improper status? For example right after finishing payment, before receiving gems in game, device is shut down because battery died, or lost network. How can we receive response from app store again when it becomes normal?

Thanks!

10 |5000

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

Levon@Amazon avatar image
Levon@Amazon answered

Hi Ted,

No problem. The response is sent only once, and so if for some reason the connection is lost, the phone is restarted, etc. -- you will need to query that whenever you want to check the status. Upon launch, every time your app starts, it should query the inventory by calling getPurchaseUpdates() and check whether items are owned by the user. That way you will be able to enable or disable those in-app items in the app. Thanks!

Related: https://forums.developer.amazon.com/questions/60318/in-app-refund-handling.html

10 |5000

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