From 84e92656753b2373c3c253ee0c90f9bd61c86bc5 Mon Sep 17 00:00:00 2001 From: Anne Date: Tue, 11 Oct 2022 16:13:48 +0200 Subject: [PATCH 1/4] Testmode extra explanation --- Model/Config/Source/Testmode.php | 38 ++++++++++++++++++++++++++++++++ etc/adminhtml/system.xml | 2 +- i18n/en_US.csv | 2 ++ i18n/nl_NL.csv | 2 ++ 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 Model/Config/Source/Testmode.php diff --git a/Model/Config/Source/Testmode.php b/Model/Config/Source/Testmode.php new file mode 100644 index 00000000..c3e9e308 --- /dev/null +++ b/Model/Config/Source/Testmode.php @@ -0,0 +1,38 @@ +toArray(); + + $arrResult = []; + foreach ($arrOptions as $value => $label) { + $arrResult[] = ['value' => $value, 'label' => $label]; + } + return $arrResult; + } + + /** + * Get options in "key-value" format + * + * @return array + */ + public function toArray() + { + return [ + '0' => __('No - live transactions enabled'), + '1' => __('Yes - test mode enabled'), + ]; + } +} diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml index 21d0a657..891fb73d 100644 --- a/etc/adminhtml/system.xml +++ b/etc/adminhtml/system.xml @@ -14,7 +14,7 @@ - Magento\Config\Model\Config\Source\Yesno + Paynl\Payment\Model\Config\Source\Testmode diff --git a/i18n/en_US.csv b/i18n/en_US.csv index 5409979f..2558d427 100644 --- a/i18n/en_US.csv +++ b/i18n/en_US.csv @@ -131,3 +131,5 @@ "Set which product data to use as product ID in the PAY. backend.","Stel in welke productgegevens u wilt gebruiken als product-ID in de PAY. backend." "Leave shipping address unchanged (Default)","Leave shipping address unchanged (Default)" "Use billing address as shipping address","Use billing address as shipping address" +"Yes - test mode enabled", "Yes - test mode enabled" +"No - live transactions enabled", "No - live transactions enabled" diff --git a/i18n/nl_NL.csv b/i18n/nl_NL.csv index b55d4dd2..547fe94a 100644 --- a/i18n/nl_NL.csv +++ b/i18n/nl_NL.csv @@ -163,3 +163,5 @@ "PAY.: Unable to send E-mail", "PAY.: Kan geen e-mail verzenden" "PAY.: Customer E-mail is empty cannot send E-mail.", "PAY.: E-mail klant is leeg kan geen e-mail verzenden." "Payment pending","Betaling in behandeling" +"Yes - test mode enabled", "Ja - test modus aan" +"No - live transactions enabled", "Nee - live transacties aan" From 0cacf1bcf142a6534592b31f311e5f1b03e3aa36 Mon Sep 17 00:00:00 2001 From: Anne Date: Fri, 14 Oct 2022 11:09:48 +0200 Subject: [PATCH 2/4] requested text changes --- Model/Config/Source/{Testmode.php => TestMode.php} | 2 +- etc/adminhtml/system.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename Model/Config/Source/{Testmode.php => TestMode.php} (94%) diff --git a/Model/Config/Source/Testmode.php b/Model/Config/Source/TestMode.php similarity index 94% rename from Model/Config/Source/Testmode.php rename to Model/Config/Source/TestMode.php index c3e9e308..f63ac40f 100644 --- a/Model/Config/Source/Testmode.php +++ b/Model/Config/Source/TestMode.php @@ -4,7 +4,7 @@ use \Magento\Framework\Option\ArrayInterface; -class Testmode implements ArrayInterface +class TestMode implements ArrayInterface { /** diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml index 891fb73d..d7184bbe 100644 --- a/etc/adminhtml/system.xml +++ b/etc/adminhtml/system.xml @@ -14,7 +14,7 @@ - Paynl\Payment\Model\Config\Source\Testmode + Paynl\Payment\Model\Config\Source\TestMode From 92e6b2f08a6e653a27d940e9dbcd1733a7dcde43 Mon Sep 17 00:00:00 2001 From: woutse Date: Tue, 1 Nov 2022 12:39:18 +0100 Subject: [PATCH 3/4] fixed merge --- etc/adminhtml/system.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml index 223a1686..b86416fc 100644 --- a/etc/adminhtml/system.xml +++ b/etc/adminhtml/system.xml @@ -16,11 +16,6 @@ Paynl\Payment\Block\Adminhtml\Render\Version - - - Paynl\Payment\Model\Config\Source\TestMode - payment/paynl/testmode - @@ -45,7 +40,7 @@ - Magento\Config\Model\Config\Source\Yesno + Paynl\Payment\Model\Config\Source\TestMode payment/paynl/testmode From 5b07d35e60079be1e447b6d6e7fbede98b56b601 Mon Sep 17 00:00:00 2001 From: woutse Date: Tue, 1 Nov 2022 12:40:10 +0100 Subject: [PATCH 4/4] fixed merge --- etc/adminhtml/system.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml index b86416fc..36cf34da 100644 --- a/etc/adminhtml/system.xml +++ b/etc/adminhtml/system.xml @@ -16,6 +16,10 @@ Paynl\Payment\Block\Adminhtml\Render\Version + + + Paynl\Payment\Block\Adminhtml\Render\Credentials +