We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday 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",
"description": "Official Magento2 Plugin to connect to Payment Service Provider Adyen.",
"type": "magento2-module",
"version": "1.1.2",
"version": "1.1.3",
"license": [
"OSL-3.0",
"AFL-3.0"
......
......@@ -22,7 +22,8 @@
* 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">
<arguments>
<argument name="configProviders" xsi:type="array">
......
......@@ -24,7 +24,7 @@
-->
<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>
<module name="Magento_Sales"/>
<module name="Magento_Quote"/>
......
......@@ -29,10 +29,9 @@ define(
'Adyen_Payment/js/action/set-payment-method',
'Magento_Checkout/js/action/select-payment-method',
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/checkout-data',
'Magento_Checkout/js/model/full-screen-loader',
'Magento_Checkout/js/checkout-data'
],
function (ko, $, Component, setPaymentMethodAction, selectPaymentMethodAction,quote, checkoutData, fullScreenLoader) {
function (ko, $, Component, setPaymentMethodAction, selectPaymentMethodAction,quote, checkoutData) {
'use strict';
var brandCode = ko.observable(null);
var paymentMethod = ko.observable(null);
......@@ -51,6 +50,36 @@ define(
]);
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 */
continueToAdyen: function () {
//update payment method information if additional data was changed
......@@ -86,36 +115,6 @@ define(
setPaymentMethodAction();
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() {
var self = this;
......@@ -124,7 +123,6 @@ define(
"method": self.method,
"po_number": null,
"additional_data": {
//brand_code: this.brandCode()
brand_code: self.value,
}
};
......
......@@ -23,14 +23,10 @@
-->
<!-- ko ifnot: (isPaymentMethodSelectionOnAdyen())-->
<!-- ko foreach: getAdyenHppPaymentMethods() -->
<div class="payment-method" data-bind="css: {'_active': (value == $parent.isBrandCodeChecked())}">
<div class="payment-method-title field choice">
<input type="radio"
name="payment[method]"
class="radio"
......@@ -38,13 +34,11 @@
<label data-bind="attr: {'for': value}" class="label">
<!-- ko if: name.icon -->
<img data-bind="attr: {
'src': name.icon.url,
'width': name.icon.url.width,
'height': name.icon.url.height
}">
<!--/ko-->
<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