From 7b1eef9308819e7deb4b614c99f8c56ac241a4c6 Mon Sep 17 00:00:00 2001 From: Nikola Lardev Date: Fri, 30 Aug 2019 09:33:58 +0300 Subject: [PATCH] Create remaining configuration settings #16 code review fixes --- admin/Source/Currencies.php | 2 +- admin/Source/PaymentAction.php | 28 ++++++++++++++++++++++++++++ admin/etc/adminhtml/system.xml | 14 +++++++------- admin/etc/config.xml | 2 +- admin/etc/module.xml | 6 +----- card-admin/Model/Source/Cctype.php | 2 +- card-admin/etc/adminhtml/system.xml | 4 +--- 7 files changed, 40 insertions(+), 18 deletions(-) create mode 100644 admin/Source/PaymentAction.php diff --git a/admin/Source/Currencies.php b/admin/Source/Currencies.php index 72b6c26..efe3c79 100644 --- a/admin/Source/Currencies.php +++ b/admin/Source/Currencies.php @@ -10,7 +10,7 @@ use Magento\Framework\Data\OptionSourceInterface; /** - * Class ConnectionType + * Class Currencies */ class Currencies implements OptionSourceInterface { diff --git a/admin/Source/PaymentAction.php b/admin/Source/PaymentAction.php new file mode 100644 index 0000000..5748147 --- /dev/null +++ b/admin/Source/PaymentAction.php @@ -0,0 +1,28 @@ + 'authorize', + 'label' => __('Authorize Only'), + ], + [ + 'value' => 'authorize_capture', + 'label' => __('Authorize and Capture') + ] + ]; + } +} diff --git a/admin/etc/adminhtml/system.xml b/admin/etc/adminhtml/system.xml index 62c32af..63a2b61 100755 --- a/admin/etc/adminhtml/system.xml +++ b/admin/etc/adminhtml/system.xml @@ -36,9 +36,9 @@ Pronko\LiqPayAdmin\Source\ConnectionType payment/pronko_liqpay/connection_type - + - Magento\AuthorizenetAcceptjs\Model\Adminhtml\Source\PaymentAction + Pronko\LiqPayAdmin\Source\PaymentAction payment/pronko_liqpay/payment_action @@ -85,18 +85,18 @@ payment/pronko_liqpay/maximum_order_total - + - payment/pronko_liqpay/sort_order + payment/pronko_liqpay/sort_total - + - Magento\Sales\Model\Config\Source\Order\Status\Processing + Magento\Sales\Model\Config\Source\Order\Status Pronko\LiqPayAdmin\Source\Currencies - payment/pronko_liqpay/mode + payment/pronko_liqpay/accepted_currencies diff --git a/admin/etc/config.xml b/admin/etc/config.xml index bbfe341..e8c07ef 100644 --- a/admin/etc/config.xml +++ b/admin/etc/config.xml @@ -18,4 +18,4 @@ - \ No newline at end of file + diff --git a/admin/etc/module.xml b/admin/etc/module.xml index 08ceefa..b0ce250 100644 --- a/admin/etc/module.xml +++ b/admin/etc/module.xml @@ -6,9 +6,5 @@ */ --> - - - - - + diff --git a/card-admin/Model/Source/Cctype.php b/card-admin/Model/Source/Cctype.php index 11708bb..f5c4037 100644 --- a/card-admin/Model/Source/Cctype.php +++ b/card-admin/Model/Source/Cctype.php @@ -18,6 +18,6 @@ class Cctype extends PaymentCctype */ public function getAllowedTypes() { - return ['VI', 'MC', 'AE', 'DI', 'JCB', 'DN']; + return ['VI', 'MC']; } } \ No newline at end of file diff --git a/card-admin/etc/adminhtml/system.xml b/card-admin/etc/adminhtml/system.xml index 7a2dbbd..6648b6e 100644 --- a/card-admin/etc/adminhtml/system.xml +++ b/card-admin/etc/adminhtml/system.xml @@ -7,12 +7,10 @@ complex - other_payment_methods - 1 Magento\Config\Block\System\Config\Form\Fieldset - + Pronko\LiqPayCardAdmin\Model\Source\Cctype