GetAnswers

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

Purpose

This method is used for CloudBlue Commerce to receive the list of possible plug-in answers for the conditions of a rule. These answers will be listed on the rule condition creation screen as value options for the user to choose from.

Mandatory / optional

This is one of the generic methods implemented optionally. However, this method is not used in validation and eligibility plug-ins because such plug-ins do not use fraud screening rules.

Input Parameters

None

Return Parameters

  • answers – object of the \FraudSDK\Answers type that describes a set of possible plug-in answers for rule conditions.

Relationship with other methods

None

Implementation examples

Example 1. V&E plug-in

function VNEDemo_GetAnswers()
{
    return
        \FraudSDK\createAnswers()
        ->addAnswer('successfull');
}

Example 2. Blacklist plug-in

function BlacklistDemo_GetAnswers()
{
    $answers = \FraudSDK\createAnswers();

    $answers->addAnswer('amongst blacklisted ZIP codes');

    return $answers;
}