diff --git a/Model/Config/Source/TestMode.php b/Model/Config/Source/TestMode.php new file mode 100644 index 00000000..f63ac40f --- /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 d3d48dc6..36cf34da 100644 --- a/etc/adminhtml/system.xml +++ b/etc/adminhtml/system.xml @@ -44,7 +44,7 @@ - Magento\Config\Model\Config\Source\Yesno + Paynl\Payment\Model\Config\Source\TestMode payment/paynl/testmode diff --git a/i18n/en_US.csv b/i18n/en_US.csv index 8eedd180..c3ace7da 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.","Set which product data to use as product ID in the 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 09755ca6..bbe3ebf8 100644 --- a/i18n/nl_NL.csv +++ b/i18n/nl_NL.csv @@ -174,6 +174,8 @@ "Service-ID, API-Token or Tokencode invalid","Service-ID, API-Token of Tokencode zijn onjuist" "Service-ID is invalid.","Service-ID is onjuist" "Service-ID / API-Token combination is invalid.","Service-ID / API-Token combinatie is onjuist" +"Yes - test mode enabled", "Ja - test modus aan" +"No - live transactions enabled", "Nee - live transacties aan" "No logging","Geen logging" "Only Critical errors are logged","Alleen kritieke fouten worden gelogd" "Only Critical errors and Notices are logged","Alleen kritieke fouten en waarschuwingen worden gelogd"