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

Fix customer payments provided by Adyen #545

Merged
merged 5 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useNx": false,
"npmClient": "pnpm",
"version": "4.14.2",
"version": "4.14.3-beta.1",
"command": {
"version": {
"preid": "beta"
}
}
}
}
2 changes: 1 addition & 1 deletion packages/react-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@commercelayer/react-components",
"version": "4.14.2",
"version": "4.14.3-beta.1",
"description": "The Official Commerce Layer React Components",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,8 @@ export function AdyenPayment({
'Payment methods are not available. Please, check your Adyen configuration.'
)
}

const options = {
locale,
locale: order?.language_code ?? locale,
environment,
clientKey,
amount: {
Expand All @@ -369,13 +368,15 @@ export function AdyenPayment({
paymentMethodsResponse,
showPayButton: false,
paymentMethodsConfiguration: {
showStoredPaymentMethods: true,
// @ts-expect-error no type
showStoredPaymentMethods: paymentSource?.payment_methods?.storedPaymentMethods != null ?? false,
paypal: {
showPayButton: true,
style: styles?.paypal
},
card: {
enableStoreDetails: true,
// @ts-expect-error no type
enableStoreDetails: paymentSource?.payment_methods?.storedPaymentMethods != null ?? false,
styles: styles?.card,
holderNameRequired: false
}
Expand Down