Adyen / adyen-magento2

Adyen Payment plugin for Magento2
MIT License
150 stars 196 forks source link

[ECP-9092] - Remove redundant loadCheckoutComponent call on initialization to rely on observer updates #2611

Closed raoulritter closed 1 month ago

raoulritter commented 1 month ago

Description

This commit removes the immediate invocation of loadCheckoutComponent during the module initialization. The component will now rely solely on the observer's updates to trigger this function.

Tested scenarios

Tested the checkout process using both HPP and CC PMs.

Fixes

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

LexKoomen commented 1 month ago

Hee Adyen team, we just deployed our storefront with this release and found out that for a very few specific set of users the loader pops up for loading in the hpp-methods but that loader never disappears. The weird thing is that it is not related to accounts or browsers because logging in on their accounts couldnt reproduce the problem and opening an incognito also didn't solve the errors for the clients that have the problem.

By downgrading 1 bug version and reimplementing the hard loadComponent calls we fixed the issue.

Not sure yet if it is related to this specific version where the loadComponent calls are removed or that it is related to some other part of our codebase, but I thought it was good to know.

jansentjeu commented 1 week ago

Hello @raoulritter,

We have the same issue as @LexKoomen. This occurs sporadically because it depends on how quickly the payment methods are retrieved. If they are already retrieved before the subscribe is initialized, loadCheckoutComponent()/loadAdyenPaymentMethods() is no longer called. This causes the loader to remain visible and the payment methods are not loaded.

This issue caused a customer of ours to miss a lot of orders. Please roll back these changes.