-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from mollie/1.4.5
1.4.5
- Loading branch information
Showing
12 changed files
with
177 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?xml version="1.0"?> | ||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> | ||
<module name="Mollie_Payment" setup_version="1.4.4" /> | ||
<module name="Mollie_Payment" setup_version="1.4.5" /> | ||
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
define( | ||
[ | ||
'ko', | ||
'jquery', | ||
'Mollie_Payment/js/view/payment/method-renderer/default' | ||
], | ||
function (ko, $, Component) { | ||
var checkoutConfig = window.checkoutConfig.payment; | ||
'use strict'; | ||
return Component.extend( | ||
{ | ||
defaults: { | ||
template: 'Mollie_Payment/payment/kbc', | ||
selectedIssuer: null | ||
}, | ||
getForm: function () { | ||
return $('#' + this.item.method + '-form'); | ||
}, | ||
getIssuers: function () { | ||
return checkoutConfig.issuers[this.item.method]; | ||
}, | ||
getIssuerListType: function () { | ||
return checkoutConfig.issuersListType[this.item.method]; | ||
}, | ||
getSelectedIssuer: function () { | ||
if (this.getIssuerListType() === 'radio') { | ||
return $('input[name=issuer]:checked', this.getForm()).val(); | ||
} | ||
if (this.getIssuerListType() === 'dropdown') { | ||
return this.selectedIssuer; | ||
} | ||
}, | ||
getData: function () { | ||
return { | ||
'method': this.item.method, | ||
'additional_data': { | ||
"selected_issuer": this.getSelectedIssuer() | ||
} | ||
}; | ||
}, | ||
validate: function () { | ||
var $form = this.getForm(); | ||
if (this.getIssuerListType() === 'radio') { | ||
return $form.validation() && $form.validation('isValid'); | ||
} | ||
return $form.validation(); | ||
} | ||
} | ||
); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<div class="payment-method" data-bind="css: {'_active': (getCode() == isChecked())}"> | ||
<div class="payment-method-title field choice"> | ||
<input type="radio" | ||
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"> | ||
<!-- ko if: getMethodImage() --> | ||
<img data-bind="attr: {src: getMethodImage()}" class="mollie-payment-icon"/> | ||
<!--/ko--> | ||
<span data-bind="text: getTitle()"></span> | ||
</label> | ||
|
||
</div> | ||
<div class="payment-method-content"> | ||
<!-- ko foreach: getRegion('messages') --> | ||
<!-- ko template: getTemplate() --><!-- /ko --> | ||
<!--/ko--> | ||
|
||
<!-- ko if: getIssuers() --> | ||
<!-- ko if: getIssuerListType() == 'dropdown' --> | ||
<div class="field-select-billing"> | ||
<strong><span data-bind="i18n: 'Select Bank'"></span></strong> | ||
<select data-bind="options: getIssuers(), optionsText: 'name', optionsValue: 'id', value: selectedIssuer"></select> | ||
</div> | ||
<br/> | ||
<!--/ko--> | ||
<!-- ko if: getIssuerListType() == 'radio' --> | ||
<div class="payment-method-title field choice"> | ||
<form class="form" data-bind="attr: {'id': getCode() + '-form'}"> | ||
<strong><span data-bind="i18n: 'Select Bank'"></span></strong> | ||
<div data-bind="foreach: {data: getIssuers(), as :'issuer' }" class="field choice"> | ||
<input type="radio" name="issuer" data-bind="attr: {value: issuer.id}" class="radio" data-validate="{'validate-one-required-by-name':true}"> | ||
<label data-bind="attr: {'for': issuer.id}" class="label"> | ||
<img data-bind="attr: {src: issuer.image.size2x}" class="payment-icon"/> | ||
<span data-bind="text: issuer.name"></span> | ||
</label> | ||
<br/> | ||
</div> | ||
</form> | ||
</div> | ||
<br/> | ||
<!--/ko--> | ||
<!--/ko--> | ||
|
||
<div class="payment-method-billing-address"> | ||
<!-- ko foreach: $parent.getRegion(getBillingAddressFormName()) --> | ||
<!-- ko template: getTemplate() --><!-- /ko --> | ||
<!--/ko--> | ||
</div> | ||
|
||
<div class="checkout-agreements-block"> | ||
<!-- ko foreach: $parent.getRegion('before-place-order') --> | ||
<!-- ko template: getTemplate() --><!-- /ko --> | ||
<!--/ko--> | ||
</div> | ||
<div class="actions-toolbar"> | ||
<div class="primary"> | ||
<button class="action primary checkout" | ||
type="submit" | ||
data-bind=" | ||
click: placeOrder, | ||
attr: {title: $t('Place Order')}, | ||
css: {disabled: !isPlaceOrderActionAllowed()}, | ||
enable: (getCode() == isChecked())" | ||
disabled> | ||
<span data-bind="i18n: 'Place Order'"></span> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |