RemoveFromBlacklist
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%_RemoveFromBlacklist
Purpose
This method removes a particular value from the plug-in's blacklist (if the request contains the data the plug-in can remove from the blacklist).
Mandatory / optional
This is one of the fraud screening methods mandatory for all blacklist plug-ins. However, it is not necessary for non-blacklist or validation and eligibility plug-ins.
Input Parameters
blacklist– array of blacklist records.value– string value to be removed from the blacklist.
Return Parameters
result– object of the\FraudSDK\RemoveFromBlacklisttype that defines the ID of the blacklist record that will be removed from the blacklist.
Relationship with other methods
None.
Implementation example. Blacklist plug-in
function BlacklistDemo_RemoveFromBlacklist($blacklist, $value)
{
$blacklisted_id = _isZipBlacklisted($blacklist, $value);
if ($blacklisted_id === FALSE)
{
return \FraudSDK\createRemoveFromBlacklist();
}
return \FraudSDK\createRemoveFromBlacklist()
->setRemoveId($blacklisted_id)
->setMessage('The ZIP code was removed from the blacklist');
}