将订单标记为欺诈。
请求参数
参数 | 类型 | 说明 | 必需的 |
---|---|---|---|
action | string | “FraudOrder” | Required |
orderid | int | 设置为欺诈的订单 ID | Required |
cancelsub | bool | 传递为 true 以取消与属于给定订单的产品和服务关联的任何 PayPal 订阅。 | Optional |
响应参数
参数 | 类型 | 说明 |
---|---|---|
result | 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' => 'FraudOrder',
// See https://developers.whmcs.com/api/authentication
'username' => 'IDENTIFIER_OR_ADMIN_USERNAME',
'password' => 'SECRET_OR_HASHED_PASSWORD',
'orderid' => '1',
'cancelsub' => '1',
'responsetype' => 'json',
)
)
);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
示例请求(本地 API)
$command = 'FraudOrder';
$postData = array(
'orderid' => '1',
'cancelsub' => '1',
);
$adminUsername = 'ADMIN_USERNAME'; // Optional for WHMCS 7.2 and later
$results = localAPI($command, $postData, $adminUsername);
print_r($results);
示例响应 JSON
{
"result": "success"
}
错误响应
可能的错误条件响应包括:
- 未找到订单 ID
- 订阅取消失败 - 请查看网关日志以获取更多信息
相关用法
- PHP WHMCS FraudCheckAwaitingUserInput用法及代码示例
- PHP WHMCS FraudCheckFailed用法及代码示例
- PHP WHMCS FraudCheckPassed用法及代码示例
- PHP FrenchToJD()用法及代码示例
- PHP FilesystemIterator __construct()用法及代码示例
- PHP FilesystemIterator getFlags()用法及代码示例
- PHP FilesystemIterator next()用法及代码示例
- PHP WHMCS FormatDateTimeForClientAreaOutput用法及代码示例
- PHP WHMCS FileDownload用法及代码示例
- PHP FilesystemIterator rewind()用法及代码示例
- PHP FilesystemIterator key()用法及代码示例
- PHP FilesystemIterator current()用法及代码示例
- PHP FilesystemIterator setFlags()用法及代码示例
- PHP WHMCS FormatDateForClientAreaOutput用法及代码示例
- PHP WHMCS FetchCurrencyExchangeRates用法及代码示例
- 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()用法及代码示例
注:本文由纯净天空筛选整理自whmcs.com大神的英文原创作品 FraudOrder。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。