• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android Suddenly Android IAP's are not working

spinout

Member
So everything on the new IAP setup has been working fine. Consumables, non-consumables, subscriptions, but suddenly, I am getting this error: "BILLING: Base64 decoding failed." when calling GPBilling_Purchase_VerifySignature() when nothing has changed in my code.

Is anyone else seeing any errors suddenly?
 

chirpy

Member
Have you recently removed google play public key from your project? I once encountered a similar error because I removed the public key thinking it was for google play licensing only, but it’s not. The public key is required for Billing to work.
 

spinout

Member
Confirmed it's still in there. It's also happening on other apps. I'll keep investigating and post if I find the cause.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
It may be that something has changed with how google are sending the receipt data or the verification infrastructure.... If you keep getting this then please contact YoYo Games and include a link to the output log and the project if you can.
 

spinout

Member
It may be that something has changed with how google are sending the receipt data or the verification infrastructure.... If you keep getting this then please contact YoYo Games and include a link to the output log and the project if you can.
Thanks Noc. I did some more digging and here is what I have found....
When it tries to grab my public key with:
public static String getBase64EncodedPublicKey() {
return RunnerActivity.BASE64_PUBLIC_KEY;
}
It returns: "${YYAndroidGoogleLicensingPublicKey}" I'm not sure if this is the correct data to be returning, but I am guessing the actual key is supposed to be returned?
But if I put my actual public key as a return instead of that, everything works fine.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Okay... that sounds weird... Please file a bug and include this information and link to this topic. That's definitely not what should be returned.
 

Mert

Member
Thanks Noc. I did some more digging and here is what I have found....
When it tries to grab my public key with:
public static String getBase64EncodedPublicKey() {
return RunnerActivity.BASE64_PUBLIC_KEY;
}
It returns: "${YYAndroidGoogleLicensingPublicKey}" I'm not sure if this is the correct data to be returning, but I am guessing the actual key is supposed to be returned?
But if I put my actual public key as a return instead of that, everything works fine.
One quick fix I can suggest is to go to the IAP extension's source. You should see some java files, search this getBase64EncodedPublicKey. Once you find the functions responsible for this, change this part (return RunnerActivity.BASE64_PUBLIC_KEY;) to (return "YOURBASE64PUBLICKEY_THAT_YOU_GET_FROM_GOOGLE_PLAY";)

See if that works
 

spinout

Member
One quick fix I can suggest is to go to the IAP extension's source. You should see some java files, search this getBase64EncodedPublicKey. Once you find the functions responsible for this, change this part (return RunnerActivity.BASE64_PUBLIC_KEY;) to (return "YOURBASE64PUBLICKEY_THAT_YOU_GET_FROM_GOOGLE_PLAY";)

See if that works
That exactly what I had to do, thanks!
 
Top