I'm implementing a MasterCard payment gateway to a website. In the official guide, JavaScript is used to pass the amount to be charged, and to which merchant the money goes to.
It looks like a user can potentially change any of the values and have the gateway return a success message back to us.
Even the success message doesn't seem to have much details for revalidation.
I can't think of a way to prevent this other than somehow converting the JavaScript to server-side code.
Official guide: https://ap-gateway.mastercard.com/api/documentation/integrationGuidelines/hostedCheckout/integrationModelHostedCheckout.html