SDKBOX IAP plugin consuming NON_CONSUMABLE items also

Hi,

I am using IAP plugin of SDKBOX to sell a non consumable item. I call sdkbox::IAP::purchase(PRODUCT_SKU_STRING);

The sdkbox config is correctly setup as mentioned in the docs.

Even if I have purchased the item, sdkbox is allowing another purchase of the same item. I believe that can happen only if the item purchased has been consumed.

I have tried it using the test account. but a similar issue has been reported by my users as well.

Hello @abhinav

Could you please PM me the class in which you are handling the IAP for the non-consumable items.
If you want you can change the real ID"s to fake one’s.

I will check whether it is correctly setup or not.

Also, if you could send us the reproducing steps of your issue, that would be great.

Best,
Pabitra

Hey,

I have updated the IAP plugin today. I will report the findings in some time.

( I can share the code of course, please let me know how shall I send it across )
To answer your question, since I am able to make a purchase, their is no problem with the integration.

What I was suggesting is that if the item is mentioned as non_consumable in the sdkbox-config, then the second purchase should not be allowed as per google’s documentation.

Now, this is what I do in my code:

  • call init on sdkbox iap plugin
  • once the iap plugin is able to fetch all the latest details of the products, enable the purchase button
  • on button click, purchase the item using iap plugin
  • purchase is executed successfully using test account.
  • on button click, send the purchase request one more time

I expect the second request to fail because I already own the item.

You can send me a dropbox link, that should be fine.
Also, in the mean time… I am sending you a link to the classes that I use to handle IAP for non-consumable.

It worked fine for me, never asked for purchase again.
Just go through it and let me know in case of any confusion.

Here’s the link

Best,
Pabitra

Which of the items you have mentioned in your class are non-consumable?

Can you also share your sdkbox-config file for iap

Also, when you say that it has never asked for purchase again, do you mean that when you try to purchase again using the same button, the order fails?

Umm… sorry I forgot to mention.

World2 and World 3 are non-consumable IAP items
sdkbox_config.json is pretty simple to the default non-consumable “remove_ads” type.

Should it be “non_consumable” or “non-consumable” in sdkbox-config?

non_consumable

Here are my classes

Hello @abhinav

Please cross-check with the code that I have given you.
Also, I don’t see that you are storing the purchase information locally in any way.

So, that’s the issue probably.

Best,
Pabitra

I wasn’t able to reproduce this issue either.

Did you uninstalled the app and then try purchasing the item again?

Yes, That’s what I did it on two devices and one of my customers did the same thing as well.

I am trying to repro this issue in a sample app with the latest sdkbox iap plugin. Will let you know my findings in a day or two

If the app is deleted, you have to perform a restore to retrieve any previous purchase.

Hello,

i have the same issue.

i created non_consumable product, and i am able to purchase it successfully as tester,

the problem is that i can buy the product again which should not happen twice since the product is non_consumable, and if i deleted the app and reinstall it no product get restored and i am able to buy it again and again, so i think the non_consumable product some how get consumed.

i have been struggling for 3 days till now and can’t find any fix, can you help me please.

So for non_consumable items, if you deleted your app, you have to restore purchase first to retrieve whatever you already purchased.