【发布时间】:2021-02-01 07:29:43
【问题描述】:
文档根本没有讨论返回值。
https://developer.paypal.com/docs/business/javascript-sdk/javascript-sdk-reference/#buttons
我只能根据例子猜测:
-
createOrder:应该返回 orderID(如果您不这样做,则库/服务器会提供有用的错误消息)
-
onApprove:?
示例包含return语句,但没有返回任何内容?
onApprove: function(data, actions) {
// This function captures the funds from the transaction.
return actions.order.capture().then(function(details) {
// This function shows a transaction success message to your buyer.
alert('Transaction completed by ' + details.payer.name.given_name);
});
}
【问题讨论】:
标签: paypal