Hi i create a button with a dinamic total amount but the problem is when i want change the total if the total on mi car change, do you know how can i change this? paypal.Button.render({ env: 'production', // sandbox | production // PayPal Client IDs - replace with your own // Create a PayPal app: https://developer.paypal.com/developer/applications/create client: { sandbox: '*********************-*******', production: '*********************-*******' }, // Show the buyer a 'Pay Now' button in the checkout flow commit: true, // payment() is called when the button is clicked payment: function(data, actions) { // Make a call to the REST api to create the payment return actions.payment.create({ payment: { transactions: [ { amount: { total: data, currency: 'USD' } } ] } }); }, // onAuthorize() is called when the buyer approves the payment onAuthorize: function(data, actions) { // Make a call to the REST api to execute the payment return actions.payment.execute().then(function() { window.alert('Payment Complete!'); }); } }, '#buy_paypal');
... View more