Settings module
Learn more about the Settings module.
The Settings
module registers the plugin settings. To access the settings, select WooCommerce, select Settings, select Payments, then select Digital River.
Settings
The following fields are registered by the module:
Field Name | Description |
Enable/Disable | Enables or disables the Digital River's payment gateway |
Title | Title for the Digital River payment gateway. This would be visible on the Checkout page. |
Description | Description of the payment gateway. This would be visible on the Checkout page. |
Test Mode | If active, use test credentials from Digital River. |
Debug Mode | Logs API calls and exceptions. Logged information is available. |
Enhanced Currency Service | Enables the Digital River local pricing feature. Refer to Local pricing for more information. Keep this enabled for enhanced currency support. |
Enhanced Currency Config | Enter values in this field to limit the Countries and Currencies available through the Local pricing feature. Each entry is entered as a JSON object formatted with each Country being assigned to an array of Currencies. For example:
|
Automatic fulfillment | This determines whether to fulfill the orders automatically. This calls for the Digital River fulfillment API to initiate fulfillment. Currently, only third-party fulfillment is considered. |
Disable Automatic Redirects | Use this feature to toggle the ability to submit then redirect flow on the extension implementation. |
Test public key | Test account's API public key |
Test confidential key | Test account's API secret key |
Live public key | Production account's API public key |
Live confidential key | Production account's API secret key |
Webhook secret key | Found in the Digital River Dashboard's Webhook section |
Settings Interface
The Settings
module implements the following interface:
Method Description
Method | Args, Returns, and Descriptions |
register | Arg: Return: void Description: Registers the new settings to be added in the Settings panel |
get | Arg: string $key (Field Key) Return: mixed Description: Returns the value for any registered setting |
Settings class
This class takes care of accessing the setting fields and their values.
Method | Args, Returns, and Descriptions |
name | Arg: - Return: string Description: Returns the name of the module |
init | Arg: - Return: void Description: Initializes the module |
register | Arg: Return: void Description: Receives a |
register_settings_fields | Arg: - Return: void Description: Loops through all the settings fields data, construct |
add_gateway_class | Arg: array Return: array Description: Adds the Digital River gateway to the list of supported payment gateways |
get_settings | Arg: - Return: array Description: Returns an array of settings fields and their details |
get | Arg: String Return: array Description: Gets a setting's value using the |
Settings Container class
This class defines all the services required for Settings
module.
Method | Args, Returns, and Descriptions |
enabled | Arg: - Return: bool Description: Returns |
logging | Arg: - Return: bool Description: Returns |
webhook_secret | Arg: - Return: String Description: Returns the webhook secret key string |
api_keys | Arg: - Return: array Description: Returns an array containing the two keys, |
Settings Field Model class
This class represents actual fields on the Settings page.
Method | Args, Returns, and Descriptions |
__construct | Arg: array $data Return: void Description: Initializes the field and throws |
get_id | Arg: - Return: String Description: Returns the field |
get_type | Arg: - Return: String Description: Returns the field |
get_title | Arg: - Return: String Description: Returns the field |
get_description | Arg: - Return: String Description: Returns the field |
get_desc_tip | Arg: - Return: String Description: Returns the field |
get_default | Arg: - Return: String Description: Returns the field |
get_label | Arg: - Return: String Description: Returns the field |
Gateway class
This class registers the Digital River payment gateway.
Method | Args, Returns, and Descriptions |
__construct | Arg: - Return: void Description: Configures the payment gateway and calls |
init_form_fields | Arg: - Return: void Description: Calls |
assets | Arg: String $pagehook Return: void Description: Loads the relevant scripts and stylesheets |
generate_dr_test_config_btn_html | Arg: $key, array $value Return: String Description: Generates test connector button HTML. This function will be called by WooCommerce internally |
get_tooltip_html | Arg: array $data Return: String Description: Generates the tooltip HTML based on the data passed as the argument |
Last updated