-
Notifications
You must be signed in to change notification settings - Fork 8
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
Card type should be called scheme #65
base: develop
Are you sure you want to change the base?
Conversation
@@ -66,7 +66,7 @@ use Adyen\Hyva\Magewire\Payment\Method\CreditCard; | |||
creditCardHandler.setCreditCardType(creditCardHandler.getCcCodeByAltCode(state.brand)); | |||
}, | |||
name: '<?= $escaper->escapeJs($magewire->getConfiguration()->getValue('adyenCc/title')) ?>', | |||
type: "card", | |||
type: "scheme", |
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.
This field is used for rendering Card Component and this type should be card
. Please refer to configuration section v5.x.x or earlier on Card Component documentation.
@@ -74,7 +74,7 @@ private function isMethodAvailable($method, $configuredKeys): bool | |||
private function collectMethodCodeWithoutPrefix($methodCode): string | |||
{ | |||
if ($methodCode == CreditCard::METHOD_CC) { | |||
return 'card'; | |||
return 'scheme'; |
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.
As paymentMethodsExtraDetails
value has been used on line 46 in the same file, this value should stay as card
. Because paymentMethodsExtraDetails
returns key card
for scheme payments in the Adyen_Payment module here.
Summary
The credit-card payment method did not show up for me. It seems like that is because the response from /paymentMethods gives the cards with the 'scheme' type payment method.
It seems that the adyen-magento2 module has a map for this case here.
I also noticed that the test had a key for
paymentMethods
return. But in my case it did not return thepaymentMethods
with a key...Tested scenarios
Open checkout and see if the cards payment method shows up.
It didn't before now it does.
Fixes #66
Versions used