Invalid Product error from Google Play - android

I'm attempting to get https://github.com/j3k0/cordova-plugin-purchase working for Cordova/PhoneGap and I'm getting an "Invalid" error when I try to retrieve the product info.
I don't know what I'm doing wrong, but here is what I have done:
The plug-in is installed with the proper billing API key in platforms\android\res\values\billing_key.xml
The store.ready() event does fire without errors, so I know I'm at least connecting.
I've uploaded a signed APK to Beta and published it.
I created an in-app purchase and confirmed it is active.
I confirmed I'm calling the right product ID within the code by hard-coding the ID.
I get callbacks from store.when("product").updated(fnProcessProduct), but the product.state is always store.INVALID
Is there something I'm missing, either within Google Play, PhoneGap, deploying, or the plug-in?

Got the answer - once you upload an APK to Google Play as beta and activate your IAP product, you must test using APKs signed with the same key. I was using Ionic, and Ionic was signing with a debug key.
More info: https://github.com/j3k0/cordova-plugin-purchase/issues/75

Related

google play sigin sdk for unity works on build but not production

i have included google play sigin inside my unity app and it has very strange behaviors,
when i build the app directly from unity to a mobile device it works but on production it just logs in one time then it stops, it shows the loading icon for one second and it stops.
things i have tried:
on the configuration first i created a google cloud credentials and gave it my game bundle id and keystore SHA
then in google play console i added the credential
then i unity i copied the resource i added it in the setup with Auth ID and added my keystore
on one post i found they refered to using App signing key certificate instead of Upload key certificate so i updated the SHA from google cloud, this worked for a while then i uninstalled the app and installed it from google play store then the same thing happen again.
additional information:
Integrity API responses off
Releases signed by Google Play
play games service: published
Enable anti-piracy turned off
please i really really need help with this, my boss will legit fire me if this project isn't published by the end of this week so any help is much appreciated.

How to test Android In App Billings--I've tried "everything" but no luck

I am trying to get a list of Android In App Billings (IAB) in my app--subscriptions specifically. While debugging on device (NOT EMULATOR) When it makes the call to get the products I get this error error occurred while loading products: Error: IAP not prepared. Check if Google Play service is available. Here are the things that I've done:
The apk is uploaded to the Google Play Console as an alpha release.
Hours (days!) have passed and the release is available (I can see it in Play Store).
I added the in app purchases in the Google Play Console.
I added a gmail account as a tester in the Google Play Console in both the general settings area and the list of testers for a release.
I installed the apk that has the same version number AND version name as the apk that is in alpha in Play Store
I am using a real device (not an emulator)
I am signed in as the tester email account.
My AndroidManifest.xml has the BILLING property set
It should be noted that I am using react-native and this package for in app billing https://github.com/dooboolab/react-native-iap although I think the issue here is I have missed one of the general steps necessary to set up in app billings for Android. Any ideas or guidance would be appreciated--I've been fighting this for days now!
Can you please provide code you are using?
According to this issue answer: https://github.com/dooboolab/react-native-iap/issues/301 please make sure you are initializing IAB using initConnection not prepare.

Product state is always "invalid" (using Cordova Plugin Purchase)

I'm using Cordova Plugin Purchase to use in-app billing in my Android app. However, using the alert with the JSON-stringified product, the product's state is always "invalid". Here is a sample of my code around this issue:
store.register({
id: 'test_walker_01',
alias: 'walker',
type: store.CONSUMABLE
});
item_walker = store.get("test_walker_01");
store.when("product").updated(function (product) {
alert(JSON.stringify(product));
});
store.refresh();
My problem: I cannot access my product's information from Google Play.
After much searching on Google and Stack Overflow, here are the steps I already did/verified to find a solution:
I triple checked that the ID is the same than on Developer Console, and the type is "managed".
The product is activated in Developer Console.
I uploaded the exact same APK on my test phone than uploaded in the Developer Console, in Alpha testing.
I'm using a different Google account than the one in the Developer Console.
I have added this (different) account in the list of authorized test Gmail accounts.
The APK that I am signing and uploading is the release (not debug) version.
As far as I know, I am only using one key to sign all my APKs (referring to this SO question). I'm unsure how using many keys could happen.
I even uninstalled the app completely, rebooted my phone and reinstalled it.
Thank you for your help!
After much searching, I found my answer in the last few comments in this issue on the Plugin's Github: You have to publish your application (in Alpha mode) on Google Play for it to actually work.
Publishing in Alpha mode only lets people in your test group access the application, so no worries about it being public. Just fill the mandatory fields with temporary information.

In-app billing returns empty signature

I'm testing my in-app billing feature, but for some reason, I can't understand why I'm always getting an empty signature (inapp_signature field at bundle's extra) when com.android.vending.billing.PURCHASE_STATE_CHANGED is called.
According to the second row of this table I would be able to get a signed static response signature. Why does its not happening?
I've already set a test account in my developer account (I didn't published the app) and tried to obtain that signature with no success!
Does anyone have passed through this? Any help would be great. Thaks.
If you don't already have a published version of your APK that contains billing, then you will need to use a developer device. Ie one with same account as your developer console.
You also need to have the same version of the APK installed on your device as the one deployed to Google Play. In fact from memory, the latest APK deployed (not necessarily published) to Google Play needs to the one installed on your device.
And you nee to wait about an hour (it'll vary) from when you deploy to Google Play to when you are guaranteed that the GP instance of your phone can see the version deployed to GP.

InAppBilling Issue

When I implement InAppBilling, the Following screen appears.. I used this link
http://blog.blundell-apps.com/simple-inapp-billing-payment/
for implementing InAppBilling
so where am I wrong?
Most likely you are using a version of the app that is signed with your debug key or you are trying to purchase using your developer account which is not allowed.
You should also have uploaded an apk to Play store that has the billing permissions (although you do not need to publish it)
You need to sign your apk with your release key. Trying to purchase in debug mode will not work.
See this link for full testing instructions.
http://developer.android.com/guide/google/play/billing/billing_testing.html
May be you are running this app from eclipse directly.
Whenever you are using In-App purchase in your app.
Export signed APK then try out this...

Categories

Resources