我已经整合了https://github.com/phonegap/phonegap-plugins/tree/master/iPhone/InAppPurchaseManager的应用内购买。
我使用的是xcode4.3和cordova-1.5.0。
我收到错误:
window.plugins.inAppPurchaseManager未定义
所以我无法调用inPoodchaseManager方法,如requestProductData等。
“window.plugins.inAppPurchaseManager未定义”表示未定义window.plugins.inAppPurchaseManager变量。它在InAppPurchaseManager.js中定义。您似乎忘记在html代码中包含文件InAppPurchaseManager.js:
<script type="text/javascript" src="js/InAppPurchaseManager.js"></script>