libgdx/gdx-pay

Consume item manually

kharindev opened this issue · 5 comments

There is such a problem, if you press the buy button and immediately close the application, then the purchase will not be delivered, and when you return to the application, you will be informed that you already have this content. Hence, we need to manually consume the purchase, for this we need two getOwnedPurchases () methods
and consumerPurchase (String productId). So that you can manually find purchases to be consumed and deliver them to the user.

For example, a user started buying coins and exited the game, next time he will not be able to buy coins because the purchase was not consumed. We look at what our own purchases are, if there is a non consume purchase with a coin index, we need to consume it so that the user can buy it in the future.

gdxPayVersion = '1.3.1'

Please select the affected platforms and payment service implementation

  • Amazon
  • googlebilling
  • googlepay
  • apple robovm
  • Huawei

What happens if you restore the purchases?

the purchase will be consumed and delivered even if the payment has not gone through

If I understand correctly, that is pretty much the opposite problem than described in the first issue post?

The problem is that I need a consumePurchase method, as it was in the old library, which unfortunately is no longer supported, my shopping system is built on the fact that I can completely control purchases and consume them manually.

Feel free to contribute what you need