我将 Paypal Smart Buttons API 添加到我的网站,代码如下:
paypal.Buttons({
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{ amount: { value: 0.01 } }],
});
},
onApprove: function(data, actions) {},
onClick: function(){
//HERE I WANT TO GET THE PAYPAL’S BUTTON WHICH HAS BEEN CLICKED.
},
}).render('#paypal-button-container');
有什么办法可以得到点击的按钮吗?