= __('Checkout Url'); ?> |
= $block->getCheckoutUrl(); ?>
diff --git a/view/adminhtml/web/images/pointofsale.svg b/view/adminhtml/web/images/pointofsale.svg
new file mode 100644
index 00000000000..117d4b18770
--- /dev/null
+++ b/view/adminhtml/web/images/pointofsale.svg
@@ -0,0 +1,29 @@
+
+
+
diff --git a/view/frontend/layout/checkout_index_index.xml b/view/frontend/layout/checkout_index_index.xml
index e2267f7f140..3c108332b73 100644
--- a/view/frontend/layout/checkout_index_index.xml
+++ b/view/frontend/layout/checkout_index_index.xml
@@ -82,6 +82,9 @@
-
- true
+ -
+
- true
+
-
- true
diff --git a/view/frontend/layout/mollie_checkout_pointofsale.xml b/view/frontend/layout/mollie_checkout_pointofsale.xml
new file mode 100644
index 00000000000..4debbc46343
--- /dev/null
+++ b/view/frontend/layout/mollie_checkout_pointofsale.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/view/frontend/templates/checkout/pointofsale/wait.phtml b/view/frontend/templates/checkout/pointofsale/wait.phtml
new file mode 100644
index 00000000000..7d827205bf6
--- /dev/null
+++ b/view/frontend/templates/checkout/pointofsale/wait.phtml
@@ -0,0 +1,61 @@
+
+
+"}}'>
+
+= __('Current Status: Loading...'); ?>
+
+
+
diff --git a/view/frontend/web/images/methods/pointofsale.svg b/view/frontend/web/images/methods/pointofsale.svg
new file mode 100644
index 00000000000..117d4b18770
--- /dev/null
+++ b/view/frontend/web/images/methods/pointofsale.svg
@@ -0,0 +1,29 @@
+
+
+
diff --git a/view/frontend/web/js/view/payment/method-renderer.js b/view/frontend/web/js/view/payment/method-renderer.js
index 89408d92cf7..c4d767dee89 100644
--- a/view/frontend/web/js/view/payment/method-renderer.js
+++ b/view/frontend/web/js/view/payment/method-renderer.js
@@ -10,11 +10,12 @@ define(
rendererList
) {
'use strict';
- var defaultComponent = 'Mollie_Payment/js/view/payment/method-renderer/default';
var billieComponent = 'Mollie_Payment/js/view/payment/method-renderer/billie';
+ var defaultComponent = 'Mollie_Payment/js/view/payment/method-renderer/default';
var idealComponent = 'Mollie_Payment/js/view/payment/method-renderer/ideal';
var giftcardComponent = 'Mollie_Payment/js/view/payment/method-renderer/giftcard';
var kbcComponent = 'Mollie_Payment/js/view/payment/method-renderer/kbc';
+ var pointofsaleComponent = 'Mollie_Payment/js/view/payment/method-renderer/pointofsale';
var creditcardComponent = 'Mollie_Payment/js/view/payment/method-renderer/creditcard';
var checkoutConfig = window.checkoutConfig.payment.mollie;
@@ -42,6 +43,7 @@ define(
{type: 'mollie_methods_mybank', component: defaultComponent},
{type: 'mollie_methods_paypal', component: defaultComponent},
{type: 'mollie_methods_paysafecard', component: defaultComponent},
+ {type: 'mollie_methods_pointofsale', component: pointofsaleComponent},
{type: 'mollie_methods_przelewy24', component: defaultComponent},
{type: 'mollie_methods_sofort', component: defaultComponent},
{type: 'mollie_methods_voucher', component: defaultComponent}
diff --git a/view/frontend/web/js/view/payment/method-renderer/pointofsale.js b/view/frontend/web/js/view/payment/method-renderer/pointofsale.js
new file mode 100644
index 00000000000..e3fd118a941
--- /dev/null
+++ b/view/frontend/web/js/view/payment/method-renderer/pointofsale.js
@@ -0,0 +1,63 @@
+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/pointofsale',
+ selectedTerminal: ko.observable()
+ },
+
+ initialize: function () {
+ this._super();
+
+ if (!window.localStorage) {
+ return;
+ }
+
+ var key = this.getCode() + '_terminal';
+ this.selectedTerminal.subscribe( function (value) {
+ window.localStorage.setItem(key, value);
+ }.bind(this));
+
+ this.selectDefaultTerminal(key);
+ },
+
+ selectDefaultTerminal: function (key) {
+ if (window.localStorage.getItem(key)) {
+ this.selectedTerminal(window.localStorage.getItem(key));
+ return;
+ }
+
+ var terminalList = this.getTerminals();
+ if (terminalList.length === 1) {
+ this.selectedTerminal(terminalList[0].id);
+ }
+ },
+
+ getTerminals: function () {
+ return checkoutConfig && checkoutConfig.mollie.terminals ? checkoutConfig.mollie.terminals : [];
+ },
+
+ getData: function () {
+ return {
+ 'method': this.item.method,
+ 'additional_data': {
+ "selected_terminal": this.selectedTerminal()
+ }
+ };
+ },
+
+ validate: function () {
+ return this.selectedTerminal();
+ }
+ }
+ );
+ }
+);
diff --git a/view/frontend/web/template/payment/pointofsale.html b/view/frontend/web/template/payment/pointofsale.html
new file mode 100644
index 00000000000..0189dc693d5
--- /dev/null
+++ b/view/frontend/web/template/payment/pointofsale.html
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|