IAP Badger: Error Transaction failed: Unable to buy item (response: 7:Item Already Owned)

Hi to all

I use IAP Badger in the version “The simplest possible code for handling a purchase” without any changes. By testing the IAP, I use as product code “android.test.purchased”. So far, in Google all is working fine and the product is technically bought. In the “purchaseListener”, I set a Flag in a txt-file to remember the purchase for not asking for buying again. Works fine too.

Question: I deinstall the application on the device and reinstall it again. In this case, the txt-file has been deleted, what is OK (Same situation, as I install the App on a new phone with the same google account). Now, if I buy my IAP again, I get from Google the message “Error Transaction failed: Unable to buy item (response: 7:Item Already Owned)” which is in my opinion correct.

Maybe I think something wrong:

a) Easy for me would be when the IAP Badger would handle this case like a buy and call the “purchaseListener”-function.

b) Is there any possibility to handle the error message by myself?

c) other suggestion?

Thanks for helping

Hanspeter

No Sugestion?? It is realy a problem. After deinstallation and new installation of the app the IAP is blocked. It is not restored and it can not bought again.

Thanks for help.

I can’t help much with IAP Badger, but the product  android.test.purchased should always be successful. The purpose of the Google test products is so you can repeatedly test cases like successful purchases, canceled purchases, etc. without having the rules enforced. 

I doubt IAP Badger is the cause here. You should look through your device’s console log for additional messaging.

Rob

Hi again,

I know we’ve already touched on this in another thread, but I didn’t realise you were using “android.test.purchased”.

Your best bet for testing IAP on a real device, with a real connection to Google play, is to set up your IAP in Google Play console and use a real product identifier.

Simon :slight_smile:

No Sugestion?? It is realy a problem. After deinstallation and new installation of the app the IAP is blocked. It is not restored and it can not bought again.

Thanks for help.

I can’t help much with IAP Badger, but the product  android.test.purchased should always be successful. The purpose of the Google test products is so you can repeatedly test cases like successful purchases, canceled purchases, etc. without having the rules enforced. 

I doubt IAP Badger is the cause here. You should look through your device’s console log for additional messaging.

Rob

Hi again,

I know we’ve already touched on this in another thread, but I didn’t realise you were using “android.test.purchased”.

Your best bet for testing IAP on a real device, with a real connection to Google play, is to set up your IAP in Google Play console and use a real product identifier.

Simon :slight_smile: