Javascript Paypal智能按钮actions.order.capture()
如何从对象详细信息中获取数据?我在paypal文档中找不到它! 只是没有定义Javascript Paypal智能按钮actions.order.capture(),javascript,paypal,Javascript,Paypal,如何从对象详细信息中获取数据?我在paypal文档中找不到它! 只是没有定义 // Finalize the transaction onApprove: function(data, actions) { return actions.order.capture().then(function(details) { // Show a success message to the buye
// Finalize the transaction
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
// Show a success message to the buyer
alert('Transaction completed by ' + details + '!');
});
}
您可以在响应部分中参阅本文档中的文档。例如,要获取付款人名称,您可以编写:
details.payer.name.given_name
或者订单id如下所示:
details.id
console.log(详细信息)