I'm trying to make a Smart Checkout button in my website which is currently running 100% in client-side.
I pass an amount to the createOrder
function, based on the contents of the shopping cart, which is client-side. Now, I know that the amount can perfectly be tampered with, and PayPal would have no way of knowing that the customer is underpaying.
We are a small group of people and expect a low volume of sales, so we wouldn't have a problem detecting these underpayments and canceling the transaction (refunding the paid amount to the customer, and not shipping the item).
However, we would still have to pay PayPal fees, so this can be easily abused into making us (the seller) lose money.
Is there any way to make client-side PayPal Smart Checkout buttons, while also protecting myself from this kind of exploits?