Hi.
It's me again. Having trouble. Again. With in app billing this time. When I trigger the purchase, the play store purchase overlay appears and returns an error "unable to find the item you're trying to buy" (in my langage).
In the google dev console, I have an in-app product set up. It's called "Remove ads (gamepremium)" set as a manageable product and its status is "active".
My app is configured as a beta version and the google account of my test device is in the testers list. Note that the app is "ready to be published" but it is not published yet.
In agk v1.021 tier 1, here's my setup code
inAppPurchaseSetTitle("com.myname.myapp")
inAppPurchaseAddProductID("gamepremium", 0)
inAppPurchaseSetup()
if getinapppurchaseavailable(0) = 1
game_bought = 1
else
game_bought = 0
endif
Then, the purchasing code itself :
inAppPurchaseActivate(0)
while getInAppPurchaseState() = 0
sync()
endwhile
if getInAppPurchaseAvailable(0) = 1
game_bought = 1
endif
That's it. I can't figure out why it doesn't work. Could someone tell me what I did wrong ?
By the way, if I restart the app after a failed purchase and try to purchase again, the app forces close. If I clear data I can't try again but the problem comes back.