question

Stephane D. avatar image
Stephane D. asked

In-App items not restored

Hello,

I published an app on the Amazon appstore a while ago. It's a free app with an in-app item you can buy to unlock the full version of the app. Tested it with the App Tester, then submitted it, and tested it on the live version by buying the item for myself on my personal Amazon account. It worked fine.

Forgot it for a few months, then I got a few users complaint about the fact they bought the full version, but the app was being locked again.

I went to my phone and checked the app, the same happened for me: the app was locked. I tried uninstalling it and then the Amazon Appstore app (it's called Underground now?), and then reinstalling everything, the purchased item shall be restored but is not.

What can I do to understand where the problem is, and if it's on my side (I don't believe so, works well with the App Tester) or on Amazon's side? My production version of course, I can't debug it and have no logs to understand what's happening.

So, first question: do you have any idea of why it's happening?

Second question: can I make a new version of the app (where I enable debug/log options) so I can test it live with my real account (not the App Tester), but without submitting it to everybody?

Thank you.

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.

WangChao@Amazon avatar image
WangChao@Amazon answered

Hello,

In your app, you need to call PurchasingService.getPurchaseUpdates() to retrieve previous purchases and revoked purchases from across multiple devices. Please check the following statement at: https://developer.amazon.com/public/apis/earn/in-app-purchasing/docs-v2/implementing-iap-2.0

In your onResume() call, implement the getPurchaseUpdates() call, which you can call to retrieve all purchase transactions by a user since the last time this method was called.

And you can do your test with Live App Testing, please check https://developer.amazon.com/public/resources/development-tools/live-app-testing

10 |5000

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

Stephane D. avatar image
Stephane D. answered

Thank you for the Live App Testing thing, will try it.

But of course I call getPurchaseUpdates() in onResume()...

To be more precise, I call getPurchaseUpdates(true) to get the list of all purchases, and it doesn't work.

Isn't calling the method with "reset" parameter set to true supposed to give me all purchases whatever the previous calls?

10 |5000

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

WangChao@Amazon avatar image
WangChao@Amazon answered

Yes, you are right. Also, please check the following statement from https://developer.amazon.com/public/apis/earn/in-app-purchasing/docs-v2/implementing-iap-2.0

Regardless of the value of the reset flag, note the following behaviors for getPurchaseUpdates():

  • The getPurchaseUpdates() call always returns all unfulfilled consumable purchases.
  • The getPurchaseUpdates() call returns fulfilled purchases only in rare circumstances. For example, getPurchaseUpdates() returns fulfilled consumable purchases if an app crashes after fulfillment but before Amazon is notified, or if an issue occurs on Amazon's end after fulfillment. In these cases, you would need to remove the duplicate receipts so as not to overfulfill the item. When you deliver an item, record somewhere that you have done so, and do not deliver again even if you receive a second receipt.
10 |5000

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

Stephane D. avatar image
Stephane D. answered

Thank you, but what do you mean by "regardless of the value of the reset flag"? Or about "fulfilling items"? I've got only non consumable items (app unlock), and when a user install the app on a new device, I expect to get all purchases the user has made in the past on this device or on other devices being sent to me via the getpurchasesupdate() method. I will test it further with a debug version, but it really seems it's not the case.

3 comments
10 |5000

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

Any update from your test?

0 Likes 0 ·

Hello WangChao, sorry for the delay, I had to work on developing a new feature for a while, I'm resuming my tests now. Can please answer my question about fulfilling items? Does entitled items (not consumable items, but entitled items) have to be fulfilled?

0 Likes 0 ·

... because if they do, no, I did not call PurchasingService.notifyFulfillment() method for entitlements, as I thought this was only for consumable items.

0 Likes 0 ·
Stephane D. avatar image
Stephane D. answered

OK, so I've been able to conduct a test with the Live App testing thing, and the result is not good. At all.

First, I've test thoroughly with the App Tester and can confirm that everything works perfectly fine. I've update my code to now fulfill purchases (as I said on my previous comment, I was not fulfilling IAP items until now because I thought this was not supposed to be the case for entitlements, as they are not consumables), and everything works nice. If I want to have the full history of purchases, I call the getPurchaseUpdates(true) and I always get the full inventory of entitled items, even after I fulfilled them.

Now, I tested this new version with the Live App Testing thing, with logging enabled so I can check what's going on. I've tested with my account on both my device where I purchased an entitlement item on August 18, 2015 and on a blank new device, I checked the market place and the account I used, and I can confirm I use the same account, the same market place, and I even have the email I got from Amazon after my item purchase, but when I call getPurchaseUpdates(true), I've got a successful response with NO RECEIPT at all.

Like I said, I thought entitlement were not supposed to be fulfilled, so I never fulfilled the item at the time where I was testing it last year, but I can say that it was working last year, so at the time, getPurchaseUpdates(true) gave me a receipt. But one year later, no more receipt. Both on the same device, both on a new device.

So, WangChao, how it it possible that it happens? Do you have an explanation?

Thank you for your quick answer.

Best,

Stéphane.

10 |5000

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

Stephane D. avatar image
Stephane D. answered

Can I please have an answer @WangChao@Amazon? This is a huge problem and I'm on the verge of unpublishing my app from the Amazon AppStore. Or maybe can you point me to an email or contact form to directly contact someone that will be able to answer me? Thank you.

10 |5000

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

WangChao@Amazon avatar image
WangChao@Amazon answered

Hi Stéphane,

Sorry for the late reply.

Could you please provide logs from both your devices so that we could take a closer look? It would be great if you could included UserID, IAP item SDK and other IAP information. I will escalate this to internal team.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.

Stephane D. avatar image
Stephane D. answered

Thank you for your reply @WangChao@Amazon. Can I send this to you by MP or email so I don't share too much details here?

2 comments
10 |5000

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

Hi Stephane, you can upload that to your cloud storage, and then send us a link through Contact Us (make sure you are logged in to your Dev Portal account before you send it). Ideally include this forum post's URL for the context. Thanks!

0 Likes 0 ·

Hello @Levon@Amazon and thank you for your answer.

I did what you said. Can you please check you received it, and keep me posted? (there was no good category, so I used "General feedback".

Also, while you're here, can we get an update on this? https://forums.developer.amazon.com/questions/38713/faster-connection-to-game-circle.html

Best,

Stéphane.

0 Likes 0 ·
eikuh avatar image
eikuh answered

So, what was the solution? A post in a public forum can be read by other peoplem, too! ;-)

10 |5000

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

WangChao@Amazon avatar image
WangChao@Amazon answered

Hi @eikuh,

If you are having similar issue, please login Amazon developer portal and file a Contact Us case to us through https://developer.amazon.com/public/support/contact/contact-us. 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.