【发布时间】:2017-11-16 11:11:08
【问题描述】:
我正在尝试将“braintree”支付插件集成到我的 cordova 应用程序中。我能够成功初始化braintree插件。但我无法获取支付页面的 UI。
// Initializing... this is working fine
var token = "xxcssf...";
BraintreePlugin.initialize(token,
function () { console.log("init OK!"); },
function (error) { console.error(error);
});
// Calling the payment method... not able to execute this code... not getting issues too
var options = {
amount: "49.99",
primaryDescription: "Your Item"
};
BraintreePlugin.presentDropInPaymentUI(options, function (result) {
if (result.userCancelled) {
console.debug("User cancelled payment dialog.");
} else {
console.info("User completed payment dialog.");
console.info("Payment Nonce: " + result.nonce);
console.debug("Payment Result.", result);
}
});
提前致谢
【问题讨论】:
-
您使用的是哪个插件?考虑到Braintree does not support compile-to-native frameworks,您可能会更幸运地联系到插件的开发人员。此外,如果您在调用
#presentDropInPaymentUI时使用特定错误或一些日志记录更新您的问题,这将非常有帮助。