@@ -732,72 +732,37 @@ public static function ppmfwc_addGlobalSettings()
732732 'id ' => 'paynl_setup ' ,
733733 );
734734
735- if ($ isConfiguredInWpConfig ) {
736- $ addedSettings [] = array (
737- 'name ' => esc_html (__ ('Token Code * ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN )),
738- 'type ' => 'text ' ,
739- 'desc ' => esc_html (__ ('This credential is set in the config and can \'t be changed here. ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN )),
740- 'id ' => 'paynl_tokencode_readonly ' ,
741- 'default ' => 'Token Code ' ,
742- 'custom_attributes ' => array ('readonly ' => 'readonly ' , 'style ' => 'background-color: #f1f1f1; ' ),
743- );
744- $ addedSettings [] = array (
745- 'name ' => esc_html (__ ('API token ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN )),
746- 'type ' => 'text ' ,
747- 'desc ' => esc_html (__ ('This credential is set in the config and can \'t be changed here. ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN )),
748- 'id ' => 'paynl_apitoken_readonly ' ,
749- 'default ' => 'API token ' ,
750- 'custom_attributes ' => array ('readonly ' => 'readonly ' , 'style ' => 'background-color: #f1f1f1; ' ),
751- );
752- $ addedSettings [] = array (
753- 'name ' => esc_html (__ ('Sales Location * ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN )),
754- 'type ' => 'text ' ,
755- 'desc ' => esc_html (__ ('This credential is set in the config and can \'t be changed here. ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN )),
756- 'id ' => 'paynl_serviceid_readonly ' ,
757- 'default ' => 'Service ID ' ,
758- 'custom_attributes ' => array ('readonly ' => 'readonly ' , 'style ' => 'background-color: #f1f1f1; ' ),
759- );
760- } else {
761- $ addedSettings [] = array (
762- 'name ' => esc_html (__ ('Token Code * ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN )),
763- 'placeholder ' => 'AT-####-#### ' ,
764- 'type ' => 'text ' ,
765- 'desc ' => esc_html (
766- __ (
767- 'The AT-code belonging to your API token, you can find this ' ,
768- PPMFWC_WOOCOMMERCE_TEXTDOMAIN
769- )
770- ) . '<a href="https://admin.pay.nl/company/tokens" target="api_token"> ' . esc_html (__ ('here ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN )) . '</a> ' ,
771- 'id ' => 'paynl_tokencode ' ,
772- 'desc_tip ' => __ ('The Token Code should be in the following format: AT-xxxx-xxxx <br/> Optionally, this credential can be defined in the config as "PAYNL_TOKEN_CODE" ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN ),
773- );
774- $ addedSettings [] = array (
775- 'name ' => esc_html (__ ('API token ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN )),
776- 'type ' => 'text ' ,
777- 'desc ' => esc_html (
778- __ (
779- 'The API token used to communicate with the Pay. API, you can find your API token ' ,
780- PPMFWC_WOOCOMMERCE_TEXTDOMAIN
781- )
782- ) . '<a href="https://admin.pay.nl/company/tokens" target="api_token"> ' . esc_html (__ ('here ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN )) . '</a> ' ,
783- 'id ' => 'paynl_apitoken ' ,
784- 'class ' => 'obscuredInput ' ,
785- 'desc_tip ' => __ ('Optionally, this credential can be defined in the config as "PAYNL_API_TOKEN" ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN ),
786- );
787- $ addedSettings [] = array (
788- 'name ' => esc_html (__ ('Sales Location * ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN )),
789- 'placeholder ' => 'SL-####-#### ' ,
790- 'type ' => 'text ' ,
791- 'desc ' => esc_html (
792- __ (
793- 'The SL-code of your Sales Location, you can find your SL-code ' ,
794- PPMFWC_WOOCOMMERCE_TEXTDOMAIN
795- )
796- ) . '<a href="https://admin.pay.nl/programs/programs" target="serviceid"> ' . esc_html (__ ('here ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN )) . '</a> ' ,
797- 'id ' => 'paynl_serviceid ' ,
798- 'desc_tip ' => __ ('The Sales Location should be in the following format: SL-xxxx-xxxx <br/> Optionally, this credential can be defined in the config as "PAYNL_SERVICE_ID" ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN ),
799- );
800- }
735+ $ addedSettings [] = array (
736+ 'name ' => esc_html (__ ('Token Code * ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN )),
737+ 'placeholder ' => 'AT-####-#### ' ,
738+ 'type ' => $ isConfiguredInWpConfig ? 'info ' : 'text ' ,
739+ 'text ' => 'Token Code ' ,
740+ 'desc ' => esc_html (__ ('The AT-code belonging to your API token, you can find this ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN )) . '<a href="https://admin.pay.nl/company/tokens" target="api_token"> ' . esc_html (__ ('here ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN )) . '</a> ' ,
741+ 'id ' => 'paynl_tokencode ' ,
742+ 'desc_tip ' => __ ('The Token Code should be in the following format: AT-xxxx-xxxx <br/> Optionally, this credential can be defined in the config as "PAYNL_TOKEN_CODE" ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN ),
743+ );
744+
745+ $ addedSettings [] = array (
746+ 'name ' => esc_html (__ ('API token ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN )),
747+ 'type ' => $ isConfiguredInWpConfig ? 'info ' : 'text ' ,
748+ 'text ' => 'API Token ' ,
749+ 'desc ' => esc_html (__ ('The API token used to communicate with the Pay. API, you can find your API token ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN )) .
750+ '<a href="https://admin.pay.nl/company/tokens" target="api_token"> ' . esc_html (__ ('here ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN )) . '</a> ' ,
751+ 'id ' => 'paynl_apitoken ' ,
752+ 'class ' => 'obscuredInput ' ,
753+ 'desc_tip ' => __ ('Optionally, this credential can be defined in the config as "PAYNL_API_TOKEN" ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN ),
754+ );
755+
756+ $ addedSettings [] = array (
757+ 'name ' => esc_html (__ ('Sales Location * ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN )),
758+ 'placeholder ' => 'SL-####-#### ' ,
759+ 'type ' => $ isConfiguredInWpConfig ? 'info ' : 'text ' ,
760+ 'text ' => 'Service ID ' ,
761+ 'desc ' => esc_html (__ ('The SL-code of your Sales Location, you can find your SL-code ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN )) .
762+ '<a href="https://admin.pay.nl/programs/programs" target="serviceid"> ' . esc_html (__ ('here ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN )) . '</a> ' ,
763+ 'id ' => 'paynl_serviceid ' ,
764+ 'desc_tip ' => __ ('The Sales Location should be in the following format: SL-xxxx-xxxx <br/> Optionally, this credential can be defined in the config as "PAYNL_SERVICE_ID" ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN ),
765+ );
801766 $ addedSettings [] = array (
802767 'name ' => esc_html (__ ('Test mode ' , PPMFWC_WOOCOMMERCE_TEXTDOMAIN )),
803768 'type ' => 'checkbox ' ,
0 commit comments