Commit 199f3f7c authored by attilak's avatar attilak

Add adyen-configuration js

parent 935f8042
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment module (https://www.adyen.com/)
*
* Copyright (c) 2015 Adyen BV (https://www.adyen.com/)
* See LICENSE.txt for license details.
*
* Author: Adyen <magento@adyen.com>
*/
define(
[
],
function () {
'use strict';
return {
getOriginKey: function () {
return window.checkoutConfig.payment.adyenCc.originKey;
},
showLogo: function () {
return window.checkoutConfig.payment.adyen.showLogo;
},
getLocale: function () {
return window.checkoutConfig.payment.adyenCc.locale;
},
getCheckoutEnvironment: function () {
return window.checkoutConfig.payment.adyenCc.checkoutEnvironment;
},
};
}
);
\ No newline at end of file
...@@ -40,8 +40,8 @@ define( ...@@ -40,8 +40,8 @@ define(
'Adyen_Payment/js/model/threeds2', 'Adyen_Payment/js/model/threeds2',
'Magento_Checkout/js/model/error-processor', 'Magento_Checkout/js/model/error-processor',
'Adyen_Payment/js/model/adyen-payment-service', 'Adyen_Payment/js/model/adyen-payment-service',
'adyenCheckout', 'Adyen_Payment/js/bundle',
'Adyen_Payment/js/bundle' 'Adyen_Payment/js/model/adyen-configuration',
], ],
function ( function (
$, $,
...@@ -64,7 +64,7 @@ define( ...@@ -64,7 +64,7 @@ define(
errorProcessor, errorProcessor,
adyenPaymentService, adyenPaymentService,
AdyenCheckout, AdyenCheckout,
AdyenComponent adyenConfiguration
) { ) {
'use strict'; 'use strict';
...@@ -92,9 +92,9 @@ define( ...@@ -92,9 +92,9 @@ define(
// initialize adyen component for general use // initialize adyen component for general use
this.checkout = new AdyenCheckout({ this.checkout = new AdyenCheckout({
locale: this.getLocale(), locale: adyenConfiguration.getLocale(),
originKey: this.getOriginKey(), originKey: adyenConfiguration.getOriginKey(),
environment: this.getCheckoutEnvironment() environment: adyenConfiguration.getCheckoutEnvironment()
}); });
return this; return this;
...@@ -472,15 +472,6 @@ define( ...@@ -472,15 +472,6 @@ define(
getCode: function () { getCode: function () {
return window.checkoutConfig.payment.adyenCc.methodCode; return window.checkoutConfig.payment.adyenCc.methodCode;
}, },
getOriginKey: function () {
return window.checkoutConfig.payment.adyen.originKey;
},
getCheckoutEnvironment: function () {
return window.checkoutConfig.payment.adyen.checkoutEnvironment;
},
getLocale: function () {
return window.checkoutConfig.payment.adyenCc.locale;
},
isActive: function () { isActive: function () {
return true; return true;
}, },
...@@ -501,7 +492,7 @@ define( ...@@ -501,7 +492,7 @@ define(
return true; return true;
}, },
showLogo: function () { showLogo: function () {
return window.checkoutConfig.payment.adyen.showLogo; return adyenConfiguration.showLogo();
}, },
getIcons: function (type) { getIcons: function (type) {
return window.checkoutConfig.payment.adyenCc.icons.hasOwnProperty(type) return window.checkoutConfig.payment.adyenCc.icons.hasOwnProperty(type)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment