TestConnection

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%_TestConnection

Purpose

This method allows the user to test the plug-in connection to third-party systems on the plug-in configuration screen in the provider control panel. This method is called when a user presses the Test Connection button in CloudBlue Commerce. The Test Connection button is displayed in CloudBlue Commerce only when this method is implemented.

Mandatory / optional

This is a special connection testing method 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

  • test_connection_result – object of the \FraudSDK\TestConnectionResult type that consists of two components:
    • a boolean flag that indicates whether the connection test was successful or failed.
    • a string message that is displayed on the View Plug-in Configuration screen.

Relationship with other methods

None.

Implementation example. V&E plug-in

function VNEDemo_TestConnection()
{
    $result = \FraudSDK\createTestConnection();

    $result->setSucceed()
           ->setMessage("Ok");

    return $result;
}