Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Android / how to deal with the base64EncodedPublicKey for In App Purchasing?

Author
Message
spasski
AGK Backer
6
Years of Service
User Offline
Joined: 2nd Jan 2013
Location: Amsterdam
Posted: 1st Jun 2013 18:37
I'm trying to get In App Purchasing to work using AppGameKit 108b12. After a succesfull In App Purchase message on the device, there is an error message:

purchase result: signature verification failed for sku com.blablabladi.blabla.test (response: -1003urchase4 signature verification failed)

I guess I didn't setup the base64EncodedPublicKey correctly in the security.java file. Does anyone know where and how exactly to set this up using the Tier 1 interpreter_android_prebuilt template?
Funnell7
7
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 4th Jun 2013 00:22
Open AGKHelper.java (src/com/thegamecreators/agk_player) and find the variable named base64EncodedPublicKey, chanage this to the key found in your Google Play developer console for your chosen app.

That should be all you need to do. Remember that in order for you to test IAP, you must be using the apk which is the same as the one uploaded to Google Play (but not necessarily published). You cannot test IAP via the AppGameKit Player.

I have IAP working successfully using Tier 1 Beta 12...
spasski
AGK Backer
6
Years of Service
User Offline
Joined: 2nd Jan 2013
Location: Amsterdam
Posted: 4th Jun 2013 10:17
Thanks Funnell7

Will try again to get in app billing working this evening!

What I know is also important for testing IAP on android:

1. login with test gmail account on your test device (I needed a factory reset to do so)
2. upload signed AppGameKit in google play console(but not published yet)
3. active IAP item
4. wait for 6 hours
5. add test gmail user in google play dev console
6. install the same signed APK on your test device
spasski
AGK Backer
6
Years of Service
User Offline
Joined: 2nd Jan 2013
Location: Amsterdam
Posted: 4th Jun 2013 22:51
Just tested another IAP putting base64EncodedPublicKey as Funnell7 told and this time no errors

Only some errors left to fix in my own Tier AppGameKit code to process and save the purchase correctly into a variable.
Funnell7
7
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 5th Jun 2013 02:18
Glad you got it working

Login to post a reply

Server time is: 2019-08-23 22:48:57
Your offset time is: 2019-08-23 22:48:57