[ECP-9940] Fix missing countryId for virtual product payments#3282
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical issue where the Adyen checkout component failed to mount for virtual product payments due to the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors several Adyen payment method renderer files (adyen-cc-method.js, adyen-cc-vault-method.js, adyen-pm-method.js, adyen-giftcard-method.js) and the giftcard-form.html template. The primary goal is to ensure Adyen checkout components are only built or gift card forms displayed when the billing address and its country ID are available, introducing conditional component creation and subscriptions to quote.billingAddress. However, the review identified several issues: the adyen-pm-method.js implementation lacks the necessary subscription to billingAddressObservable to create the component when the country ID becomes available, which is a critical bug. Additionally, the subscriptions in adyen-cc-method.js and adyen-cc-vault-method.js are not disposed, potentially causing memory leaks and unexpected behavior. Finally, the billingAddressAvailable observable in adyen-giftcard-method.js is not reactive and may prevent the gift card form from being displayed if the billing address is not initially present.
|



Description
It has been observed that the plugin was unable to mount the checkout component due to missing
countryIdwhile initiating a payment method. The root cause behind was the billing address assignment is delayed and payment methods used to be rendered earlier.With this fix, the plugin observes the
countryIdbefore mounting the checkout component.Tested scenarios
Following cases manually testes for both virtual and standard products with guest and logged-in shoppers.
Fixes #3270