使用活動欺詐模塊對傳遞的訂單 ID 運行欺詐檢查。
請求參數
參數 | 類型 | 說明 | 必需的 |
---|---|---|---|
action | string | “OrderFraudCheck” | Required |
orderid | int | 完成欺詐檢查的訂單 ID | Required |
ipaddress | string | 覆蓋欺詐檢查上的 IP 地址 | Optional |
響應參數
參數 | 類型 | 說明 |
---|---|---|
result | string | 操作結果:成功或錯誤 |
status | string | 欺詐檢查的狀態 |
module | string | 為完成欺詐檢查而加載的模塊 |
results | string | 欺詐檢查的序列化結果 |
示例請求 (CURL)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.example.com/includes/api.php');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
http_build_query(
array(
'action' => 'OrderFraudCheck',
// See https://developers.whmcs.com/api/authentication
'username' => 'IDENTIFIER_OR_ADMIN_USERNAME',
'password' => 'SECRET_OR_HASHED_PASSWORD',
'orderid' => '1',
'responsetype' => 'json',
)
)
);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
示例請求(本地 API)
$command = 'OrderFraudCheck';
$postData = array(
'orderid' => '1',
);
$adminUsername = 'ADMIN_USERNAME'; // Optional for WHMCS 7.2 and later
$results = localAPI($command, $postData, $adminUsername);
print_r($results);
示例響應 JSON
{
"result": "success",
"module": "maxmind",
"status": "Pass"
}
錯誤響應
可能的錯誤條件響應包括:
- 未找到訂單 ID
- 沒有主動欺詐模塊
相關用法
- PHP WHMCS OrderAddonPricingOverride用法及代碼示例
- PHP WHMCS OrderPaid用法及代碼示例
- PHP WHMCS OrderProductUpgradeOverride用法及代碼示例
- PHP WHMCS OrderDomainPricingOverride用法及代碼示例
- PHP WHMCS OrderProductPricingOverride用法及代碼示例
- PHP WHMCS OpenTicket用法及代碼示例
- PHP WHMCS OverrideModuleUsernameGeneration用法及代碼示例
- PHP WHMCS OverrideOrderNumberGeneration用法及代碼示例
- PHP WHMCS ClientAreaPageDownloads用法及代碼示例
- PHP Ds\Map isEmpty()用法及代碼示例
- PHP PHPUnit assertIsNotFloat()用法及代碼示例
- PHP disk_total_space()用法及代碼示例
- PHP ReflectionClass getTraitAliases()用法及代碼示例
- PHP hash_hmac()用法及代碼示例
- PHP String wordwrap()用法及代碼示例
- PHP XMLWriter endPi()用法及代碼示例
- PHP SimpleXMLElement children()用法及代碼示例
- PHP IntlCalendar getTimeZone()用法及代碼示例
- PHP SplPriorityQueue isCorrupted()用法及代碼示例
- PHP XMLReader::getParserProperty()用法及代碼示例
- PHP imagegif()用法及代碼示例
- PHP imageresolution()用法及代碼示例
- PHP array_reverse()用法及代碼示例
- PHP IntlCalendar getActualMinimum()用法及代碼示例
- PHP WHMCS DomainGetWhoisInfo用法及代碼示例
注:本文由純淨天空篩選整理自whmcs.com大神的英文原創作品 OrderFraudCheck。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。