Skip to content

Commit

Permalink
Merge pull request #156 from paynl/feature/PLUG-2992
Browse files Browse the repository at this point in the history
PLUG-2992 - Add Beauty cadeau, MOOI giftcard and Horses & Gifts
  • Loading branch information
woutse authored Dec 6, 2023
2 parents 0c47032 + c5a7696 commit dacbc7d
Show file tree
Hide file tree
Showing 17 changed files with 528 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Model/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class Config
"paynl_payment_amex" => "9",
"paynl_payment_applepay" => "114",
"paynl_payment_bataviacadeaukaart" => "255",
"paynl_payment_beautycadeau" => "288",
"paynl_payment_biercheque" => "204",
"paynl_payment_biller" => "252",
"paynl_payment_billink" => "16",
Expand All @@ -73,6 +74,7 @@ class Config
"paynl_payment_givacard" => "61",
"paynl_payment_good4fun" => "207",
"paynl_payment_googlepay" => "176",
"paynl_payment_horsesandgifts" => "300",
"paynl_payment_huisentuincadeau" => "117",
"paynl_payment_ideal" => "1",
"paynl_payment_in3business" => "297",
Expand All @@ -83,6 +85,7 @@ class Config
"paynl_payment_maestro" => "33",
"paynl_payment_mistercash" => "2",
"paynl_payment_monizze" => "183",
"paynl_payment_mooigiftcard" => "294",
"paynl_payment_multibanco" => "141",
"paynl_payment_nexi" => "76",
"paynl_payment_overboeking" => "12",
Expand Down
8 changes: 8 additions & 0 deletions Model/Config/Source/Available/Beautycadeau.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

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

class Beautycadeau extends Available
{
protected $_class = \Paynl\Payment\Model\Paymentmethod\Beautycadeau::class;
}
8 changes: 8 additions & 0 deletions Model/Config/Source/Available/Horsesandgifts.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

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

class Horsesandgifts extends Available
{
protected $_class = \Paynl\Payment\Model\Paymentmethod\Horsesandgifts::class;
}
8 changes: 8 additions & 0 deletions Model/Config/Source/Available/Mooigiftcard.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

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

class Mooigiftcard extends Available
{
protected $_class = \Paynl\Payment\Model\Paymentmethod\Mooigiftcard::class;
}
3 changes: 3 additions & 0 deletions Model/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class ConfigProvider implements ConfigProviderInterface
'paynl_payment_amex',
'paynl_payment_applepay',
'paynl_payment_bataviacadeaukaart',
'paynl_payment_beautycadeau',
'paynl_payment_biercheque',
'paynl_payment_biller',
'paynl_payment_billink',
Expand All @@ -43,6 +44,7 @@ class ConfigProvider implements ConfigProviderInterface
'paynl_payment_givacard',
'paynl_payment_good4fun',
'paynl_payment_googlepay',
'paynl_payment_horsesandgifts',
'paynl_payment_huisentuincadeau',
'paynl_payment_ideal',
'paynl_payment_in3business',
Expand All @@ -53,6 +55,7 @@ class ConfigProvider implements ConfigProviderInterface
'paynl_payment_maestro',
'paynl_payment_mistercash',
'paynl_payment_monizze',
'paynl_payment_mooigiftcard',
'paynl_payment_multibanco',
'paynl_payment_nexi',
'paynl_payment_overboeking',
Expand Down
18 changes: 18 additions & 0 deletions Model/Paymentmethod/Beautycadeau.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace Paynl\Payment\Model\Paymentmethod;

use Paynl\Payment\Model\Config;

class Beautycadeau extends PaymentMethod
{
protected $_code = 'paynl_payment_beautycadeau';

/**
* @return integer
*/
protected function getDefaultPaymentOptionId()
{
return 3144;
}
}
18 changes: 18 additions & 0 deletions Model/Paymentmethod/Horsesandgifts.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace Paynl\Payment\Model\Paymentmethod;

use Paynl\Payment\Model\Config;

class Horsesandgifts extends PaymentMethod
{
protected $_code = 'paynl_payment_horsesandgifts';

/**
* @return integer
*/
protected function getDefaultPaymentOptionId()
{
return 3222;
}
}
18 changes: 18 additions & 0 deletions Model/Paymentmethod/Mooigiftcard.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace Paynl\Payment\Model\Paymentmethod;

use Paynl\Payment\Model\Config;

