Search code examples
webpayment-gatewaypaymentpayment-processing

How to prevent "back" button after success redirect from payment system?


I have payment form on my site and the following question:

When the user press "Purchase button", the payment form is opened on secure bank's page. When the user filled payment form and press "submit" hi get sms to confirm payment.

After success confirmation it will be redirected to success_url back to out shop.

The problem begins when user press back button in his browser because hi again receive sms confirmation.

How to prevent to send sms again?


Solution

  • The the POST/REDIRECT/GET method. Sending a 303 HTTP response will tell the browser to replace that page in its history and avoid re-sending the posted data.

    I can't post an example as I don't know what programming language you are using.