Showing results for 
Search instead for 
Did you mean: 

Prevent amount tempering with checkout.js

New Community Member

Prevent amount tempering with checkout.js



I'm integrating a simple payment with checkout.js, the amount of the payment will be dynamic according to the product selected from the same page.

How can I prevent amount tempering when the user checkout? Apparently the total amount can be easily changed from the JS console.




var totalAmt = 200; // change according to selection


// Set up a payment
payment: function ( data, actions ) {
return actions.payment.create( {

transactions: [ {
  amount: {
    currency: 'USD'
item_list: {
  items: itemsVariable

} ]
} );





Tags (2)