Skip to content

Commit

Permalink
Added Payment method VVV giftcard
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Pieters committed Jun 13, 2016
1 parent 93a3e68 commit caf3cf8
Show file tree
Hide file tree
Showing 9 changed files with 138 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Model/Config/Source/Available/Vvvgiftcard.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
/**
* Copyright © 2015 Pay.nl All rights reserved.
*/

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


class Vvvgiftcard extends Available
{
protected $_code = 'paynl_payment_vvvgiftcard';
}
1 change: 1 addition & 0 deletions Model/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class ConfigProvider implements ConfigProviderInterface
'paynl_payment_sofortbanking',
'paynl_payment_telefonischbetalen',
'paynl_payment_visamastercard',
'paynl_payment_vvvgiftcard',
'paynl_payment_webshopgiftcard',
'paynl_payment_wijncadeau',
'paynl_payment_yourgift'
Expand Down
17 changes: 17 additions & 0 deletions Model/Paymentmethod/Vvvgiftcard.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
/**
* Copyright © 2015 Pay.nl All rights reserved.
*/

namespace Paynl\Payment\Model\Paymentmethod;

/**
* Description of Ideal
*
* @author Andy Pieters <[email protected]>
*/
class Vvvgiftcard extends PaymentMethod
{
protected $_code = 'paynl_payment_vvvgiftcard';

}
1 change: 1 addition & 0 deletions etc/adminhtml/paymentmethods.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<include path="Paynl_Payment::paymentmethods/sofortbanking.xml" />
<include path="Paynl_Payment::paymentmethods/telefonischbetalen.xml" />
<include path="Paynl_Payment::paymentmethods/visamastercard.xml" />
<include path="Paynl_Payment::paymentmethods/vvvgiftcard.xml" />
<include path="Paynl_Payment::paymentmethods/webshopgiftcard.xml" />
<include path="Paynl_Payment::paymentmethods/wijncadeau.xml" />
<include path="Paynl_Payment::paymentmethods/yourgift.xml" />
Expand Down
90 changes: 90 additions & 0 deletions etc/adminhtml/paymentmethods/vvvgiftcard.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © 2015 Pay.nl All rights reserved.
*/
-->
<include xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../Config/etc/system_include.xsd">
<group id="paynl_payment_vvvgiftcard" sortOrder="2100" showInDefault="1" showInWebsite="1" showInStore="1">
<label>VVV Giftcard</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\Vvvgiftcard</source_model>
<config_path>payment/paynl_payment_vvvgiftcard/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_vvvgiftcard/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_vvvgiftcard/order_status</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_vvvgiftcard/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_vvvgiftcard/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_vvvgiftcard/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_vvvgiftcard/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_vvvgiftcard/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_vvvgiftcard/sort_order</config_path>
<depends>
<field id="active">1</field>
</depends>
</field>

</group>
</include>

10 changes: 10 additions & 0 deletions etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,16 @@
<model>Paynl\Payment\Model\Paymentmethod\Visamastercard</model>
<group>paynl_payment</group>
</paynl_payment_visamastercard>
<paynl_payment_vvvgiftcard>
<active>0</active>
<title>VVV Giftcard</title>
<payment_option_id>1714</payment_option_id>
<order_status>pending_payment</order_status>
<instructions></instructions>
<payment_action>order</payment_action>
<model>Paynl\Payment\Model\Paymentmethod\Vvvgiftcard</model>
<group>paynl_payment</group>
</paynl_payment_vvvgiftcard>
<paynl_payment_webshopgiftcard>
<active>0</active>
<title>Webshopgiftcard</title>
Expand Down
3 changes: 3 additions & 0 deletions etc/payment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@
<method name="paynl_payment_visamastercard">
<allow_multiple_address>0</allow_multiple_address>
</method>
<method name="paynl_payment_vvvgiftcard">
<allow_multiple_address>0</allow_multiple_address>
</method>
<method name="paynl_payment_webshopgiftcard">
<allow_multiple_address>0</allow_multiple_address>
</method>
Expand Down
3 changes: 3 additions & 0 deletions view/frontend/layout/checkout_index_index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@
<item name="paynl_payment_visamastercard" xsi:type="array">
<item name="isBillingAddressRequired" xsi:type="boolean">false</item>
</item>
<item name="paynl_payment_vvvgiftcard" xsi:type="array">
<item name="isBillingAddressRequired" xsi:type="boolean">false</item>
</item>
<item name="paynl_payment_webshopgiftcard" xsi:type="array">
<item name="isBillingAddressRequired" xsi:type="boolean">false</item>
</item>
Expand Down
1 change: 1 addition & 0 deletions view/frontend/web/js/view/payment/method-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit caf3cf8

Please sign in to comment.