Can't download products from Google Play store with Fovea purchase plugin

I am using Fovea.cc purchase plugin for Android Cordova app. Plugin initializes but cannot find my in-app purchases. I am getting the same "Product not found" error. I would like it if the product didn't exist or the app wasn't published. I am looking for additional troubleshooting steps.

Here is the relevant code that is called when the application starts:

store.register({
    id: "com.ineptech.wn.unlockgame",
    alias: "unlockgame",
    type: store.NON_CONSUMABLE
});
store.ready(function() {
    console.log("\\o/ STORE READY \\o/");  // This does get called
});
store.when("unlockgame").approved(function (order) {
    UnlockContent();
    order.finish();
});
store.refresh();
var p = store.get("unlockgame");
popup("Title = " + p.title);  
// this displays "Title = null"

      

And here is the code for the buy button:

store.order("unlockgame");
// Results in "The item you were attempting to purchase 
//    could not be found" error from Play Store

      

Here's which purchase attempt is displayed in the logcat:

I/ActivityManager(424): Displayed com.android.vending/com.google.android.finsky.billing.lightpurchase.IabV3Activity: +80ms
E/Volley(22062): [1009] BasicNetwork.performRequest: Unexpected response code 500 for https://android.clients.google.com/fdfe/preparePurchase

      

And here's what I've already checked twice:

  • "unlockgame" is the correct product ID
  • Product is detected on Play Play and is active
  • Application published and active
  • The app is built in release mode and runs on a real device
  • The device can reach the Play Store normally.
  • My app license key is stored in res / values ​​/billing_key.xml

What else can make the plugin receive products?

+3


source to share


1 answer


The problem is most likely related to your configuration, but at first I see that you are trying to access the product name right after you execute store.refresh ()

store.refresh();
var p = store.get("unlockgame");

      

However, the method store.refresh()

is asynchronous and just makes a request to the server. You can track changes in your product this way:

store.when("unlockgame").updated(function(p) {
    alert("product is " + p.state + ", title is " + p.title);
});

      



Then call:

store.refresh();

      

Also check that the product ID is on the replay console com.ineptech.wn.unlockgame

, not just unlockgame

, and that it is of type Managed

.

+3


source







All Articles