You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No matter the params of queryInventory(), it always return the same json, with no products at all. I have already bought the product but I can't restore my purchase because of it.
It have been ten days since I created the products and I don't know what else to try.
Here's how I did it. I basically loop through the database and get the status for each item that's in my app:
varrestore=function(arg){InAppBilling.queryInventory();InAppBilling.addEventListener('queryinventorycomplete',function(e){varinventory=e.inventory;varpurchase;varrows=db.execute('SELECT * FROM tablename');vardataArray=[];while(rows.isValidRow()){dataArray.push(rows.fieldByName('store_id'));rows.next();};for(vari=0;i<=dataArray.length;i++){if(inventory.hasPurchase(dataArray[i])){purchase=inventory.getPurchase(dataArray[i]);if(purchase.purchaseState==0){//Do your database updating here if you store your items in a DB. Example:db.execute('UPDATE tablename SET owned="1" WHERE store_id="'+purchase.productId+'"');}}}});};
No matter the params of queryInventory(), it always return the same json, with no products at all. I have already bought the product but I can't restore my purchase because of it.
It have been ten days since I created the products and I don't know what else to try.
Quering all the products
returns:
Quering with product name
also returns:
The text was updated successfully, but these errors were encountered: