【发布时间】:2018-08-13 14:06:46
【问题描述】:
我正在阅读 PayPal Checkout 文档的这一小节:https://developer.paypal.com/docs/checkout/how-to/customize-flow/#manage-funding-source-failure。这里他们包括这个代码sn-p:
paypal.Button.render({
//Configure environment
env: 'production', // To test, set to `sandbox`
payment: function () {
// Set up the payment here, when the buyer clicks on the button
},
onAuthorize: function (data, actions) {
// Call your server to execute the payment
if (error === 'INSTRUMENT_DECLINED') {
actions.restart();
}
}
}, '#paypal-button');
有谁知道该文档是否正确? PayPal checkout.js 是否在全局范围内管理错误变量?如果没有,您如何正确实施该指南?
【问题讨论】:
标签: javascript paypal