Hello All,
Traditional web development - OS11
When the end user opens the duplicate tab during the payment time, my application is allowing the end user to pay twice even though the payment in the first tab is successful.
Once the payment is successful in the first tab, I want the specific page to refresh automatically in the another tabs to prevent the end user to proceed to pay for the second time. That is, once the payment is successfully made in one tab, the "pay" button should not be visible for the end user in the other tabs.
But the "pay" button should be visible, if the first attempt of payment is failed.
Any help would be greatly appreciated. Thanks!
Regards,
Madhavan
Hi Madhavan,
Firstly, you will need to know the payment result (if it's successful or not) and check that value to determine the Enabled property of the Pay button. Its default value would be False, and when the payment is successful, would be turned to True.
I can think of 2 ways to refresh that value:
I would actually suggest that you check the status of the payment right before you proceed with the actual payment operation. So if it is already paid, you would not continue with the operation and show the user a warning message like "Payment already done".
The Pay button would not be disabled in that case, but it's more important to always check the payment status in backend before proceeding, anyway.
Hi Ozan,
Your idea of checking the payment status before proceeding with the payment process works.
Thanks!
Glad I could help!
Regards
Hi,
I hope you are doing well.
Set button property to "Ajax submit" and try once.
I hope this will work.
Kind Regards,
Ajit Kurane.
Hi Ajit,
I did as you mentioned and also I have made condition to check the status of the payment during the payment process.