TestConnection
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%_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
: an associative array of the values of configuration parameters entered by the user on the Edit Plug-in Configuration screen.
Return Parameters
test_connection_result
: an 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 plugin
function VNEDemo_TestConnection() { $result = \FraudSDK\createTestConnection(); $result->setSucceed() ->setMessage("Ok"); return $result; }