Extension-IAP on Android doesn't see my product

I’ve been trying to get extension-iap to work in my project with little success. I have a managed product set up and active on Google Play. I’ve been having similar issues as in this thread: https://community.openfl.org/t/extension-iap-how-to-check-if-user-already-bought-an-item/1821, specifically, the inventory is always empty. This occurs regardless of whether I call IAP.queryInventory() requesting product details and/or additional products or not.

Attempting to purchase like:
IAP.purchase(“full_game”);

gives the error:
“Something went wrong on our end. Please try again.” from Google Services.

I’m not sure what the problem is. I used the extension-iap sample (https://github.com/HaxeExtension/extension-iap/tree/master/sample) as an example, but I don’t even know if that sample works anymore.

This might help?

It might be an issue with environment – IAP is notoriously tricky sometimes to get the correct environment server/client-side for it to give you items to test

I think I’ve figured it out. It seems like the initial problem was that it took much longer than I anticipated (I did wait a few hours) for the product to become available for the new apk I uploaded. After waiting awhile longer, I got the error “the item you requested is not available for purchase.” This answer and this answer on SO helped me out.

I had read online that it was possible to test iap with an apk in Google Play’s “internal testing” track, but this does not appear to be the case (anymore?). After promoting the release to alpha (and waiting some more) and adding myself to the list of testers (which needs to be done to test iap - don’t think that you can test iap just because you’re developing the app!), I was able to successfully complete test purchases.

1 Like