本文介绍了钛 InAppBilling queryInventory 返回错误代码 -1003 (InAppBilling.IAB_RESULT_VERIFICATION_FAILED)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 Android 上使用 ti.inappbilling
模块进行应用内结算.我使用 titanium sdk
5.1.2
但是当我调用它时总是返回一个错误:
var InAppBilling = require("ti.inappbilling");InAppBilling.queryInventory({});InAppBilling.addEventListener('queryinventorycomplete', function(e) {如果(e.success){购买 = e.inventory.getPurchase(productID);}别的{Ti.API.error('queryinventorycomplete:' + e.responseCode + " - " + responseString(e.responseCode));}});
queryinventorycomplete: -1003 - IAB 验证失败
解决方案
抱歉,是我的错,我在设置中设置了未定义的 PUBLIC_KEY.现在是正确的
感谢您的回答
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));
}
});
解决方案
sorry it's my fault, I set an undefined PUBLIC_KEY in the setup. now it's correctly
Thank you for your answers
这篇关于钛 InAppBilling queryInventory 返回错误代码 -1003 (InAppBilling.IAB_RESULT_VERIFICATION_FAILED)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!