android - Cannot retrieve products from Google Play store with Fovea purchase plugin -


i'm using fovea.cc purchase plugin android cordova app. plugin initializes, cannot find in-app purchase products - same "product not found" error if product didn't exist or if app not published. i'm looking more troubleshooting steps.

here's relevant code, called on app launch:

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

and here's code purchase button:

store.order("unlockgame"); // results in "the item attempting purchase  //    not found" error play store 

here's purchase attempt displays in 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 https://android.clients.google.com/fdfe/preparepurchase 

and here's i've double-checked:

  • "unlockgame" correct product id
  • the product defined in play console , active
  • the app published , active
  • the app built in release mode , running on real device
  • the device can reach play store okay
  • my app's license key stored in res/values/billing_key.xml

what else might keeping plugin getting products?

the issue configuration, first see you're trying access product title right after doing store.refresh()

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

however, store.refresh() method asynchronous , trigger request server. can monitor changes product way:

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

then call:

store.refresh(); 

also check product id on play console com.ineptech.wn.unlockgame, not unlockgame, , it's of type managed.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -