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

getCardConfig() method sets selectedMethod to isValid = false, where selectedMethod is not credit card #1250

Open
mdimitrovosf opened this issue Feb 4, 2025 · 2 comments

Comments

@mdimitrovosf
Copy link

mdimitrovosf commented Feb 4, 2025

Describe the bug
The bug occurs inside adyen-salesforce-commerce-cloud-24.4.2, file path "src\cartridges\app_adyen_SFRA\cartridge\client\default\js\adyen_checkout\checkoutConfiguration.js" on line 28.

In case of list with payment methods, where credit card is not first payment method in the list, the first payment method in the list is being set as selectedMethod and marked as checked=true. After which on initialization, the getCardConfig() method executes, and on line 28, where it assigns the method variable, if none storedPaymentMethodId exists, then it selects the selectedMethod, which is the first one from the list.

If this is not the credit card, then method would come as which ever method is the first in the list and it will assign the isValid property to false, which will make it fail silently.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Checkout payment step. Make sure that Credit Card is not the first element in the rendered list of payment methods.
  2. Make sure the first payment method is selected.
  3. Proceed with payment.

Expected behavior
Payment should be able to proceed

Screenshots

Image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • Version 132.0.6834.160

Additional context
This has occured in a real life scenario with existing implementation concerning iDeal payment method

Workable fix applied:

Image

@AbhishekWadhwa
Copy link

Hi Adyen Team,

We experienced the same issue. Any ETA on the fix.

@zenit2001
Copy link
Contributor

Hi @mdimitrovosf and @AbhishekWadhwa ,

Thank you for reporting the issue.
We are already aware of the issue and have an internal ticket for solving it.
I will keep this issue updated once the fix is ready.

With kind regards,
Zenit
Adyen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants