-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #215 from paynl/feature/PLUG-3959
PLUG-3959 - Add Visa and Mastercard
- Loading branch information
Showing
13 changed files
with
398 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Paynl\Payment\Model\Config\Source\Available; | ||
|
||
class Mastercard extends Available | ||
{ | ||
protected $_class = \Paynl\Payment\Model\Paymentmethod\Mastercard::class; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Paynl\Payment\Model\Config\Source\Available; | ||
|
||
class Visa extends Available | ||
{ | ||
protected $_class = \Paynl\Payment\Model\Paymentmethod\Visa::class; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace Paynl\Payment\Model\Paymentmethod; | ||
|
||
class Mastercard extends PaymentMethod | ||
{ | ||
protected $_code = 'paynl_payment_mastercard'; | ||
|
||
/** | ||
* @return integer | ||
*/ | ||
protected function getDefaultPaymentOptionId() | ||
{ | ||
return 3138; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace Paynl\Payment\Model\Paymentmethod; | ||
|
||
class Visa extends PaymentMethod | ||
{ | ||
protected $_code = 'paynl_payment_visa'; | ||
|
||
/** | ||
* @return integer | ||
*/ | ||
protected function getDefaultPaymentOptionId() | ||
{ | ||
return 3141; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
<?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_mastercard" sortOrder="1103" showInDefault="1" showInWebsite="1" showInStore="1"> | ||
<label>Mastercard</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\Mastercard</source_model> | ||
<config_path>payment/paynl_payment_mastercard/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_mastercard/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_mastercard/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_mastercard/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_mastercard/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_mastercard/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_mastercard/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_mastercard/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_mastercard/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_mastercard/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_mastercard/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_mastercard/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_mastercard/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>Customer Type</label> | ||
<source_model>Paynl\Payment\Model\Config\Source\ShowCompanyOptions</source_model> | ||
<depends> | ||
<field id="active">1</field> | ||
</depends> | ||
<config_path>payment/paynl_payment_mastercard/showforcompany</config_path> | ||
<tooltip>By default payment methods are available in the checkout for all customer types. | ||
Private, B2C: Only show this payment method when the customer didn't enter a company name. | ||
Business, BB2: Only show this payment method when the customer entered a company name.</tooltip> | ||
<comment><![CDATA[Specify which type of customer this payment method should be available to.]]></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_mastercard/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_mastercard/payment_option_id</config_path> | ||
</field> | ||
</group> | ||
</group> | ||
</include> | ||
|
Oops, something went wrong.