We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 30110565 authored by rikterbeek's avatar rikterbeek

minor fixes and update version for new release

parent 1eb3c4f4
{ {
"name": "adyen/module-payment", "name": "adyen/module-payment",
"description": "Official Magento2 Plugin to connect to Payment Service Provider Adyen.", "description": "Official Magento2 Plugin to connect to Payment Service Provider Adyen.",
"type": "magento2-module", "type": "magento2-module",
"version": "1.1.2", "version": "1.1.3",
"license": [ "license": [
"OSL-3.0", "OSL-3.0",
"AFL-3.0" "AFL-3.0"
......
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
* Author: Adyen <magento@adyen.com> * Author: Adyen <magento@adyen.com>
*/ */
--> -->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Checkout\Model\CompositeConfigProvider"> <type name="Magento\Checkout\Model\CompositeConfigProvider">
<arguments> <arguments>
<argument name="configProviders" xsi:type="array"> <argument name="configProviders" xsi:type="array">
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
--> -->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Adyen_Payment" setup_version="1.1.2"> <module name="Adyen_Payment" setup_version="1.1.3">
<sequence> <sequence>
<module name="Magento_Sales"/> <module name="Magento_Sales"/>
<module name="Magento_Quote"/> <module name="Magento_Quote"/>
......
...@@ -29,10 +29,9 @@ define( ...@@ -29,10 +29,9 @@ define(
'Adyen_Payment/js/action/set-payment-method', 'Adyen_Payment/js/action/set-payment-method',
'Magento_Checkout/js/action/select-payment-method', 'Magento_Checkout/js/action/select-payment-method',
'Magento_Checkout/js/model/quote', 'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/checkout-data', 'Magento_Checkout/js/checkout-data'
'Magento_Checkout/js/model/full-screen-loader',
], ],
function (ko, $, Component, setPaymentMethodAction, selectPaymentMethodAction,quote, checkoutData, fullScreenLoader) { function (ko, $, Component, setPaymentMethodAction, selectPaymentMethodAction,quote, checkoutData) {
'use strict'; 'use strict';
var brandCode = ko.observable(null); var brandCode = ko.observable(null);
var paymentMethod = ko.observable(null); var paymentMethod = ko.observable(null);
...@@ -51,6 +50,36 @@ define( ...@@ -51,6 +50,36 @@ define(
]); ]);
return this; return this;
}, },
getAdyenHppPaymentMethods: function() {
var self = this;
// convert to list so you can iterate
var paymentList = _.map(window.checkoutConfig.payment.adyenHpp.paymentMethods, function(value, key) {
if(key == "ideal") {
return {
'value': key,
'name': value,
'method': self.item.method,
'issuerIds': value.issuers,
'issuerId': ko.observable(null),
getCode: function() {
return self.item.method;
}
}
} else {
return {
'value': key,
'name': value,
'method': self.item.method,
getCode: function() {
return self.item.method;
}
}
}
}
);
return paymentList;
},
/** Redirect to adyen */ /** Redirect to adyen */
continueToAdyen: function () { continueToAdyen: function () {
//update payment method information if additional data was changed //update payment method information if additional data was changed
...@@ -86,36 +115,6 @@ define( ...@@ -86,36 +115,6 @@ define(
setPaymentMethodAction(); setPaymentMethodAction();
return false; return false;
}, },
getAdyenHppPaymentMethods: function() {
var self = this;
// convert to list so you can iterate
var paymentList = _.map(window.checkoutConfig.payment.adyenHpp.paymentMethods, function(value, key) {
if(key == "ideal") {
return {
'value': key,
'name': value,
'method': self.item.method,
'issuerIds': value.issuers,
'issuerId': ko.observable(null),
getCode: function() {
return self.item.method;
}
}
} else {
return {
'value': key,
'name': value,
'method': self.item.method,
getCode: function() {
return self.item.method;
}
}
}
}
);
return paymentList;
},
selectPaymentMethodBrandCode: function() { selectPaymentMethodBrandCode: function() {
var self = this; var self = this;
...@@ -124,7 +123,6 @@ define( ...@@ -124,7 +123,6 @@ define(
"method": self.method, "method": self.method,
"po_number": null, "po_number": null,
"additional_data": { "additional_data": {
//brand_code: this.brandCode()
brand_code: self.value, brand_code: self.value,
} }
}; };
......
...@@ -23,14 +23,10 @@ ...@@ -23,14 +23,10 @@
--> -->
<!-- ko ifnot: (isPaymentMethodSelectionOnAdyen())--> <!-- ko ifnot: (isPaymentMethodSelectionOnAdyen())-->
<!-- ko foreach: getAdyenHppPaymentMethods() --> <!-- ko foreach: getAdyenHppPaymentMethods() -->
<div class="payment-method" data-bind="css: {'_active': (value == $parent.isBrandCodeChecked())}"> <div class="payment-method" data-bind="css: {'_active': (value == $parent.isBrandCodeChecked())}">
<div class="payment-method-title field choice"> <div class="payment-method-title field choice">
<input type="radio" <input type="radio"
name="payment[method]" name="payment[method]"
class="radio" class="radio"
...@@ -38,13 +34,11 @@ ...@@ -38,13 +34,11 @@
<label data-bind="attr: {'for': value}" class="label"> <label data-bind="attr: {'for': value}" class="label">
<!-- ko if: name.icon --> <!-- ko if: name.icon -->
<img data-bind="attr: { <img data-bind="attr: {
'src': name.icon.url, 'src': name.icon.url,
'width': name.icon.url.width, 'width': name.icon.url.width,
'height': name.icon.url.height 'height': name.icon.url.height
}"> }">
<!--/ko--> <!--/ko-->
<span data-bind="text: name.title"></span> <span data-bind="text: name.title"></span>
......
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