问题描述
我正在使用ti.inappbilling模块在Android上进行应用内计费.我使用titanium sdk 5.1.2
但是当我打电话时,它总是返回错误:
var InAppBilling = require("ti.inappbilling"); InAppBilling.queryInventory({}); InAppBilling.addEventListener('queryinventorycomplete', function(e) { if (e.success) { purchase = e.inventory.getPurchase(productID); }else{ Ti.API.error('queryinventorycomplete: ' + e.responseCode + " - " + responseString(e.responseCode)); } });
QUERYINVENTORYCOMPLETE:-1003- IAB验证失败
推荐答案
对不起,这是我的错,我在设置中设置了一个未定义的public_key.现在正确
谢谢您的回答
其他推荐答案
确保完成以下操作.
1.该应用程序已发布.
3.您接受该帐户中的测试仪.
4.创建的产品活跃.
添加产品之后,需要一段时间才能生效.就我而言,尽管它活跃了两天.
问题描述
I'm using ti.inappbilling module for in-app billing on Android. I use titanium sdk 5.1.2
But when I call it's always returning an error:
var InAppBilling = require("ti.inappbilling"); InAppBilling.queryInventory({}); InAppBilling.addEventListener('queryinventorycomplete', function(e) { if (e.success) { purchase = e.inventory.getPurchase(productID); }else{ Ti.API.error('queryinventorycomplete: ' + e.responseCode + " - " + responseString(e.responseCode)); } });
queryinventorycomplete: -1003 - IAB VERIFICATION FAILED
推荐答案
sorry it's my fault, I set an undefined PUBLIC_KEY in the setup. now it's correctly
Thank you for your answers
其他推荐答案
Make sure the following things are done.
1.The app is published.
2.The account your are using to test is listed in beta tester list.
3.You accept to be tester in that account.
4.Created product is active.
Also after adding the product it takes a while to take effect. In my case it took two days although it was active.