From caf3cf8475c1502b57ef59f938b136f91dc6d852 Mon Sep 17 00:00:00 2001 From: Andy Pieters Date: Mon, 13 Jun 2016 17:45:24 +0200 Subject: [PATCH] Added Payment method VVV giftcard --- Model/Config/Source/Available/Vvvgiftcard.php | 12 +++ Model/ConfigProvider.php | 1 + Model/Paymentmethod/Vvvgiftcard.php | 17 ++++ etc/adminhtml/paymentmethods.xml | 1 + etc/adminhtml/paymentmethods/vvvgiftcard.xml | 90 +++++++++++++++++++ etc/config.xml | 10 +++ etc/payment.xml | 3 + view/frontend/layout/checkout_index_index.xml | 3 + .../web/js/view/payment/method-renderer.js | 1 + 9 files changed, 138 insertions(+) create mode 100644 Model/Config/Source/Available/Vvvgiftcard.php create mode 100644 Model/Paymentmethod/Vvvgiftcard.php create mode 100644 etc/adminhtml/paymentmethods/vvvgiftcard.xml diff --git a/Model/Config/Source/Available/Vvvgiftcard.php b/Model/Config/Source/Available/Vvvgiftcard.php new file mode 100644 index 00000000..63c90c62 --- /dev/null +++ b/Model/Config/Source/Available/Vvvgiftcard.php @@ -0,0 +1,12 @@ + + */ +class Vvvgiftcard extends PaymentMethod +{ + protected $_code = 'paynl_payment_vvvgiftcard'; + +} \ No newline at end of file diff --git a/etc/adminhtml/paymentmethods.xml b/etc/adminhtml/paymentmethods.xml index 4724f30c..b00cc657 100644 --- a/etc/adminhtml/paymentmethods.xml +++ b/etc/adminhtml/paymentmethods.xml @@ -26,6 +26,7 @@ + diff --git a/etc/adminhtml/paymentmethods/vvvgiftcard.xml b/etc/adminhtml/paymentmethods/vvvgiftcard.xml new file mode 100644 index 00000000..041a8904 --- /dev/null +++ b/etc/adminhtml/paymentmethods/vvvgiftcard.xml @@ -0,0 +1,90 @@ + + + + + + + + Paynl\Payment\Model\Config\Source\Available\Vvvgiftcard + payment/paynl_payment_vvvgiftcard/active + + + + payment/paynl_payment_vvvgiftcard/title + + 1 + + + + + Paynl\Payment\Model\Config\Source\Order\Status\PendingPayment + + 1 + + payment/paynl_payment_vvvgiftcard/order_status + + + + Magento\Payment\Model\Config\Source\Allspecificcountries + payment/paynl_payment_vvvgiftcard/allowspecific + + 1 + + + + + Magento\Directory\Model\Config\Source\Country + 1 + payment/paynl_payment_vvvgiftcard/specificcountry + + 1 + 1 + + + + + + 1 + + payment/paynl_payment_vvvgiftcard/instructions + + + + payment/paynl_payment_vvvgiftcard/min_order_total + + 1 + + + + + payment/paynl_payment_vvvgiftcard/max_order_total + + 1 + + + + + + validate-number + payment/paynl_payment_vvvgiftcard/sort_order + + 1 + + + + + + \ No newline at end of file diff --git a/etc/config.xml b/etc/config.xml index 7183f602..7bb0d71b 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -218,6 +218,16 @@ Paynl\Payment\Model\Paymentmethod\Visamastercard paynl_payment + + 0 + VVV Giftcard + 1714 + pending_payment + + order + Paynl\Payment\Model\Paymentmethod\Vvvgiftcard + paynl_payment + 0 Webshopgiftcard diff --git a/etc/payment.xml b/etc/payment.xml index 7ab8c90b..de825582 100644 --- a/etc/payment.xml +++ b/etc/payment.xml @@ -75,6 +75,9 @@ 0 + + 0 + 0 diff --git a/view/frontend/layout/checkout_index_index.xml b/view/frontend/layout/checkout_index_index.xml index 44a9abb0..9cba86ee 100644 --- a/view/frontend/layout/checkout_index_index.xml +++ b/view/frontend/layout/checkout_index_index.xml @@ -83,6 +83,9 @@ false + + false + false diff --git a/view/frontend/web/js/view/payment/method-renderer.js b/view/frontend/web/js/view/payment/method-renderer.js index 622b0ee8..0481b85d 100644 --- a/view/frontend/web/js/view/payment/method-renderer.js +++ b/view/frontend/web/js/view/payment/method-renderer.js @@ -33,6 +33,7 @@ define( {type: 'paynl_payment_sofortbanking', component: defaultComponent}, {type: 'paynl_payment_telefonischbetalen', component: defaultComponent}, {type: 'paynl_payment_visamastercard', component: defaultComponent}, + {type: 'paynl_payment_vvvgiftcard', component: defaultComponent}, {type: 'paynl_payment_webshopgiftcard', component: defaultComponent}, {type: 'paynl_payment_wijncadeau', component: defaultComponent}, {type: 'paynl_payment_yourgift', component: defaultComponent}