cancel
Showing results for 
Search instead for 
Did you mean: 

Is it secure to pass a variable Amount to a Smart PayPal Button using the client side integration?

Highlighted
Member

Is it secure to pass a variable Amount to a Smart PayPal Button using the client side integration?

Is it secure to pass a variable Amount to a Smart PayPal Button script?

If we assume that we have basic amount 100 and checkbox option, if user selects it, it will increase the total amount by 20 to become 120

 

var totalAmount = 100;

$('form').change(function(){

  totalAmount =+ $(this).find("input").val();

})
  
  
  
  paypal.Buttons({
    createOrder: function(data, actions) {
      // Set up the transaction
      return actions.order.create({
        purchase_units: [{
          amount: {
            value: totalAmount
          }
        }]
      });
    }
  }).render('#paypal-button-container');

It works fine and PayPal takes it as 120 and all okay, but is it secure enough ?  can somebody change the Amount  to 0 from PayPal script by the browser inspect tool or something like this .

 

Please advice, Many Thanks