titanium InAppBilling queryInventory return error code -1003 (InAppBilling.IAB_RESULT_VERIFICATION_FAILED)

僤鯓⒐⒋嵵緔 提交于 2019-12-25 01:22:27

问题


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


回答1:


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.




回答2:


sorry it's my fault, I set an undefined PUBLIC_KEY in the setup. now it's correctly

Thank you for your answers



来源:https://stackoverflow.com/questions/36984802/titanium-inappbilling-queryinventory-return-error-code-1003-inappbilling-iab-r

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!