CC client charges twice when back is pressed

I have a custom shopping basket that credits a customer’s credit card twice when they click the back button. My thought is to make their basket empty when they click the back button. Any ideas would be highly appreciated.

+4
source share
1 answer

There are several ways to solve this problem:

  • Your form submits a unique GUID as a hidden form on the submit page. Your application then stores this GUID in a session object on the server. Before processing the payment, you can check if this value is set in the session.

  • Your application is not responsible for processing orders ... only storing order information in a database. Another application daemon on the server searches for orders awaiting processing on the server and processes them offline. The advantage here is that you will not have problems with the HTTP timeout, and also to fix the upgrade problem.

  • Post / Redirect / Get

+4
source

All Articles