我在购买基于订阅的项目时遇到了 Titanium 中的 Storekit 模块的问题(可能也会影响其他项目)。
我在购买商品时收到的错误代码是:
[WARN] error in transaction: Error Domain=SSServerErrorDomain Code=5002 "An unknown error has occurred" UserInfo=0x9b3a660 {NSLocalizedDescription=An unknown error has occurred}
我用来引用产品的代码在这里:(Javascript)
requestProduct('553XXXXXX.testproductname', function (product) {
var buySingleItem = Ti.UI.createButton({
title: 'Buy ' + product.title + ', ' + product.formattedPrice,
top: 60, left: 5, right: 5, height: 40
});
buySingleItem.addEventListener('click', function () {
purchaseProduct(product);
});
win.add(buySingleItem);
});
一些注意事项:
Tested with iPad Simulator and iPhone 4S running 5.1.1
Module is called Ti.Storekit version 1.5
Titanium SDK version is 2.1.1