-
Notifications
You must be signed in to change notification settings - Fork 212
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-9491] Refactor instantiating AdyenCheckout library and components #2770
base: main
Are you sure you want to change the base?
Conversation
4079d69
Quality Gate passedIssues Measures |
|
||
// installments | ||
let allInstallments = self.getAllInstallments(); | ||
this.installments(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@candemiralp I'm getting error from template cc-form.html
template related to undefined variable, if installments aren't set to 0 in defaults
defaults: {
template: 'Adyen_Payment/payment/cc-form',
installment: '', // keep it until the component implements installments
installments: 0,
orderId: 0, // TODO is this the best place to store it?
storeCc: false,
modalLabel: 'cc_actionModal'
},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
The plugin currently builds
AdyenCheckout
library object as much as the number of the payment methods enabled on the checkout and mounts all of the payment components at the same time after rendering the checkout.This results in delays on the checkout since
AdyenCheckout
library makes multiple calls tocheckoutshopper
endpoints after instantiation for collecting data for risk calculation. This causes a drastic performance degradation on the checkout page.Ideally,
AdyenCheckout
library object should be instantiated after a shopper selects an Adyen payment method. This PR introduces a refactoring which changes the logic of instantiating theAdyenCheckout
library and mount payment method components.Tested scenarios
checkoutshopper
checkoutshopper
checkoutshopper
endpoint is not called if no Adyen payment method is selectedFixes #2766
Fixes #2581