Prevent race condition and make operation atomic
StillFantastic opened this issue · comments
Bill Hsu commented
e.g. potential race condition when trying to send token.
HuangJyunYu commented
We could disable the submit button, like in Zhushan as below:
<script>
$(document).ready(function () {
$("#pay_form").submit(function (e) {
//disable the submit button
$("#submit").attr("disabled", true);
return true;
});
});
</script>