Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cordova phonegap/inAppPurchaseManager插件的onRestore购买按钮代码_Cordova_Phonegap Plugins - Fatal编程技术网

Cordova phonegap/inAppPurchaseManager插件的onRestore购买按钮代码

Cordova phonegap/inAppPurchaseManager插件的onRestore购买按钮代码,cordova,phonegap-plugins,Cordova,Phonegap Plugins,我正在为phonegap使用InAppPurchaseManager插件,我不确定如何使恢复购买按钮代码正常工作。我甚至不确定这个插件是否包含了所有正确的代码。谁能给我指出正确的方向吗 这是电话。只是不知道下一步该怎么办 window.plugins.inAppPurchaseManager.onRestored=函数(transactionIdentifier、productId、TransactionReceive){ console.log('restored:'+productId);

我正在为phonegap使用InAppPurchaseManager插件,我不确定如何使恢复购买按钮代码正常工作。我甚至不确定这个插件是否包含了所有正确的代码。谁能给我指出正确的方向吗

这是电话。只是不知道下一步该怎么办

window.plugins.inAppPurchaseManager.onRestored=函数(transactionIdentifier、productId、TransactionReceive){ console.log('restored:'+productId); /*有关如何处理此问题的详细信息,请参阅《开发人员指南》*/
}明白了!你所要做的就是加上这个

<script type="text/javascript" charset="utf-8">
   $(".ftk50").click(function() {
      window.plugins.inAppPurchaseManager.restoreCompletedTransactions(); 
    });
</script>

<a href="#" class="ftk50">Restore All Purchases</a>

$(“.ftk50”)。单击(函数(){
window.plugins.inAppPurchaseManager.restoreCompletedTransactions();
});

答案的日子到了!我已经创建了一个新的github来解决这个问题和许多其他问题!