如何使用Cordova WP8将购买收据传回给JavaScript?

时间:2015-06-12 15:32:00

标签: cordova windows-phone-8 phonegap-plugins cordova-plugins

我正在使用this cordova插件

如何将购买收据传回JavaScript。

我试过这个:

string receiptXml =  await CurrentApp.GetProductReceiptAsync(productListing.ProductId);
string res = String.Format("\"receipt\":\"{0}\"",receiptXml);
res = "{" + res + "}";
this.DispatchCommandResult(new PluginResult(PluginResult.Status.OK, res));

但收据不会返回给JavaScript

1 个答案:

答案 0 :(得分:0)

Fovea的购买插件有WP8和收据验证支持:https://github.com/j3k0/cordova-plugin-purchase

(它还支持iOS和Android)。