From 8d6abaecea51504b05e38f90caf85e475dd58b8c Mon Sep 17 00:00:00 2001 From: woutse Date: Thu, 1 Apr 2021 11:41:46 +0200 Subject: [PATCH 1/2] Added Trustly --- Model/Config/Source/Available/Trustly.php | 12 ++ Model/ConfigProvider.php | 1 + Model/Paymentmethod/Trustly.php | 20 +++ README.md | 2 +- etc/adminhtml/paymentmethods.xml | 1 + etc/adminhtml/paymentmethods/trustly.xml | 151 ++++++++++++++++++ etc/config.xml | 12 ++ etc/payment.xml | 3 + view/frontend/layout/checkout_index_index.xml | 3 + .../web/js/view/payment/method-renderer.js | 1 + 10 files changed, 205 insertions(+), 1 deletion(-) create mode 100644 Model/Config/Source/Available/Trustly.php create mode 100644 Model/Paymentmethod/Trustly.php create mode 100644 etc/adminhtml/paymentmethods/trustly.xml diff --git a/Model/Config/Source/Available/Trustly.php b/Model/Config/Source/Available/Trustly.php new file mode 100644 index 00000000..0eebf201 --- /dev/null +++ b/Model/Config/Source/Available/Trustly.php @@ -0,0 +1,12 @@ + + diff --git a/etc/adminhtml/paymentmethods/trustly.xml b/etc/adminhtml/paymentmethods/trustly.xml new file mode 100644 index 00000000..ee0a8d8e --- /dev/null +++ b/etc/adminhtml/paymentmethods/trustly.xml @@ -0,0 +1,151 @@ + + + + + + + Paynl\Payment\Model\Config\Source\Available\Trustly + payment/paynl_payment_trustly/active + + + + payment/paynl_payment_trustly/title + + 1 + + + + + Paynl\Payment\Model\Config\Source\Order\Status\PendingPayment + + 1 + + payment/paynl_payment_trustly/order_status + + + + Paynl\Payment\Model\Config\Source\Order\Status\Processing + + 1 + + payment/paynl_payment_trustly/order_status_authorized + + + + Paynl\Payment\Model\Config\Source\Order\Status\Processing + + 1 + + payment/paynl_payment_trustly/order_status_processing + + + + Magento\Config\Model\Config\Source\Yesno + payment/paynl_payment_trustly/holded + + 1 + + + + + + Magento\Payment\Model\Config\Source\Allspecificcountries + payment/paynl_payment_trustly/allowspecific + + 1 + + + + + Magento\Directory\Model\Config\Source\Country + 1 + payment/paynl_payment_trustly/specificcountry + + 1 + 1 + + + + + + 1 + + payment/paynl_payment_trustly/instructions + + + + payment/paynl_payment_trustly/min_order_total + + 1 + + + + + payment/paynl_payment_trustly/max_order_total + + 1 + + + + + validate-number + payment/paynl_payment_trustly/sort_order + + 1 + + + + + Paynl\Payment\Model\Config\Source\SendNewOrderEmail + payment/paynl_payment_trustly/send_new_order_email + + 1 + + + + + Magento\Shipping\Model\Config\Source\Allmethods + 1 + + 1 + + payment/paynl_payment_trustly/disallowedshipping + + + + + Paynl\Payment\Model\Config\Source\showCompanyOptions + + 1 + + payment/paynl_payment_trustly/showforcompany + + + + + + + The id of the payment method, only change this if you are told to do so + payment/paynl_payment_trustly/payment_option_id + + + + + diff --git a/etc/config.xml b/etc/config.xml index 9abd31e1..6ecd352d 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -300,6 +300,18 @@ In order to pay for your order click the link below paynl_payment after_payment + + 0 + Trustly + 2718 + pending_payment + processing + processing + order + Paynl\Payment\Model\Paymentmethod\Trustly + paynl_payment + after_payment + 0 Huis en Tuin Cadeau diff --git a/etc/payment.xml b/etc/payment.xml index c4529dd3..4ec9111c 100644 --- a/etc/payment.xml +++ b/etc/payment.xml @@ -135,6 +135,9 @@ 0 + + 0 + 0 diff --git a/view/frontend/layout/checkout_index_index.xml b/view/frontend/layout/checkout_index_index.xml index 6b37ceae..43a27d11 100644 --- a/view/frontend/layout/checkout_index_index.xml +++ b/view/frontend/layout/checkout_index_index.xml @@ -152,6 +152,9 @@ true + + true + true diff --git a/view/frontend/web/js/view/payment/method-renderer.js b/view/frontend/web/js/view/payment/method-renderer.js index 1d3b547b..d2cdfd7d 100644 --- a/view/frontend/web/js/view/payment/method-renderer.js +++ b/view/frontend/web/js/view/payment/method-renderer.js @@ -55,6 +55,7 @@ define( {type: 'paynl_payment_spraypay', component: defaultComponent}, {type: 'paynl_payment_telefonischbetalen', component: defaultComponent}, {type: 'paynl_payment_tikkie', component: defaultComponent}, + {type: 'paynl_payment_trustly', component: defaultComponent}, {type: 'paynl_payment_visamastercard', component: defaultComponent}, {type: 'paynl_payment_vvvgiftcard', component: defaultComponent}, {type: 'paynl_payment_webshopgiftcard', component: defaultComponent}, From 4d9344d82c7911a779a0f40159b462ffdba96d80 Mon Sep 17 00:00:00 2001 From: woutse Date: Thu, 1 Apr 2021 12:12:52 +0200 Subject: [PATCH 2/2] Added Trustly --- etc/adminhtml/paymentmethods/trustly.xml | 2 +- etc/config.xml | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/etc/adminhtml/paymentmethods/trustly.xml b/etc/adminhtml/paymentmethods/trustly.xml index ee0a8d8e..8d664519 100644 --- a/etc/adminhtml/paymentmethods/trustly.xml +++ b/etc/adminhtml/paymentmethods/trustly.xml @@ -1,7 +1,7 @@ - + diff --git a/etc/config.xml b/etc/config.xml index 6ecd352d..445d9e49 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -300,18 +300,6 @@ In order to pay for your order click the link below paynl_payment after_payment - - 0 - Trustly - 2718 - pending_payment - processing - processing - order - Paynl\Payment\Model\Paymentmethod\Trustly - paynl_payment - after_payment - 0 Huis en Tuin Cadeau @@ -581,6 +569,18 @@ In order to pay for your order click the link below paynl_payment after_payment + + 0 + Trustly + 2718 + pending_payment + processing + processing + order + Paynl\Payment\Model\Paymentmethod\Trustly + paynl_payment + after_payment + 0 Visa / Mastercard