I added the Paypal Smart Buttons API to my website, with the following code:
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');
Is there any way to get the clicked button?
Which funding source a payer has used within PayPal is kept private by design. All you see is whether they have completed a PayPal payment.