Skip to content

Commit

Permalink
Extend payment method configuration page
Browse files Browse the repository at this point in the history
ISSUE: ADCRSET1G-17
  • Loading branch information
Tamara committed Apr 17, 2024
1 parent 4195177 commit d1e8ba2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/views/js/PaymentsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ if (!window.AdyenFE) {
* @typedef AdditionalDataConfig
* @property {boolean?} showLogos
* @property {boolean?} singleClickPayment
* @property {boolean?} clickToPay
* @property {boolean?} sendBasket
* @property {boolean?} installments
* @property {boolean?} installmentAmounts
Expand Down Expand Up @@ -776,6 +777,7 @@ if (!window.AdyenFE) {
config.additionalData = {
showLogos: true,
singleClickPayment: true,
clickToPay: true,
sendBasket: true,
installments: false,
installmentAmounts: false,
Expand Down Expand Up @@ -1074,6 +1076,7 @@ if (!window.AdyenFE) {
...generator.createFormFields([
getRadioField('creditCardFields', 'showLogos'),
getRadioField('creditCardFields', 'singleClickPayment'),
getRadioField('creditCardFields', 'clickToPay'),
getRadioField('creditCardFields', 'sendBasket')
])
);
Expand Down Expand Up @@ -1376,6 +1379,7 @@ if (!window.AdyenFE) {
'description',
'showLogos',
'singleClickPayment',
'clickToPay',
'merchantName',
'sendBasket',
'gatewayMerchantId',
Expand Down Expand Up @@ -1580,7 +1584,7 @@ if (!window.AdyenFE) {

if (changedMethod.paymentType === 'creditOrDebitCard') {
result.push(
...validateRequiredField(['showLogos', 'singleClickPayment', 'sendBasket', 'installmentAmounts'])
...validateRequiredField(['showLogos', 'singleClickPayment', 'clickToPay', 'sendBasket', 'installmentAmounts'])
);
} else if (changedMethod.code === 'applepay') {
result.push(...validateRequiredField(['merchantId', 'merchantName']));
Expand Down
4 changes: 4 additions & 0 deletions src/views/lang/en.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,10 @@
"label": "Enable single click payments",
"description": "Do you want shoppers to have the option to save their card details for future payments?"
},
"clickToPay": {
"label": "Enable Click to Pay",
"description": "Do you want shoppers to have the option to use Click to Pay? <a href=\"https://www.adyen.com/knowledge-hub/click-to-pay\" target=\"_blank\"><span>Learn more</span></a>"
},
"sendBasket": {
"label": "Enable L2/L3 data",
"description": "Do you want to send additional data to shopper's card statements? This is useful for companies to track corporate card usage when a single card can have multiple users. <a href=\"https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3\" target=\"_blank\"><span>Learn more</span></a>"
Expand Down

0 comments on commit d1e8ba2

Please sign in to comment.