请求方式:GET
注:请求参数须区分大小写
$data = [
'appKey' => "xxxxxxxxxxxx",
'version' => "v1.2.1",
...
];
$host = "https://openapi.dataoke.com/open-api/vip/refund-order-list";
$url = $host;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$header = [
'Content-Type: application/json',
'Client-Sdk-Type: php',
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$output = curl_exec($ch);
$a = curl_error($ch);
if(!empty($a)){
return json_encode(array('code'=>10003, 'msg'=>$a));
}
curl_close($ch);
return $output;
SDK调用示例
$client = new VipRefundOrderList();
$client->setAppKey("xxxxxxxxx");
$client->setAppSecret("xxxxxxxxxxxxxxxxxxxxxxxxx");
$client->setVersion("v1.2.1");
$res = $client->setParams([])->request();
{
"cache": false,
"code": 0,
"data": {
"page": 0,
"pageSize": 20,
"refundOrderInfoList": [],
"total": 0
},
"msg": "ok",
"requestId": "c311bbe88d8d4d83eecde532c16e2cd6",
"time": 1655200788063106
}