进行付款交易时禁用后退按钮 [英] Disable back button while payment transaction occurs

查看:127
本文介绍了进行付款交易时禁用后退按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个XHTML页面,该页面在成功支付信用卡后会被调用.但是,当用户按下后退"按钮时,他又被充电了.当他按下退格键或后退键时,通过禁用后退键或使他的会话无效,我该如何解决这个问题.

I have an XHTML page which is called after a successful credit card payment. But when the user hits the back button, he's charged again. How can I handle the issue, by either disabling the back button or invalidating his session when he hits back space or back button.

我正在使用Spring3/JSF,但是此问题与本参考文件无关,因为这是浏览器问题.

I am using Spring3/JSF but this problem has no relevance to this reference as this is a browser issue.

推荐答案

那是错误的设计.不要试图操纵客户做坏事-防止客户能够做坏事.

Thats the wrong design. Don't try to manipulate the client from doing bad things - prevent the client from being able to do bad things.

在这种情况下,为每个交易使用唯一的令牌,这样,如果用户单击并重新提交交易,交易将被拒绝,并可以通知用户交易已经通过.

Case in point, use a unique token for each transaction so that if the user clicks back and resubmits the transaction it will be rejected and the user can be notified that the transaction has already gone through.

这篇关于进行付款交易时禁用后退按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