Openbravo Issue Tracking System - POS2
View Issue Details
0050844POS2POSpublic2022-11-10 16:342022-11-14 12:32
cberner 
cberner 
normalmajorhave not tried
closedfixed 
5
 
22Q4.122Q4.1 
No
0050844: Possible to pay twice by clicking fast enough on OK button on payment
It is possible to pay twice the current ticket, and if the payment method is configured to also complete the ticket, this will result in two tickets being sent to backend, which results in Error while importing for duplicated ticket.

Check the screenshot to understand where the double click may happen.
1. Login WebPOS with some payment method with payment provider, I've tested it with Credit Card - Mastercard payment provider.
2. Add a product to the ticket and go to Payments
3. Try to add credit card payment, then click 2 times in OK, check that it has been executed twice.
Don't allow double clicking on this button.
No tags attached.
blocks defect 0050843 closed cberner Possible to pay twice by clicking fast enough on OK button on payment 
Issue History
2022-11-10 16:44guilleaerTypedefect => backport
2022-11-10 16:44guilleaerTarget Version => 22Q4.1
2022-11-14 12:29hgbotNote Added: 0143528
2022-11-14 12:32hgbotResolutionopen => fixed
2022-11-14 12:32hgbotStatusscheduled => closed
2022-11-14 12:32hgbotNote Added: 0143533
2022-11-14 12:32hgbotFixed in Version => 22Q4.1
2022-11-14 12:32hgbotNote Added: 0143534

Notes
(0143528)
hgbot   
2022-11-14 12:29   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1361 [^]
(0143533)
hgbot   
2022-11-14 12:32   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1361 [^]
(0143534)
hgbot   
2022-11-14 12:32   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: c41a21fdaf6e92edda03fbfee77b19800a364608
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 14-11-2022 12:29:07
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/c41a21fdaf6e92edda03fbfee77b19800a364608 [^]

Fixes ISSUE-50844: Possible to pay twice by clicking fast enough on OK button on payment

Dialog on payments for confirmation for process provider allowed
clicking on the OK or Cancel button twice, because there was no check
that disabled it. Now it is only allowed to be clicked if the dialog has
not been closed, so it is impossible to click it twice and process twice
the resolve or close dialog functions.

---
M web-jspack/org.openbravo.pos2/src/components/Payments/PaymentIntegration/ConfirmProcessProvider.jsx
---