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 6aec24ea authored by rikterbeek's avatar rikterbeek

added logo for adyen POS and not using a transparent gif to generate the size...

added logo for adyen POS and not using a transparent gif to generate the size but just a class with a css widht height definition with a sprite img background
parent 4875897a
......@@ -46,10 +46,10 @@ class AdyenGenericConfigProvider implements ConfigProviderInterface
* @var string[]
*/
protected $methodCodes = [
'adyen_cc',
'adyen_hpp',
'adyen_oneclick',
'adyen_pos'
\Adyen\Payment\Model\Method\Cc::METHOD_CODE,
\Adyen\Payment\Model\Method\Hpp::METHOD_CODE,
\Adyen\Payment\Model\Method\Oneclick::METHOD_CODE,
\Adyen\Payment\Model\Method\Pos::METHOD_CODE
];
/**
......@@ -110,6 +110,14 @@ class AdyenGenericConfigProvider implements ConfigProviderInterface
}
}
// show logos turned on by default
if($this->_genericConfig->showLogos()) {
$config['payment']['adyen']['showLogo'] = true;
} else {
$config['payment']['adyen']['showLogo'] = false;
}
return $config;
}
......
{
"name": "adyen/module-payment",
"description": "Official Magento2 Plugin to connect to Payment Service Provider Adyen.",
......
......@@ -26,17 +26,31 @@
.checkout-payment-method .ccard .holdername .input-text { width: 225px; }
.checkout-payment-method .payment-method-title, .checkout-payment-method .payment-method-title label {
display: -webkit-flex;
display: flex;
align-items: center;
-webkit-align-items: center;
}
.checkout-payment-method .payment-method-title label img { margin-right:10px;}
.checkout-payment-method .payment-method-title label img,
.checkout-payment-method .payment-method-title label div { padding-right:10px;}
.checkout-payment-method .payment-method-title label img.adyen_cc {
.checkout-payment-method .payment-method-title label div.adyen-sprite {
background:url(../images/logos/pm_gloss.png) no-repeat;
background-position: 0 -272px;
width:65px;
height:42px;
display: inline-block;
}
.checkout-payment-method .payment-method-title label div.adyen-sprite.adyen_cc {
background-position: 0 -272px;
}
.checkout-payment-method .payment-method-title label div.adyen-sprite.adyen_pos {
background-position: 0 -1819px;
}
......
......@@ -170,8 +170,8 @@ define(
return true;
},
getCreditCardPaymentMethodIcon: function() {
return window.checkoutConfig.payment.adyenCc.creditCardPaymentMethodIcon;
showLogo: function() {
return window.checkoutConfig.payment.adyen.showLogo;
}
});
}
......
......@@ -50,6 +50,9 @@ define(
this.selectPaymentMethod();
setPaymentMethodAction();
return false;
},
showLogo: function() {
return window.checkoutConfig.payment.adyen.showLogo;
}
});
}
......
......@@ -29,15 +29,10 @@
data-bind="attr: {'id': getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()"/>
<label data-bind="attr: {'for': getCode()}" class="label">
<!-- ko if: getCreditCardPaymentMethodIcon() -->
<!-- ko if: showLogo() -->
<div data-bind="attr: { 'class': 'adyen-sprite ' + getCode() }"></div>
<img data-bind="attr: {
'class': getCode(),
'src': getCreditCardPaymentMethodIcon().url,
'width': '65',
'height': '42',
'border': '0'
}">
<!--/ko-->
<span data-bind="text: getTitle()"></span>
......
......@@ -28,7 +28,16 @@
name="payment[method]"
class="radio"
data-bind="attr: {'id': getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()"/>
<label data-bind="attr: {'for': getCode()}" class="label"><span data-bind="text: getTitle()"></span></label>
<label data-bind="attr: {'for': getCode()}" class="label">
<!-- ko if: showLogo() -->
<div data-bind="attr: { 'class': 'adyen-sprite ' + getCode() }"></div>
<!--/ko-->
<span data-bind="text: getTitle()"></span>
</label>
</div>
<div class="payment-method-content">
<div class="payment-method-billing-address">
......
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