class Mooigiftcard extends PaymentMethod
{
protected $_code = 'paynl_payment_mooigiftcard';

/**
* @return integer
*/
protected function getDefaultPaymentOptionId()
{
return 3183;
}
}
3 changes: 3 additions & 0 deletions etc/adminhtml/paymentmethods.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<include path="Paynl_Payment::paymentmethods/amex.xml" />
<include path="Paynl_Payment::paymentmethods/applepay.xml" />
<include path="Paynl_Payment::paymentmethods/bataviacadeaukaart.xml" />
<include path="Paynl_Payment::paymentmethods/beautycadeau.xml" />
<include path="Paynl_Payment::paymentmethods/biercheque.xml" />
<include path="Paynl_Payment::paymentmethods/biller.xml" />
<include path="Paynl_Payment::paymentmethods/billink.xml" />
Expand All @@ -34,6 +35,7 @@
<include path="Paynl_Payment::paymentmethods/givacard.xml" />
<include path="Paynl_Payment::paymentmethods/good4fun.xml" />
<include path="Paynl_Payment::paymentmethods/googlepay.xml" />
<include path="Paynl_Payment::paymentmethods/horsesandgifts.xml" />
<include path="Paynl_Payment::paymentmethods/huisentuincadeau.xml" />
<include path="Paynl_Payment::paymentmethods/ideal.xml" />
<include path="Paynl_Payment::paymentmethods/in3business.xml" />
Expand All @@ -44,6 +46,7 @@
<include path="Paynl_Payment::paymentmethods/maestro.xml" />
<include path="Paynl_Payment::paymentmethods/mistercash.xml" />
<include path="Paynl_Payment::paymentmethods/monizze.xml" />
<include path="Paynl_Payment::paymentmethods/mooigiftcard.xml" />
<include path="Paynl_Payment::paymentmethods/multibanco.xml" />
<include path="Paynl_Payment::paymentmethods/nexi.xml" />
<include path="Paynl_Payment::paymentmethods/overboeking.xml" />
Expand Down
134 changes: 134 additions & 0 deletions etc/adminhtml/paymentmethods/beautycadeau.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
<?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_beautycadeau" sortOrder="205" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Beauty cadeau</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\Beautycadeau</source_model>
<config_path>payment/paynl_payment_beautycadeau/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_beautycadeau/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_beautycadeau/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_beautycadeau/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_beautycadeau/order_status_processing</config_path>
</field>
<field id="allowspecific" translate="label" type="allowspecific" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Accepted billing country</label>
<source_model>Magento\Payment\Model\Config\Source\Allspecificcountries</source_model>
<config_path>payment/paynl_payment_beautycadeau/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>Select accepted countries</label>
<source_model>Magento\Directory\Model\Config\Source\Country</source_model>
<can_be_empty>1</can_be_empty>
<config_path>payment/paynl_payment_beautycadeau/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>Payment instructions</label>
<depends>
<field id="active">1</field>
</depends>
<config_path>payment/paynl_payment_beautycadeau/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_beautycadeau/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_beautycadeau/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_beautycadeau/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 order confirmation email</label>
<source_model>Paynl\Payment\Model\Config\Source\SendNewOrderEmail</source_model>
<config_path>payment/paynl_payment_beautycadeau/send_new_order_email</config_path>
<depends>
<field id="active">1</field>
</depends>
</field>
<field id="disallowedshipping" translate="label" type="multiselect" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Disallowed Shipping Methods</label>
<source_model>Magento\Shipping\Model\Config\Source\Allmethods</source_model>
<can_be_empty>1</can_be_empty>
<depends>
<field id="active">1</field>
</depends>
<config_path>payment/paynl_payment_beautycadeau/disallowedshipping</config_path>
<comment><![CDATA[Hold CTRL button to select/deselect multiple]]></comment>
</field>
<field id="showforcompany" translate="label" type="select" sortOrder="150" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Show for</label>
<source_model>Paynl\Payment\Model\Config\Source\ShowCompanyOptions</source_model>
<depends>
<field id="active">1</field>
</depends>
<config_path>payment/paynl_payment_beautycadeau/showforcompany</config_path>
<comment><![CDATA[Show payment method for both business and private customers, private customers only or businesses only.]]></comment>
</field>
<field id="showforgroup" translate="label" type="select" sortOrder="160" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Customer Group</label>
<source_model>Paynl\Payment\Model\Config\Source\UserGroups</source_model>
<depends>
<field id="active">1</field>
</depends>
<config_path>payment/paynl_payment_beautycadeau/showforgroup</config_path>
<comment><![CDATA[Show payment method only to specific customer groups.]]></comment>
</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 method ID</label>
<comment>Only change this if you are told to do so by Pay. Support</comment>
<config_path>payment/paynl_payment_beautycadeau/payment_option_id</config_path>
</field>
</group>
</group>
</include>
Loading

0 comments on commit dacbc7d

Please sign in to comment.