将订单和所有关联的订单项目设置为待处理状态
请求参数
参数 | 类型 | 说明 | 必需的 |
---|---|---|---|
action | string | “PendingOrder” | Required |
orderid | int | 要接受的订单ID | Required |
响应参数
参数 | 类型 | 说明 |
---|---|---|
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' => 'PendingOrder',
// 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 = 'PendingOrder';
$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"
}
错误响应
可能的错误条件响应包括:
- 未找到订单 ID
相关用法
- PHP WHMCS PreAutomationTask用法及代码示例
- PHP WHMCS PreModuleRenew用法及代码示例
- PHP Pool::submitTo()用法及代码示例
- PHP WHMCS PayMethodMigration用法及代码示例
- PHP WHMCS PremiumPriceOverride用法及代码示例
- PHP WHMCS PreModuleProvisionAddOnFeature用法及代码示例
- PHP WHMCS PreRegistrarGetDNS用法及代码示例
- PHP WHMCS PreRegistrarGetNameservers用法及代码示例
- PHP WHMCS PreRegistrarSaveContactDetails用法及代码示例
- PHP Pool::construct()用法及代码示例
- PHP WHMCS PreEmailSendReduceRecipients用法及代码示例
- PHP WHMCS ProductAddonDelete用法及代码示例
- PHP WHMCS PreRegistrarRenewDomain用法及代码示例
- PHP WHMCS PreModuleCreate用法及代码示例
- PHP WHMCS PreFraudCheck用法及代码示例
- PHP WHMCS PreCalculateCartTotals用法及代码示例
- PHP WHMCS PreRegistrarTransferDomain用法及代码示例
- PHP WHMCS PreModuleSuspendAddOnFeature用法及代码示例
- PHP WHMCS PreRegistrarGetContactDetails用法及代码示例
- PHP WHMCS PreUpgradeCheckout用法及代码示例
- PHP WHMCS PreModuleChangePassword用法及代码示例
- PHP WHMCS PreRegistrarGetEPPCode用法及代码示例
- PHP WHMCS PreShoppingCartCheckout用法及代码示例
- PHP WHMCS PreModuleDeprovisionAddOnFeature用法及代码示例
- PHP WHMCS PreModuleCustom用法及代码示例
注:本文由纯净天空筛选整理自whmcs.com大神的英文原创作品 PendingOrder。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。