Fraud Check

The doFraudCheck function performs a fraud check during order checkout or client signup. The doFraudCheck is also execute when fraud module enabled.


Important: Runs when order placed or signup and admin can execute manually on view order page in adminarea
This can only run if your module has enabled in WHASOLS fraud protection page.

The function receives the parameters which define here.

<?php
/**
 * Perform fraud check on order checkout or client signup.
 *
 * When successful, returns to the client invoice page or clientarea as define in general configurations -> invoices tab.
 *
 * @param array $params common module parameters
 *
 * @see https://whasols.com/developers/guide/371-Module-Parameters
 *
 * @return array
 */
function yourmodule_doFraudCheck($params=[], $checkOnly=false) {
    //write your code here
    //incase of error return as mention below:
    return ['status'=>'error','message'=>'Your error message here','data'=>$response];

    //incase of success return as mention below:
    return ['status'=>'success','message'=>'Your success message here','data'=>$response];

    //incase of found as fraudlent return extra parameter fraud true or false as mention below:
    return ['status'=>'success','message'=>'Your success message here','data'=>$response,'fraud'=>true];

}


fraud parameters return as true or false in return Array

Click here to read about fraud module Fraud Results