hi all,
im having some fun with in-app purchases on Google Play / Android.
was wondering if any master jedi's who have done this before out there can please help out. this was my code
inapppurchasesettitle ("mygame") // name for alert dialogs etc.
inapppurchaseaddproductid ("onemillinvest", 1) // iap product id you configured through itunes / google
inapppurchaseaddproductid ("tenmillinvest", 1) // iap product id you configured through itunes / google
inapppurchaseaddproductid ("hundredmillinvest", 1) // iap product id you configured through itunes / google
inapppurchaseaddproductid ("billioninvest", 1) // iap product id you configured through itunes / google
inapppurchasesetup()
first issue, when i buy an in-app, im getting a "Purchase Result: Signature verification failed for sku <myinappname> (response: -1003: Purchase signature verification failed)
i've been through the forum posts, and found i didnt set the InAppPurchaseSetKeys!!! what a fool!
so i went to the google play developer console, into my app, and under Services & APIs, under LICENSING & IN-APP BILLING, there is a Base64-encoded RSA public key, i assume this keys that is szData1 in the InAppPurchaseSetKeys ( szData1, szData2 ) setup.?
my code now looks like:
inapppurchasesettitle ("mygame") // name for alert dialogs etc.
inapppurchaseaddproductid ("onemillinvest", 1) // iap product id you configured through itunes / google
inapppurchaseaddproductid ("tenmillinvest", 1) // iap product id you configured through itunes / google
inapppurchaseaddproductid ("hundredmillinvest", 1) // iap product id you configured through itunes / google
inapppurchaseaddproductid ("billioninvest", 1) // iap product id you configured through itunes / google
InAppPurchaseSetKeys (<the big number from the google play console>,"") // ANDROID ONLY!!!
inapppurchasesetup()
i thought surely THATS IT... all makes sense..
but just beta tested the new file, and the same -1003 error occurs (gutted!)
im thinking i've got the wrong szData1 number??
second issue,
I have 4 in-app purchases in the game, all of which are coins which can be bought over and over, as many times as the player wanted.
when setting up, Google play only offers me 'Managed Product' or 'Subscription', if definitely not a 'Subscription' so i chose 'Managed Product' and put in all the in-app info.
in the game, when you buy the coins (even though it fails at the moment with the -1003 error), once purchased, you cannot buy the coins again. If you try and buy again Google Play just says you already own this purchase. And then the process fails.
any guidance would be much appreciated. cheers all.