You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases the Adyen webhook is executed when the payment method used for the order is not an Adyen method.
Indeed, if a customer makes a first attempt to pay with Adyen Apple Pay for example, then validate the order with another payment method (other than Adyen), the AUTHORIZATION webhook is executed and the order is put in pending status or canceled.
We have already had a few cases, especially when payment with Adyen Apple Pay fell through. Here are two examples:
To Reproduce
In our case, the bug has always occurred with Apple Pay, but the bug is probably present for other methods
Steps to reproduce the behavior:
Go to cart
Try payment with invalid Apple Pay card
The payment is refused
Try payment with another payment method like bank transfer
Wait the webhook AUTHORIZATION is executed
💥
Expected behavior
If the order is placed with a payment method that is not Adyen, the webhook must not be executed.
Looking at the function Adyen\Payment\Helper\Webhook::processNotification() there is no verification of the payment method used for the order, it is necessary to verify the payment method before executing the notification.
Magento version
2.4.7
Plugin version
9.8.0
The text was updated successfully, but these errors were encountered:
Thank you for reporting this case. It looks like valid issue but I have some questions before creating an internal ticket.
Ideally, we would except the previous order is discarded (and later cancelled by the webhook) and the new payment attempt would create a new order. Is that the case for you or is the logic different for non-Adyen payment method?
For Apple Pay and probably other methods, there is no order creation when payment fails. Thus, the ID increment generated in the quote table is used to create the order when the client tests with a new method after the first attempt has failed.
I think this is what happens in Magento:
Create new cart
Reservation of an increment_id in the quote table
First attempt to pay with Apple Pay
The quote.increment_id value is used as merchantReference by Adyen
The payment is refused and no order is created but the increment_id is still usable
New payment attempt
Order created with quote.increment_id
This is the code that allows you to reserve an increment_id in \Magento\Quote\Model\Quote::reserveOrderId()
And here is the code that makes the placeOrder, if the place does not work the order is not created : \Magento\Sales\Model\Service\OrderService::place()
Describe the bug
In some cases the Adyen webhook is executed when the payment method used for the order is not an Adyen method.
Indeed, if a customer makes a first attempt to pay with Adyen Apple Pay for example, then validate the order with another payment method (other than Adyen), the
AUTHORIZATION
webhook is executed and the order is put inpending
status or canceled.We have already had a few cases, especially when payment with Adyen Apple Pay fell through. Here are two examples:
To Reproduce
In our case, the bug has always occurred with
Apple Pay
, but the bug is probably present for other methodsSteps to reproduce the behavior:
AUTHORIZATION
is executedExpected behavior
If the order is placed with a payment method that is not Adyen, the webhook must not be executed.
Looking at the function
Adyen\Payment\Helper\Webhook::processNotification()
there is no verification of the payment method used for the order, it is necessary to verify the payment method before executing the notification.Magento version
2.4.7
Plugin version
9.8.0
The text was updated successfully, but these errors were encountered: