Skip to content

Commit

Permalink
Merge pull request #52 from max-geraci/master
Browse files Browse the repository at this point in the history
Add payment methods Payconiq and Multibanco
  • Loading branch information
max-geraci authored Feb 18, 2020
2 parents ac21b62 + 6045359 commit 2a49a11
Show file tree
Hide file tree
Showing 13 changed files with 347 additions and 1 deletion.
12 changes: 12 additions & 0 deletions Model/Config/Source/Available/Multibanco.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
/**
* Copyright © 2020 Pay.nl All rights reserved.
*/

namespace Paynl\Payment\Model\Config\Source\Available;


class Multibanco extends Available
{
protected $_class = \Paynl\Payment\Model\Paymentmethod\Multibanco::class;
}
12 changes: 12 additions & 0 deletions Model/Config/Source/Available/Payconiq.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
/**
* Copyright © 2020 Pay.nl All rights reserved.
*/

namespace Paynl\Payment\Model\Config\Source\Available;


class Payconiq extends Available
{
protected $_class = \Paynl\Payment\Model\Paymentmethod\Payconiq::class;
}
2 changes: 2 additions & 0 deletions Model/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ class ConfigProvider implements ConfigProviderInterface
'paynl_payment_klarnakp',
'paynl_payment_maestro',
'paynl_payment_mistercash',
'paynl_payment_multibanco',
'paynl_payment_mybank',
'paynl_payment_overboeking',
'paynl_payment_payconiq',
'paynl_payment_paypal',
'paynl_payment_paysafecard',
'paynl_payment_podiumcadeaukaart',
Expand Down
20 changes: 20 additions & 0 deletions Model/Paymentmethod/Multibanco.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
/**
* Copyright © 2020 Pay.nl All rights reserved.
*/

namespace Paynl\Payment\Model\Paymentmethod;

/**
* Description of Multibanco
*
*/
class Multibanco extends PaymentMethod
{
protected $_code = 'paynl_payment_multibanco';

protected function getDefaultPaymentOptionId()
{
return 2271;
}
}
20 changes: 20 additions & 0 deletions Model/Paymentmethod/Payconiq.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
/**
* Copyright © 2020 Pay.nl All rights reserved.
*/

namespace Paynl\Payment\Model\Paymentmethod;

/**
* Description of Payconiq
*
*/
class Payconiq extends PaymentMethod
{
protected $_code = 'paynl_payment_payconiq';

protected function getDefaultPaymentOptionId()
{
return 2379;
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ SOFORT | PostePay | Gezondheidsbon | in3 keer betalen, 0% rente | Pay Fixed Pric
Maestro | Dankort | Fashion Giftcard | Klarna | Instore Payments (POS) |
Bank Transfer | Cartasi | GivaCard | SprayPay | Przelewy24 |
| Tikkie | | YourGift | Creditclick | Apple Pay |
| | | Paysafecard |
| Multibanco | | Paysafecard | | Payconiq


### Quickstart
Expand Down
2 changes: 2 additions & 0 deletions etc/adminhtml/paymentmethods.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
<include path="Paynl_Payment::paymentmethods/klarnakp.xml" />
<include path="Paynl_Payment::paymentmethods/maestro.xml" />
<include path="Paynl_Payment::paymentmethods/mistercash.xml" />
<include path="Paynl_Payment::paymentmethods/multibanco.xml" />
<include path="Paynl_Payment::paymentmethods/mybank.xml" />
<include path="Paynl_Payment::paymentmethods/overboeking.xml" />
<include path="Paynl_Payment::paymentmethods/payconiq.xml" />
<include path="Paynl_Payment::paymentmethods/paypal.xml" />
<include path="Paynl_Payment::paymentmethods/paysafecard.xml" />
<include path="Paynl_Payment::paymentmethods/podiumcadeaukaart.xml" />
Expand Down
120 changes: 120 additions & 0 deletions etc/adminhtml/paymentmethods/multibanco.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="UTF-8"?>
<include xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_include.xsd">
<group id="paynl_payment_multibanco" sortOrder="1250" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Multibanco</label>
<field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>Enabled</label>
<source_model>Paynl\Payment\Model\Config\Source\Available\Multibanco</source_model>
<config_path>payment/paynl_payment_multibanco/active</config_path>
</field>
<field id="title" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>Title</label>
<config_path>payment/paynl_payment_multibanco/title</config_path>
<depends>
<field id="active">1</field>
</depends>
</field>
<field id="order_status" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>New Order Status</label>
<source_model>Paynl\Payment\Model\Config\Source\Order\Status\PendingPayment</source_model>
<depends>
<field id="active">1</field>
</depends>
<config_path>payment/paynl_payment_multibanco/order_status</config_path>
</field>
<field id="order_status_authorized" translate="label" type="select" sortOrder="32" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>Authorized Order Status</label>
<source_model>Paynl\Payment\Model\Config\Source\Order\Status\Processing</source_model>
<depends>
<field id="active">1</field>
</depends>
<config_path>payment/paynl_payment_multibanco/order_status_authorized</config_path>
</field>
<field id="order_status_processing" translate="label" type="select" sortOrder="35" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>Paid Order Status</label>
<source_model>Paynl\Payment\Model\Config\Source\Order\Status\Processing</source_model>
<depends>
<field id="active">1</field>
</depends>
<config_path>payment/paynl_payment_multibanco/order_status_processing</config_path>
</field>
<field id="allowspecific" translate="label" type="allowspecific" sortOrder="40" showInDefault="1"
showInWebsite="1" showInStore="1">
<label>Payment from Applicable Countries</label>
<source_model>Magento\Payment\Model\Config\Source\Allspecificcountries</source_model>
<config_path>payment/paynl_payment_multibanco/allowspecific</config_path>
<depends>
<field id="active">1</field>
</depends>
</field>
<field id="specificcountry" translate="label" type="multiselect" sortOrder="50" showInDefault="1"
showInWebsite="1" showInStore="1">
<label>Payment from Specific Countries</label>
<source_model>Magento\Directory\Model\Config\Source\Country</source_model>
<can_be_empty>1</can_be_empty>
<config_path>payment/paynl_payment_multibanco/specificcountry</config_path>
<depends>
<field id="allowspecific">1</field>
<field id="active">1</field>
</depends>
</field>
<field id="instructions" translate="label" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Instructions</label>
<depends>
<field id="active">1</field>
</depends>
<config_path>payment/paynl_payment_multibanco/instructions</config_path>
</field>
<field id="min_order_total" translate="label" type="text" sortOrder="70" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>Minimum Order Total</label>
<config_path>payment/paynl_payment_multibanco/min_order_total</config_path>
<depends>
<field id="active">1</field>
</depends>
</field>
<field id="max_order_total" translate="label" type="text" sortOrder="80" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>Maximum Order Total</label>
<config_path>payment/paynl_payment_multibanco/max_order_total</config_path>
<depends>
<field id="active">1</field>
</depends>
</field>
<field id="sort_order" translate="label" type="text" sortOrder="90" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>Sort Order</label>
<frontend_class>validate-number</frontend_class>
<config_path>payment/paynl_payment_multibanco/sort_order</config_path>
<depends>
<field id="active">1</field>
</depends>
</field>
<field id="send_new_order_email" translate="label" type="select" sortOrder="100" showInDefault="1"
showInWebsite="1"
showInStore="1">
<label>Send new order email</label>
<source_model>Paynl\Payment\Model\Config\Source\SendNewOrderEmail</source_model>
<config_path>payment/paynl_payment_multibanco/send_new_order_email</config_path>
<depends>
<field id="active">1</field>
</depends>
</field>
<group id="advanced" translate="label" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Advanced</label>
<field id="payment_option_id" translate="label comment" type="text" sortOrder="10" showInDefault="1"
showInWebsite="1"
showInStore="1">
<label>Payment option id</label>
<comment>The id of the payment method, only change this if you are told to do so</comment>
<config_path>payment/paynl_payment_multibanco/payment_option_id</config_path>
</field>
</group>
</group>
</include>
120 changes: 120 additions & 0 deletions etc/adminhtml/paymentmethods/payconiq.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="UTF-8"?>
<include xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_include.xsd">
<group id="paynl_payment_payconiq" sortOrder="1450" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Payconiq</label>
<field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>Enabled</label>
<source_model>Paynl\Payment\Model\Config\Source\Available\Payconiq</source_model>
<config_path>payment/paynl_payment_payconiq/active</config_path>
</field>
<field id="title" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>Title</label>
<config_path>payment/paynl_payment_payconiq/title</config_path>
<depends>
<field id="active">1</field>
</depends>
</field>
<field id="order_status" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>New Order Status</label>
<source_model>Paynl\Payment\Model\Config\Source\Order\Status\PendingPayment</source_model>
<depends>
<field id="active">1</field>
</depends>
<config_path>payment/paynl_payment_payconiq/order_status</config_path>
</field>
<field id="order_status_authorized" translate="label" type="select" sortOrder="32" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>Authorized Order Status</label>
<source_model>Paynl\Payment\Model\Config\Source\Order\Status\Processing</source_model>
<depends>
<field id="active">1</field>
</depends>
<config_path>payment/paynl_payment_payconiq/order_status_authorized</config_path>
</field>
<field id="order_status_processing" translate="label" type="select" sortOrder="35" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>Paid Order Status</label>
<source_model>Paynl\Payment\Model\Config\Source\Order\Status\Processing</source_model>
<depends>
<field id="active">1</field>
</depends>
<config_path>payment/paynl_payment_payconiq/order_status_processing</config_path>
</field>
<field id="allowspecific" translate="label" type="allowspecific" sortOrder="40" showInDefault="1"
showInWebsite="1" showInStore="1">
<label>Payment from Applicable Countries</label>
<source_model>Magento\Payment\Model\Config\Source\Allspecificcountries</source_model>
<config_path>payment/paynl_payment_payconiq/allowspecific</config_path>
<depends>
<field id="active">1</field>
</depends>
</field>
<field id="specificcountry" translate="label" type="multiselect" sortOrder="50" showInDefault="1"
showInWebsite="1" showInStore="1">
<label>Payment from Specific Countries</label>
<source_model>Magento\Directory\Model\Config\Source\Country</source_model>
<can_be_empty>1</can_be_empty>
<config_path>payment/paynl_payment_payconiq/specificcountry</config_path>
<depends>
<field id="allowspecific">1</field>
<field id="active">1</field>
</depends>
</field>
<field id="instructions" translate="label" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Instructions</label>
<depends>
<field id="active">1</field>
</depends>
<config_path>payment/paynl_payment_payconiq/instructions</config_path>
</field>
<field id="min_order_total" translate="label" type="text" sortOrder="70" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>Minimum Order Total</label>
<config_path>payment/paynl_payment_payconiq/min_order_total</config_path>
<depends>
<field id="active">1</field>
</depends>
</field>
<field id="max_order_total" translate="label" type="text" sortOrder="80" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>Maximum Order Total</label>
<config_path>payment/paynl_payment_payconiq/max_order_total</config_path>
<depends>
<field id="active">1</field>
</depends>
</field>
<field id="sort_order" translate="label" type="text" sortOrder="90" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>Sort Order</label>
<frontend_class>validate-number</frontend_class>
<config_path>payment/paynl_payment_payconiq/sort_order</config_path>
<depends>
<field id="active">1</field>
</depends>
</field>
<field id="send_new_order_email" translate="label" type="select" sortOrder="100" showInDefault="1"
showInWebsite="1"
showInStore="1">
<label>Send new order email</label>
<source_model>Paynl\Payment\Model\Config\Source\SendNewOrderEmail</source_model>
<config_path>payment/paynl_payment_payconiq/send_new_order_email</config_path>
<depends>
<field id="active">1</field>
</depends>
</field>
<group id="advanced" translate="label" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Advanced</label>
<field id="payment_option_id" translate="label comment" type="text" sortOrder="10" showInDefault="1"
showInWebsite="1"
showInStore="1">
<label>Payment option id</label>
<comment>The id of the payment method, only change this if you are told to do so</comment>
<config_path>payment/paynl_payment_payconiq/payment_option_id</config_path>
</field>
</group>
</group>
</include>
24 changes: 24 additions & 0 deletions etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,18 @@
<group>paynl_payment</group>
<send_new_order_email>after_payment</send_new_order_email>
</paynl_payment_mistercash>
<paynl_payment_multibanco>
<active>0</active>
<title>Multibanco</title>
<payment_option_id>2271</payment_option_id>
<order_status>pending_payment</order_status>
<order_status_authorized>processing</order_status_authorized>
<order_status_processing>processing</order_status_processing>
<payment_action>order</payment_action>
<model>Paynl\Payment\Model\Paymentmethod\Multibanco</model>
<group>paynl_payment</group>
<send_new_order_email>after_payment</send_new_order_email>
</paynl_payment_multibanco>
<paynl_payment_mybank>
<active>0</active>
<title>Mybank</title>
Expand All @@ -363,6 +375,18 @@
<send_new_order_email>before_payment</send_new_order_email>
<holded>1</holded>
</paynl_payment_overboeking>
<paynl_payment_payconiq>
<active>0</active>
<title>Payconiq</title>
<payment_option_id>2379</payment_option_id>
<order_status>pending_payment</order_status>
<order_status_authorized>processing</order_status_authorized>
<order_status_processing>processing</order_status_processing>
<payment_action>order</payment_action>
<model>Paynl\Payment\Model\Paymentmethod\Payconiq</model>
<group>paynl_payment</group>
<send_new_order_email>after_payment</send_new_order_email>
</paynl_payment_payconiq>
<paynl_payment_paypal>
<active>0</active>
<title>Paypal</title>
Expand Down
6 changes: 6 additions & 0 deletions etc/payment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,18 @@
<method name="paynl_payment_mistercash">
<allow_multiple_address>0</allow_multiple_address>
</method>
<method name="paynl_payment_multibanco">
<allow_multiple_address>0</allow_multiple_address>
</method>
<method name="paynl_payment_mybank">
<allow_multiple_address>0</allow_multiple_address>
</method>
<method name="paynl_payment_overboeking">
<allow_multiple_address>0</allow_multiple_address>
</method>
<method name="paynl_payment_payconiq">
<allow_multiple_address>0</allow_multiple_address>
</method>
<method name="paynl_payment_paypal">
<allow_multiple_address>0</allow_multiple_address>
</method>
Expand Down
Loading

0 comments on commit 2a49a11

Please sign in to comment.