Description
Payment canceled with multiple payment attempts
Steps to reproduce
- Make a first payment attempt that is refused
- Then make a second payment attempt which is accepted
Actual behavior
When a customer makes a first payment attempt that fails, then makes a second attempt that works, the order is sometimes canceled because the webhook of the first attempt is executed.
Here is an example of the bug :
- at 7:07 -
X5BDWNSMTT5FBHG6 : the customer makes a first payment which is refused because fraud
- at 7:07 : Adyen send webhook AUTHORISATION for PSP
X5BDWNSMTT5FBHG6 with success=false in body
- at 7:10 -
G632MTL5G45BS6H3 : the client makes a new payment again which is accepted
- at 7:10 : Adyen send webhook AUTHORISATION for PSP
G632MTL5G45BS6H3 with success=true in body
- at 7:12 : The notification for PSP
G632MTL5G45BS6H3 is executed
- at 7:19 : The notification for PSP
X5BDWNSMTT5FBHG6is executed
- at 7:19 : Order is canceled with
/cancel request to



Expected behavior
In this case, the order should not have been canceled since the second payment is valid.
When canceling the order, I think it is necessary to check that the PSP associated with the last payment is identical to the PSP used in the webhook.
Code snippet or screenshots (if applicable)
No response
Adyen Magento Plugin version
9.18.1
Magento version
2.4.7-p6
Operating System
None
Browser (if applicable)
No response
Additional context and logs
No response
Description
Payment canceled with multiple payment attempts
Steps to reproduce
Actual behavior
When a customer makes a first payment attempt that fails, then makes a second attempt that works, the order is sometimes canceled because the webhook of the first attempt is executed.
Here is an example of the bug :
X5BDWNSMTT5FBHG6: the customer makes a first payment which is refused because fraudX5BDWNSMTT5FBHG6withsuccess=falsein bodyG632MTL5G45BS6H3: the client makes a new payment again which is acceptedG632MTL5G45BS6H3withsuccess=truein bodyG632MTL5G45BS6H3is executedX5BDWNSMTT5FBHG6is executed/cancelrequest toExpected behavior
In this case, the order should not have been canceled since the second payment is valid.
When canceling the order, I think it is necessary to check that the PSP associated with the last payment is identical to the PSP used in the webhook.
Code snippet or screenshots (if applicable)
No response
Adyen Magento Plugin version
9.18.1
Magento version
2.4.7-p6
Operating System
None
Browser (if applicable)
No response
Additional context and logs
No response