Paypal Smart Buttons: get clicked button

FrancescoM
Contributor
Contributor

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(){    //GET CLICKED BUTTON
},
}).render('#paypal-button-container');

Is there a way to get the clicked button when the "onClick" event occurs?? 

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.