ValidateConfigData
This section describes one of the fraud screening methods used in the development of fraud screening plugins that allow CloudBlue Commerce to integrate with third-party fraud screening systems. For more information, refer to Overview and How to Develop Fraud Screening Plugins.
Method naming convention
%PluginName%_ValidateConfigData
Purpose
This method allows CloudBlue Commerce to validate the configuration parameter values provided by the user on the Edit Plug-in Configuration screen in the provider control panel.
Mandatory / optional
This is one of the generic methods implemented optionally.
Input Parameters
config
: an associative array of the values of configuration parameters entered by the user on the Edit Plug-in Configuration screen.
Return Parameters
validation_result
: an object of the\FraudSDK\ValidationResult
type that consists of two components:- a Boolean flag that indicates whether the associative array of values passed by the
config
parameter is valid or invalid. - a string message that is displayed on the Edit Plug-in Configuration screen.
- a Boolean flag that indicates whether the associative array of values passed by the
Relationship with other methods
None.
Implementation example. V&E plugin
function VNEDemo_ValidateConfigData($config) { $result = \FraudSDK\createValidationResult(); $result->setValid() ->setMessage('config is valid'); return $result; }