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

[ECP-8983] Incompatibility with amasty/module-single-step-checkout #2492

Open
mikimpe opened this issue Feb 7, 2024 · 1 comment
Open

[ECP-8983] Incompatibility with amasty/module-single-step-checkout #2492

mikimpe opened this issue Feb 7, 2024 · 1 comment
Assignees
Labels
Bug report Indicates that issue has been marked as a possible bug

Comments

@mikimpe
Copy link

mikimpe commented Feb 7, 2024

Describe the bug
After upgrading adyen/module-payment module from 8.17.0 to 9.0.7 we are having some issues with Amasty One Step Checkout.
If you go to the checkout page while logged in with an account that already has a default shipping address saved, initially, no Adyen payment methods will be visible. However, if you change the shipping address on the checkout page to another one already saved in the account or create a new one, Adyen payment methods will become visible at that point.
It seems that in the v9 Adyen payment methods initialization is bound to a function that is not called if the customer goes to the checkout with an address already selected.
In the 8.17.0 we don't have this issue.

To Reproduce
Steps to reproduce the behavior:

  1. Install Amasty One Step Checkout https://amasty.com/one-step-checkout-for-magento-2.html and configure it
  2. Create a customer account and set a default shipping address
  3. Go to the checkout
  4. Error: no Adyen payment methods visible

Expected behavior
You can see and use Adyen payment also without changing the shipping address on the checkout page

Magento version
2.4.5-p5

Plugin version
9.0.7

Additional context
If modifying https://github.com/Adyen/adyen-magento2/blob/develop/view/frontend/web/js/view/payment/adyen-methods.js initialize function from

            initialize: function () {
                this._super();

                // Virtual quote doesn't call payment-information or shipping-information endpoints.
                // payment-information endpoint should be called manually to fetch Adyen extension attributes.
                if (quote.isVirtual()) {
                    getPaymentInformation();
                }
            }

to

            initialize: function () {
                this._super();

                getPaymentInformation();
            }

the payment methods are visible and the payment process seems to work fine.

@mikimpe mikimpe added the Bug report Indicates that issue has been marked as a possible bug label Feb 7, 2024
@candemiralp candemiralp self-assigned this Feb 9, 2024
@candemiralp
Copy link
Member

Hello @mikimpe,

Thank you for creating this Github issue.

Our plugin requires response coming from Adyen's Checkout API's /paymentMethods endpoint response to mount the payment method components. This extra information is passed to extension_attributes of POST shipping-information or GET payment-information endpoints.

From the case you identified, shipping-information is skipped because that information has been set already. But, as I see GET payment-information is also skipped by One Step Checkout module (Default Luma template calls that endpoint if the shopper lands on the checkout page without shipping address selection). Therefore, our module can't obtain the required extra information for components.

The solution you provided can't be applied because it will end-up with making two redundant /paymentMethods call to Adyen's Checkout API. The plugin only calls GET payment-information endpoint by getPaymentInformation() function if it's a virtual quote. Because virtual quote doesn't have a shipping and doesn't call POST shipping-information.

We are going to investigate a potential solution to prevent this issue.

Best Regards,
Can

@candemiralp candemiralp changed the title Incompatibility with amasty/module-single-step-checkout [ECP-8983] Incompatibility with amasty/module-single-step-checkout Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug report Indicates that issue has been marked as a possible bug
Projects
None yet
Development

No branches or pull requests

2 participants