ValidateConfigData

This section describes one of the fraud screening methods used in the development of fraud screening plug-ins that allow CloudBlue Commerce to integrate with third-party fraud screening systems. For more information, please see Overview and How to Develop Fraud Screening Plug-ins.

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 – associative array of the values of configuration parameters entered by the user on the Edit Plug-in Configuration screen.

Return Parameters

  • validation_result – 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.

Relationship with other methods

None.

Implementation example. V&E plug-in

function VNEDemo_ValidateConfigData($config)
{
    $result = \FraudSDK\createValidationResult();

    $result->setValid()
           ->setMessage('config is valid');

    return $result;
}