-
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
cc_type is not set for adyen_cc payments #2872
Labels
Bug report
Indicates that issue has been marked as a possible bug
Comments
Changing the code to if (!empty($response['paymentMethod']['brand'])) {
$ccType = $this->adyenHelper->getMagentoCreditCartType(
$response['paymentMethod']['brand']
);
$payment->setAdditionalInformation('cc_type', $ccType);
$payment->setCcType($ccType);
} did in fact set the cc_type again as it used to. |
Interestingly I just compared with v8 and the code is the same. I also verified with the API explorer... it should work. So why do we get a different response? AdyenLoggerTest.INFO: Request to Adyen API /payments {
"apiVersion": "v71",
"body": {
"merchantAccount": "someAccount",
"shopperReference": "XXXX-XXXX-XXXX-XXXX-XXXX",
"shopperEmail": "[email protected]",
"telephoneNumber": "+49123456789",
"shopperName": {
"firstName": "Dev",
"lastName": "Test"
},
"countryCode": "DE",
"shopperLocale": "de_DE",
"shopperIP": "127.0.0.1",
"billingAddress": {
"street": "Some Street",
"postalCode": "12345",
"city": "Some City",
"houseNumberOrName": "1",
"country": "DE",
"stateOrProvince": "HES"
},
"deliveryAddress": {
"street": "Some Street",
"postalCode": "12345",
"city": "Some City",
"houseNumberOrName": "1",
"country": "DE",
"stateOrProvince": "HES"
},
"amount": {
"currency": "EUR",
"value": 9685
},
"reference": "123456789",
"fraudOffset": "0",
"browserInfo": {
"userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36",
"acceptHeader": "*/*",
"colorDepth": 24,
"language": "en-US",
"javaEnabled": false,
"screenHeight": 1080,
"screenWidth": 1920,
"timeZoneOffset": -60
},
"shopperInteraction": "Ecommerce",
"paymentMethod": {
"type": "scheme",
"holderName": "Someone",
"encryptedCardNumber": "XXXY",
"encryptedExpiryMonth": "XXX",
"encryptedExpiryYear": "XXX",
"encryptedSecurityCode": "XXX",
"brand": "visa",
"checkoutAttemptId": "XXX"
},
"riskData": {
"clientData": "XXX"
},
"additionalData": {
"allow3DS2": true
},
"returnUrl": "https://example.com/adyen/return?merchantReference=123456789",
"channel": "web",
"origin": "https://example.com/",
"applicationInfo": {
"Adyen\\Model\\Checkout\\ApplicationInfo": {
"adyenLibrary": {
"name": "adyen-php-api-library",
"version": "20.4.0"
},
"externalPlatform": {
"name": "Magento",
"version": "2.4.6-p8",
"integrator": "Adyen"
},
"merchantApplication": {
"name": "adyen-magento2",
"version": "9.12.2"
}
}
}
}
} AdyenLoggerTest.INFO: Response from Adyen API {
"body": {
"amount": {
"currency": "EUR",
"value": 9685
},
"merchantReference": "123456789",
"paymentMethod": {
"brand": "visa",
"type": "scheme"
},
"pspReference": "V2XXX",
"resultCode": "Authorised"
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When paying with a credit card the used card type is not saved in
sales_order_payment.cc_type
. This used to work in v8.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The card type is saved (VI for VISA).
Magento version
2.4.6-p8
Plugin version
9.12.2
Additional context
It seems the API endpoint might have changed.
adyen-magento2/Gateway/Validator/CheckoutResponseValidator.php
Line 136 in fa5a996
$response['additionalData']['paymentMethod']
but when I debug the response from the test instance is:The text was updated successfully, but these errors were encountered: