3

I'm testing in-app billing with my own cellphone

I've sucessfully added some acounts to alha track and they can now buy the goods in the test mode.

The thing is due a bug existent in the first alpha version the purchased good wasn't being consumed and now everytime i try to purchage i get

ITEM_ALREADY_OWNED
int ITEM_ALREADY_OWNED
Failure to purchase since item is already owned

reading googles guide about testing in-app billing it says:

Cancel completed test purchases Google Play accumulates completed test purchases for each user, but does not pass them to financial processing.

In some cases, you may want to manually cancel a trial purchase to continue testing. To do so, open the app page in the Play Store. If the test purchase you want to cancel is a subscription, you can also use the cancel () method of the Purchases.subscriptions API.

I do not find an option to cancel the test purchases at googles play page of my app, nor in the console neither in the tester account...

how can i cancel it to keep testing?

Rafael Lima
  • 3,079
  • 3
  • 41
  • 105

1 Answers1

1

The problem here is that you need to consume the item, instead of cancelling. The item was purchased, and while not consumed you won't be able to buy it again. Please check this answer on how to consume the item. Hope it helps.

miguelarc
  • 791
  • 7
  • 13
  • i cannot consume the item since i don't have the token anymore... so i need to cancel the purchase – Rafael Lima Aug 07 '18 at 08:34
  • 1
    If you have the item SKU, you can query the inventory to get the purchase. You can then consume the item with the token you get from that inventory query (like [this](https://stackoverflow.com/a/39228086/7671879)) – miguelarc Aug 07 '18 at 08:38
  • 1
    I've managed to do it, but i can't believe there isnt a simplier dashboard for that... it is stupid to not have a place to see the in-app sells and cancel or do something about it... I was testing with 2 devices, but what if i had 50? – Rafael Lima Aug 07 '18 at 08:54
  • I was wrong, it simply didn't work... the result of that methos is a null list... but if i when i try to purchase something with same sku i get response 7... – Rafael Lima Aug 07 '18 at 09:02
  • You can remove the item from the google console, but I don't know what impact will it have... Besides that, it's outside of my scope of knowledge, maybe someone else can help you. Sorry if I can't be more helpful :) – miguelarc Aug 07 '18 at 09:49