CheckCondition

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

Purpose

This method performs fraud checks.

Mandatory / optional

This method is mandatory for both blacklist and non-blacklist plugins. However, it is not necessary for validation and eligibility plugins. See How to Develop Fraud Screening Plug-ins and fraud screening methods.

Input Parameters

  • check_condition: an object of the \FraudSDK\CheckCondition type that defines the order data, the account data, the payment data and so on to be checked for potential fraud:

    DB Table Name Parameters (sub-grouped logically)
    Payment
    • DocID
    • Total
    • CurrencyID
    • Description
    • FromIP
    Account
    • AccountID
    • VendorAccountID
    • Type
    • AccCurrencyCurrencyID
    • ClassID
    • TaxRegID
    • TaxRegIDStatus
    • TaxZoneID
    • systemID
    • ExternalID
    • CompanyName
    • CompanyNameLatin
    • Address1
    • Address2
    • City
    • State
    • Zip
    • CountryID
    • PostalAddress
    • AdminFName
    • AdminMName
    • AdminLName
    • AdminEmail
    • AdminPhCountryCode
    • AdminPhAreaCode
    • AdminPhNumber
    • AdminPhExtention
    • AdminFaxCountryCode
    • AdminFaxAreaCode
    • AdminFaxNumber
    • AdminFaxExtention
    • BillFName
    • BillMName
    • BillLName
    • BillEmail
    • BillPhCountryCode
    • BillPhAreaCode
    • BillPhNumber
    • BillPhExtention
    • BillFaxCountryCode
    • BillFaxAreaCode
    • BillFaxNumber
    • BillFaxExtention
    • TechFName
    • TechMName
    • TechLName
    • TechEmail
    • TechPhCountryCode
    • TechPhAreaCode
    • TechPhNumber
    • TechPhExtention
    • TechFaxCountryCode
    • TechFaxAreaCode
    • TechFaxNumber
    • TechFaxExtention
    • PersFName
    • PersMName
    • PersLName
    • Birthday
    • Passport
    • PersEmail
    • PersPhCountryCode
    • PersPhAreaCode
    • PersPhNumber PersPhExtention
    • PersFaxCountryCode
    • PersFaxAreaCode
    • PersFaxNumber
    • PersFaxExtention
    • TaxStatus SalesID
    • BranchID
    • LocaleID
    AccountAttributes
    • ATID
    • Value
    Order
    • OrderID
    • OrderNbr
    • OrderTypeID
    • OrderStatusID
    • CurrencyID
    • MerchTotal
    • Total
    • TaxTotal
    • extraTaxTotal – calculated field (= Total - MerchTotal)
    • SalesID
    • BranchID
    OrderDomains
    • Full Domain Name
    OrderItems
    • Service Plan:
      • Plan ID
      • plan Name
      • service Template ID
      • service Template Name
    • Service Plan Period:
      • period in seconds
      • is Trial
      • setup Fee
      • subscription Fee
      • renewal Fee
      • transfer Fee
      • deposit Fee
    • Subscription:
      • ID
      • period in seconds
      • name
      • start date
    OrderDetails
    • Service Plan:
      • plan ID
      • plan Name
      • service Template ID
      • service Template Name
    • BMResource:
      • ID
      • Name
      • Descr

Return Parameters

  • check_result: the fraud check result. Object of the \FraudSDK\CheckConditionResult type.

Relationship with other methods

  • GetRequiredData returns a set of flags that define the data to be passed in the input for this method.

Implementation example. Blacklist plugin

function BlacklistDemo_CheckCondition($check_condition)
{
    $zip = $check_condition->getCustomerZip();
    $blacklist = $check_condition->getBlacklist();

    $is_blacklisted = (_isZipBlacklisted($blacklist, $zip) !== FALSE);

    if ($is_blacklisted)
    {
        return \FraudSDK\createCheckConditionResult()
            ->setResultFulfilled()
            ->setCheckedValue($zip)
            ->setInBlacklist()
            ->setMessage('Customer ZIP code is blacklisted');
    }

    return \FraudSDK\createCheckConditionResult()
        ->setResultUnfulfilled()
        ->setCheckedValue($zip)
        ->setNotInBlacklist()
        ->setMessage('Customer ZIP code is not blacklisted');
}
CloudBlue, an Ingram Micro business, uses cookies to improve the usability of our site. By continuing to use this site and/or logging in you are accepting the use of these cookies. For more information, visit our Privacy Policy.