-
Notifications
You must be signed in to change notification settings - Fork 35
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 #1038 from buckaroo-it/BP-3685-Add-payment-method-…
…Blik-Magento-2-refactor Bp 3685 add payment method blik magento 2 refactor
- Loading branch information
Showing
17 changed files
with
438 additions
and
8 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
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
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,34 @@ | ||
<?php | ||
/** | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the MIT License | ||
* It is available through the world-wide-web at this URL: | ||
* https://tldrlegal.com/license/mit-license | ||
* If you are unable to obtain it through the world-wide-web, please email | ||
* to [email protected], so we can send you a copy immediately. | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade this module to newer | ||
* versions in the future. If you wish to customize this module for your | ||
* needs please contact [email protected] for more information. | ||
* | ||
* @copyright Copyright (c) Buckaroo B.V. | ||
* @license https://tldrlegal.com/license/mit-license | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Buckaroo\Magento2\Model\ConfigProvider\Method; | ||
|
||
class Blik extends AbstractConfigProvider | ||
{ | ||
public const CODE = 'buckaroo_magento2_blik'; | ||
|
||
/** | ||
* @var array | ||
*/ | ||
protected $allowedCurrencies = [ | ||
'PLN' | ||
]; | ||
} |
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,172 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the MIT License | ||
* It is available through the world-wide-web at this URL: | ||
* https://tldrlegal.com/license/mit-license | ||
* If you are unable to obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade this module to newer | ||
* versions in the future. If you wish to customize this module for your | ||
* needs please contact [email protected] for more information. | ||
* | ||
* @copyright Copyright (c) Buckaroo B.V. | ||
* @license https://tldrlegal.com/license/mit-license | ||
*/ | ||
--> | ||
<include xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_include.xsd"> | ||
<!-- Blik Payment method group --> | ||
<group id="buckaroo_magento2_blik" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> | ||
<label>Blik</label> | ||
<frontend_model>Buckaroo\Magento2\Block\Config\Form\Field\Fieldset</frontend_model> | ||
|
||
<field id="active" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> | ||
<label>Enable Blik</label> | ||
<comment><![CDATA[Enable or disable this payment method.]]></comment> | ||
<source_model>Buckaroo\Magento2\Model\Config\Source\Enablemode</source_model> | ||
<config_path>payment/buckaroo_magento2_blik/active</config_path> | ||
</field> | ||
|
||
<field id="title" translate="label comment" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> | ||
<label>Frontend label</label> | ||
<comment><![CDATA[Determines the frontend label shown.]]></comment> | ||
<config_path>payment/buckaroo_magento2_blik/title</config_path> | ||
</field> | ||
|
||
<field id="subtext" translate="label comment" type="text" sortOrder="25" showInDefault="1" showInWebsite="1" showInStore="1"> | ||
<label>Frontend subtext</label> | ||
<comment><![CDATA[This controls the description which the user sees during checkout.]]></comment> | ||
<config_path>payment/buckaroo_magento2_blik/subtext</config_path> | ||
</field> | ||
|
||
<field id="subtext_style" translate="label comment" type="select" sortOrder="26" showInDefault="1" showInWebsite="1" showInStore="1"> | ||
<label>Frontend subtext style</label> | ||
<comment><![CDATA[Choose a font style for the subtext.]]></comment> | ||
<source_model>Buckaroo\Magento2\Model\Config\Source\SubtextStyle</source_model> | ||
<config_path>payment/buckaroo_magento2_blik/subtext_style</config_path> | ||
</field> | ||
|
||
<field id="subtext_color" translate="label comment" sortOrder="27" showInDefault="1" showInWebsite="1" showInStore="1"> | ||
<label>Frontend subtext color</label> | ||
<comment><![CDATA[Choose a font color for the subtext.]]></comment> | ||
<config_path>payment/buckaroo_magento2_blik/subtext_color</config_path> | ||
<frontend_model>Buckaroo\Magento2\Block\Config\Form\Field\ColorPicker</frontend_model> | ||
</field> | ||
|
||
|
||
<field id="sort_order" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> | ||
<label>Frontend sort order</label> | ||
<comment><![CDATA[Determines the sorting of payment methods.]]></comment> | ||
<config_path>payment/buckaroo_magento2_blik/sort_order</config_path> | ||
</field> | ||
|
||
<group id="buckaroo_magento2_advanced" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> | ||
<label>Advanced Configuration</label> | ||
|
||
<field id="order_email" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> | ||
<label>Send order confirmation email</label> | ||
<comment><![CDATA[Enable to send an order confirmation email to the customer when the creating of the order is successful. Specific for this payment method.]]></comment> | ||
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model> | ||
<config_path>payment/buckaroo_magento2_blik/order_email</config_path> | ||
</field> | ||
|
||
<field id="payment_fee" translate="label comment" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> | ||
<label>Payment fee</label> | ||
<comment><![CDATA[The above amount is calculated based on de Tax settings in Stores > Configuration > Sales > Tax.]]></comment> | ||
<config_path>payment/buckaroo_magento2_blik/payment_fee</config_path> | ||
<backend_model>Buckaroo\Magento2\Model\Config\Backend\PaymentFee</backend_model> | ||
</field> | ||
|
||
<field id="payment_fee_label" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> | ||
<label>Payment fee frontend label</label> | ||
<comment><![CDATA[This label will be displayed next to the fee on the checkout, order, invoice and creditmemo pages and pdfs.]]></comment> | ||
<config_path>payment/buckaroo_magento2_blik/payment_fee_label</config_path> | ||
</field> | ||
|
||
<field id="active_status" translate="label comment" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> | ||
<label>Method specific status enabled</label> | ||
<comment><![CDATA[Enable or disable specific status.]]></comment> | ||
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model> | ||
<config_path>payment/buckaroo_magento2_blik/active_status</config_path> | ||
</field> | ||
|
||
<field id="order_status_success" translate="label comment tooltip" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1"> | ||
<label>Method specific success status</label> | ||
<comment><![CDATA[Leave empty to use default 'success' status.]]></comment> | ||
<tooltip>To make a new status available it needs to be assigned to the correct state. See Magento documentation about state and status.</tooltip> | ||
<source_model>Buckaroo\Magento2\Model\Config\Source\StatusesSuccess</source_model> | ||
<config_path>payment/buckaroo_magento2_blik/order_status_success</config_path> | ||
<depends> | ||
<field id="active_status">1</field> | ||
</depends> | ||
</field> | ||
|
||
<field id="order_status_failed" translate="label comment tooltip" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1"> | ||
<label>Method specific failed status</label> | ||
<comment><![CDATA[Leave empty to use default 'failed' status.]]></comment> | ||
<tooltip>To make a new status available it needs to be assigned to the correct state. See Magento documentation about state and status.</tooltip> | ||
<source_model>Buckaroo\Magento2\Model\Config\Source\StatusesFailed</source_model> | ||
<config_path>payment/buckaroo_magento2_blik/order_status_failed</config_path> | ||
<depends> | ||
<field id="active_status">1</field> | ||
</depends> | ||
</field> | ||
|
||
<group id="buckaroo_magento2_visibility" translate="label" type="text" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1"> | ||
<label>Method visibility</label> | ||
<field id="min_amount" translate="label comment tooltip" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> | ||
<label>Min order amount (in Base Currency)</label> | ||
<comment><![CDATA[Minimum order amount allowed.]]></comment> | ||
<tooltip>The payment method shows only for orders with an order amount greater than the minimum amount.</tooltip> | ||
<config_path>payment/buckaroo_magento2_blik/min_amount</config_path> | ||
<backend_model>Buckaroo\Magento2\Model\Config\Backend\Price</backend_model> | ||
</field> | ||
|
||
<field id="max_amount" translate="label comment tooltip" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> | ||
<label>Max order amount (in Base Currency)</label> | ||
<comment><![CDATA[Maximum order amount allowed.]]></comment> | ||
<tooltip>The payment method shows only for orders with an order amount smaller than the maximum amount.</tooltip> | ||
<config_path>payment/buckaroo_magento2_blik/max_amount</config_path> | ||
<backend_model>Buckaroo\Magento2\Model\Config\Backend\Price</backend_model> | ||
</field> | ||
|
||
<field id="specificcustomergroup" translate="label" type="multiselect" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> | ||
<label>Allow customer groups</label> | ||
<source_model>Buckaroo\Magento2\Model\Config\Source\SpecificCustomerGroups</source_model> | ||
<can_be_empty>1</can_be_empty> | ||
<config_path>payment/buckaroo_magento2_blik/specificcustomergroup</config_path> | ||
</field> | ||
|
||
<field id="allowspecific" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> | ||
<label>Payment from applicable countries</label> | ||
<source_model>Buckaroo\Magento2\Model\Config\Source\AllOrSpecificCountries</source_model> | ||
<config_path>payment/buckaroo_magento2_blik/allowspecific</config_path> | ||
</field> | ||
|
||
<field id="specificcountry" translate="label comment" type="multiselect" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1"> | ||
<label>Payment from Specific Country</label> | ||
<comment><![CDATA[Only available when set to 'specific countries'.]]></comment> | ||
<source_model>Magento\Config\Model\Config\Source\Locale\Country</source_model> | ||
<config_path>payment/buckaroo_magento2_blik/specificcountry</config_path> | ||
<depends> | ||
<field id="allowspecific">1</field> | ||
</depends> | ||
</field> | ||
|
||
<field id="allowed_currencies" translate="label comment tooltip" type="multiselect" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1"> | ||
<label>Allowed currencies</label> | ||
<comment><![CDATA[Select payment method specific currencies.]]></comment> | ||
<tooltip>Your contract with Buckaroo must allow for the selected currencies to be used with this payment method.</tooltip> | ||
<config_path>payment/buckaroo_magento2_blik/allowed_currencies</config_path> | ||
<source_model>Buckaroo\Magento2\Model\Config\Source\AllowedCurrencies::blik</source_model> | ||
<backend_model>Buckaroo\Magento2\Model\Config\Backend\AllowedCurrencies</backend_model> | ||
</field> | ||
</group> | ||
</group> | ||
</group> | ||
</include> |
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
Oops, something went wrong.