Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headless - allow 3D Secure check before placing the order #2857

Open
jsims281 opened this issue Jan 22, 2025 · 1 comment
Open

Headless - allow 3D Secure check before placing the order #2857

jsims281 opened this issue Jan 22, 2025 · 1 comment
Assignees
Labels
Enhancement Indicates a new feature request Needs more info Indicates that issue requires more info from its creator

Comments

@jsims281
Copy link

Is your feature request related to a problem? Please describe.
As the order gets created before 3D secure is done, if the user fails the check then they are left in a state where they have a "dead" order on in Magento, and a new, empty quote. They must now start again with an empty cart if they want to place an order. The merchant is also left with an order that will not be fulfilled but may be affecting stock levels. Possibly related issue: #1986

Describe the solution you'd like
Provide an end point in the Adyen extension to allow us to present the user with 3D secure checks before placing the order.

Describe alternatives you've considered

  • Modifying the Adyen M2 extension in-house, with patches or a private copy of the code
  • Side-stepping the Adyen M2 extension entirely and doing the payment without it, then creating the order using a placeholder payment method
@candemiralp
Copy link
Member

Hello @jsims281,

Thank you for raising this concern here. I can understand the extra overhead required to tackle down this kind of issues. However, we are trying to follow Magento's best practices while creating orders or payments.

As you may be aware of, Adyen has two-step payment flow for any non-3DS payments including cards, wallets, redirects etc. In order to identify the required action to complete the payment, the plugin makes a /payment attempt to Adyen, first. This API call is authorised directly if it's a non-3DS payment or returns the relevant action like IdentifyShopper, RedirectShopper etc.

Creating and handling this API call might be tricky as an orderId is required, stock needs to be reserved and quote needs to be converted to an order to prevent payments without orders (limbo situation). So, we decided to follow an order-first approach on our payments to be on the safe side.

We see there is an extra overhead if the cart is abandoned. OFFER_CLOSED webhook needs to be processed to cancel the order in this scenario. Besides that if you don't want wait for OFFER_CLOSED webhook, you can use Magento's order cancellation cron since the order state will be pending_payment for any order which requires an addition payment action. Please see this Adobe Commerce docs and check Set pending payment order lifetime section.

To get a bit more clarity on the issue that you've reported, could you please verify the followings on your end?

  • If the 3DS action is completed (either successfully or not), the order status will be updated.
    • If 3DS fails, the order will be cancelled and a new quote will be created with the previous items in it.
    • If 3DS is successfully completed, order status will be updated from pending_payment to pending and this order will wait for Authorisation webhook.
  • If the cart is abandoned after instantiating 3DS, order should be cancelled either by OFFER_CLOSED webhook or Magento's order cancellation cron after setting the correct timeout.

If any of the cases above fails, please let us know with clear steps to reproduce. So that, we can investigate the issue.

Best Regards,
Can

@candemiralp candemiralp self-assigned this Jan 27, 2025
@candemiralp candemiralp added the Needs more info Indicates that issue requires more info from its creator label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Indicates a new feature request Needs more info Indicates that issue requires more info from its creator
Projects
None yet
Development

No branches or pull requests

2 participants