diff --git a/cartridges/app_adyen_SFRA/cartridge/client/default/js/adyenCheckout.js b/cartridges/app_adyen_SFRA/cartridge/client/default/js/adyenCheckout.js index c31f376ae..c76613323 100644 --- a/cartridges/app_adyen_SFRA/cartridge/client/default/js/adyenCheckout.js +++ b/cartridges/app_adyen_SFRA/cartridge/client/default/js/adyenCheckout.js @@ -27,10 +27,6 @@ $('#dwfrm_billing').submit(function apiRequest(e) { }); }); setCheckoutConfiguration(); -if (window.cardholderNameBool !== 'null') { - store.checkoutConfiguration.paymentMethodsConfiguration.card.hasHolderName = true; - store.checkoutConfiguration.paymentMethodsConfiguration.card.holderNameRequired = true; -} if (window.googleMerchantID !== 'null' && window.Configuration.environment.includes('live')) { var id = 'merchantId'; store.checkoutConfiguration.paymentMethodsConfiguration.paywithgoogle.configuration[id] = window.googleMerchantID; diff --git a/cartridges/app_adyen_SFRA/cartridge/static/default/js/adyenCheckout.js b/cartridges/app_adyen_SFRA/cartridge/static/default/js/adyenCheckout.js index 2d062aa15..a2f509b68 100644 --- a/cartridges/app_adyen_SFRA/cartridge/static/default/js/adyenCheckout.js +++ b/cartridges/app_adyen_SFRA/cartridge/static/default/js/adyenCheckout.js @@ -94,7 +94,7 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nvar store = __webpack_require__(/*! ../../../store */ \"./cartridges/app_adyen_SFRA/cartridge/store/index.js\");\nvar _require = __webpack_require__(/*! ./adyen_checkout/renderGenericComponent */ \"./cartridges/app_adyen_SFRA/cartridge/client/default/js/adyen_checkout/renderGenericComponent.js\"),\n renderGenericComponent = _require.renderGenericComponent;\nvar _require2 = __webpack_require__(/*! ./adyen_checkout/checkoutConfiguration */ \"./cartridges/app_adyen_SFRA/cartridge/client/default/js/adyen_checkout/checkoutConfiguration.js\"),\n setCheckoutConfiguration = _require2.setCheckoutConfiguration,\n actionHandler = _require2.actionHandler;\nvar _require3 = __webpack_require__(/*! ./adyen_checkout/helpers */ \"./cartridges/app_adyen_SFRA/cartridge/client/default/js/adyen_checkout/helpers.js\"),\n assignPaymentMethodValue = _require3.assignPaymentMethodValue,\n showValidation = _require3.showValidation,\n paymentFromComponent = _require3.paymentFromComponent;\nvar _require4 = __webpack_require__(/*! ./adyen_checkout/validateComponents */ \"./cartridges/app_adyen_SFRA/cartridge/client/default/js/adyen_checkout/validateComponents.js\"),\n validateComponents = _require4.validateComponents;\n$('#dwfrm_billing').submit(function apiRequest(e) {\n e.preventDefault();\n var form = $(this);\n var url = form.attr('action');\n $.ajax({\n type: 'POST',\n url: url,\n data: form.serialize(),\n async: false,\n success: function success(data) {\n store.formErrorsExist = 'fieldErrors' in data;\n }\n });\n});\nsetCheckoutConfiguration();\nif (window.cardholderNameBool !== 'null') {\n store.checkoutConfiguration.paymentMethodsConfiguration.card.hasHolderName = true;\n store.checkoutConfiguration.paymentMethodsConfiguration.card.holderNameRequired = true;\n}\nif (window.googleMerchantID !== 'null' && window.Configuration.environment.includes('live')) {\n var id = 'merchantId';\n store.checkoutConfiguration.paymentMethodsConfiguration.paywithgoogle.configuration[id] = window.googleMerchantID;\n store.checkoutConfiguration.paymentMethodsConfiguration.googlepay.configuration[id] = window.googleMerchantID;\n}\n\n// Submit the payment\n$('button[value=\"submit-payment\"]').on('click', function () {\n if (store.paypalTerminatedEarly) {\n paymentFromComponent({\n cancelTransaction: true,\n merchantReference: document.querySelector('#merchantReference').value\n });\n store.paypalTerminatedEarly = false;\n }\n if (document.querySelector('#selectedPaymentOption').value === 'AdyenPOS') {\n document.querySelector('#terminalId').value = document.querySelector('#terminalList').value;\n }\n if (document.querySelector('#selectedPaymentOption').value === 'AdyenComponent' || document.querySelector('#selectedPaymentOption').value === 'CREDIT_CARD') {\n assignPaymentMethodValue();\n validateComponents();\n return showValidation();\n }\n return true;\n});\nmodule.exports = {\n renderGenericComponent: renderGenericComponent,\n actionHandler: actionHandler\n};\n\n//# sourceURL=webpack:///./cartridges/app_adyen_SFRA/cartridge/client/default/js/adyenCheckout.js?"); +eval("\n\nvar store = __webpack_require__(/*! ../../../store */ \"./cartridges/app_adyen_SFRA/cartridge/store/index.js\");\nvar _require = __webpack_require__(/*! ./adyen_checkout/renderGenericComponent */ \"./cartridges/app_adyen_SFRA/cartridge/client/default/js/adyen_checkout/renderGenericComponent.js\"),\n renderGenericComponent = _require.renderGenericComponent;\nvar _require2 = __webpack_require__(/*! ./adyen_checkout/checkoutConfiguration */ \"./cartridges/app_adyen_SFRA/cartridge/client/default/js/adyen_checkout/checkoutConfiguration.js\"),\n setCheckoutConfiguration = _require2.setCheckoutConfiguration,\n actionHandler = _require2.actionHandler;\nvar _require3 = __webpack_require__(/*! ./adyen_checkout/helpers */ \"./cartridges/app_adyen_SFRA/cartridge/client/default/js/adyen_checkout/helpers.js\"),\n assignPaymentMethodValue = _require3.assignPaymentMethodValue,\n showValidation = _require3.showValidation,\n paymentFromComponent = _require3.paymentFromComponent;\nvar _require4 = __webpack_require__(/*! ./adyen_checkout/validateComponents */ \"./cartridges/app_adyen_SFRA/cartridge/client/default/js/adyen_checkout/validateComponents.js\"),\n validateComponents = _require4.validateComponents;\n$('#dwfrm_billing').submit(function apiRequest(e) {\n e.preventDefault();\n var form = $(this);\n var url = form.attr('action');\n $.ajax({\n type: 'POST',\n url: url,\n data: form.serialize(),\n async: false,\n success: function success(data) {\n store.formErrorsExist = 'fieldErrors' in data;\n }\n });\n});\nsetCheckoutConfiguration();\nif (window.googleMerchantID !== 'null' && window.Configuration.environment.includes('live')) {\n var id = 'merchantId';\n store.checkoutConfiguration.paymentMethodsConfiguration.paywithgoogle.configuration[id] = window.googleMerchantID;\n store.checkoutConfiguration.paymentMethodsConfiguration.googlepay.configuration[id] = window.googleMerchantID;\n}\n\n// Submit the payment\n$('button[value=\"submit-payment\"]').on('click', function () {\n if (store.paypalTerminatedEarly) {\n paymentFromComponent({\n cancelTransaction: true,\n merchantReference: document.querySelector('#merchantReference').value\n });\n store.paypalTerminatedEarly = false;\n }\n if (document.querySelector('#selectedPaymentOption').value === 'AdyenPOS') {\n document.querySelector('#terminalId').value = document.querySelector('#terminalList').value;\n }\n if (document.querySelector('#selectedPaymentOption').value === 'AdyenComponent' || document.querySelector('#selectedPaymentOption').value === 'CREDIT_CARD') {\n assignPaymentMethodValue();\n validateComponents();\n return showValidation();\n }\n return true;\n});\nmodule.exports = {\n renderGenericComponent: renderGenericComponent,\n actionHandler: actionHandler\n};\n\n//# sourceURL=webpack:///./cartridges/app_adyen_SFRA/cartridge/client/default/js/adyenCheckout.js?"); /***/ }), diff --git a/cartridges/app_adyen_SFRA/cartridge/static/default/js/checkout.js b/cartridges/app_adyen_SFRA/cartridge/static/default/js/checkout.js index 87e7347f5..3439a32a4 100644 --- a/cartridges/app_adyen_SFRA/cartridge/static/default/js/checkout.js +++ b/cartridges/app_adyen_SFRA/cartridge/static/default/js/checkout.js @@ -238,7 +238,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(f /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nvar store = __webpack_require__(/*! ../../../store */ \"./cartridges/app_adyen_SFRA/cartridge/store/index.js\");\nvar _require = __webpack_require__(/*! ./adyen_checkout/renderGenericComponent */ \"./cartridges/app_adyen_SFRA/cartridge/client/default/js/adyen_checkout/renderGenericComponent.js\"),\n renderGenericComponent = _require.renderGenericComponent;\nvar _require2 = __webpack_require__(/*! ./adyen_checkout/checkoutConfiguration */ \"./cartridges/app_adyen_SFRA/cartridge/client/default/js/adyen_checkout/checkoutConfiguration.js\"),\n setCheckoutConfiguration = _require2.setCheckoutConfiguration,\n actionHandler = _require2.actionHandler;\nvar _require3 = __webpack_require__(/*! ./adyen_checkout/helpers */ \"./cartridges/app_adyen_SFRA/cartridge/client/default/js/adyen_checkout/helpers.js\"),\n assignPaymentMethodValue = _require3.assignPaymentMethodValue,\n showValidation = _require3.showValidation,\n paymentFromComponent = _require3.paymentFromComponent;\nvar _require4 = __webpack_require__(/*! ./adyen_checkout/validateComponents */ \"./cartridges/app_adyen_SFRA/cartridge/client/default/js/adyen_checkout/validateComponents.js\"),\n validateComponents = _require4.validateComponents;\n$('#dwfrm_billing').submit(function apiRequest(e) {\n e.preventDefault();\n var form = $(this);\n var url = form.attr('action');\n $.ajax({\n type: 'POST',\n url: url,\n data: form.serialize(),\n async: false,\n success: function success(data) {\n store.formErrorsExist = 'fieldErrors' in data;\n }\n });\n});\nsetCheckoutConfiguration();\nif (window.cardholderNameBool !== 'null') {\n store.checkoutConfiguration.paymentMethodsConfiguration.card.hasHolderName = true;\n store.checkoutConfiguration.paymentMethodsConfiguration.card.holderNameRequired = true;\n}\nif (window.googleMerchantID !== 'null' && window.Configuration.environment.includes('live')) {\n var id = 'merchantId';\n store.checkoutConfiguration.paymentMethodsConfiguration.paywithgoogle.configuration[id] = window.googleMerchantID;\n store.checkoutConfiguration.paymentMethodsConfiguration.googlepay.configuration[id] = window.googleMerchantID;\n}\n\n// Submit the payment\n$('button[value=\"submit-payment\"]').on('click', function () {\n if (store.paypalTerminatedEarly) {\n paymentFromComponent({\n cancelTransaction: true,\n merchantReference: document.querySelector('#merchantReference').value\n });\n store.paypalTerminatedEarly = false;\n }\n if (document.querySelector('#selectedPaymentOption').value === 'AdyenPOS') {\n document.querySelector('#terminalId').value = document.querySelector('#terminalList').value;\n }\n if (document.querySelector('#selectedPaymentOption').value === 'AdyenComponent' || document.querySelector('#selectedPaymentOption').value === 'CREDIT_CARD') {\n assignPaymentMethodValue();\n validateComponents();\n return showValidation();\n }\n return true;\n});\nmodule.exports = {\n renderGenericComponent: renderGenericComponent,\n actionHandler: actionHandler\n};\n\n//# sourceURL=webpack:///./cartridges/app_adyen_SFRA/cartridge/client/default/js/adyenCheckout.js?"); +eval("\n\nvar store = __webpack_require__(/*! ../../../store */ \"./cartridges/app_adyen_SFRA/cartridge/store/index.js\");\nvar _require = __webpack_require__(/*! ./adyen_checkout/renderGenericComponent */ \"./cartridges/app_adyen_SFRA/cartridge/client/default/js/adyen_checkout/renderGenericComponent.js\"),\n renderGenericComponent = _require.renderGenericComponent;\nvar _require2 = __webpack_require__(/*! ./adyen_checkout/checkoutConfiguration */ \"./cartridges/app_adyen_SFRA/cartridge/client/default/js/adyen_checkout/checkoutConfiguration.js\"),\n setCheckoutConfiguration = _require2.setCheckoutConfiguration,\n actionHandler = _require2.actionHandler;\nvar _require3 = __webpack_require__(/*! ./adyen_checkout/helpers */ \"./cartridges/app_adyen_SFRA/cartridge/client/default/js/adyen_checkout/helpers.js\"),\n assignPaymentMethodValue = _require3.assignPaymentMethodValue,\n showValidation = _require3.showValidation,\n paymentFromComponent = _require3.paymentFromComponent;\nvar _require4 = __webpack_require__(/*! ./adyen_checkout/validateComponents */ \"./cartridges/app_adyen_SFRA/cartridge/client/default/js/adyen_checkout/validateComponents.js\"),\n validateComponents = _require4.validateComponents;\n$('#dwfrm_billing').submit(function apiRequest(e) {\n e.preventDefault();\n var form = $(this);\n var url = form.attr('action');\n $.ajax({\n type: 'POST',\n url: url,\n data: form.serialize(),\n async: false,\n success: function success(data) {\n store.formErrorsExist = 'fieldErrors' in data;\n }\n });\n});\nsetCheckoutConfiguration();\nif (window.googleMerchantID !== 'null' && window.Configuration.environment.includes('live')) {\n var id = 'merchantId';\n store.checkoutConfiguration.paymentMethodsConfiguration.paywithgoogle.configuration[id] = window.googleMerchantID;\n store.checkoutConfiguration.paymentMethodsConfiguration.googlepay.configuration[id] = window.googleMerchantID;\n}\n\n// Submit the payment\n$('button[value=\"submit-payment\"]').on('click', function () {\n if (store.paypalTerminatedEarly) {\n paymentFromComponent({\n cancelTransaction: true,\n merchantReference: document.querySelector('#merchantReference').value\n });\n store.paypalTerminatedEarly = false;\n }\n if (document.querySelector('#selectedPaymentOption').value === 'AdyenPOS') {\n document.querySelector('#terminalId').value = document.querySelector('#terminalList').value;\n }\n if (document.querySelector('#selectedPaymentOption').value === 'AdyenComponent' || document.querySelector('#selectedPaymentOption').value === 'CREDIT_CARD') {\n assignPaymentMethodValue();\n validateComponents();\n return showValidation();\n }\n return true;\n});\nmodule.exports = {\n renderGenericComponent: renderGenericComponent,\n actionHandler: actionHandler\n};\n\n//# sourceURL=webpack:///./cartridges/app_adyen_SFRA/cartridge/client/default/js/adyenCheckout.js?"); /***/ }), diff --git a/cartridges/app_adyen_SFRA/cartridge/templates/default/checkout/billing/adyenComponentForm.isml b/cartridges/app_adyen_SFRA/cartridge/templates/default/checkout/billing/adyenComponentForm.isml index 5a27ed48f..b0e84e55c 100644 --- a/cartridges/app_adyen_SFRA/cartridge/templates/default/checkout/billing/adyenComponentForm.isml +++ b/cartridges/app_adyen_SFRA/cartridge/templates/default/checkout/billing/adyenComponentForm.isml @@ -58,7 +58,6 @@