增加SDK签名时间戳参数
This commit is contained in:
parent
a7fe8503fd
commit
21e28aee92
|
@ -53,14 +53,15 @@ class Order
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $params
|
* @param $params
|
||||||
|
* @param $api
|
||||||
* @return mixed|string
|
* @return mixed|string
|
||||||
* @throws GuzzleException
|
* @throws GuzzleException
|
||||||
* @throws HttpException
|
* @throws HttpException
|
||||||
* @throws InvalidArgumentException
|
* @throws InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
public function baseFun($params)
|
public function baseFun($params, $api)
|
||||||
{
|
{
|
||||||
$url = $this->apiUrl . 'production.status';
|
$url = $this->apiUrl . $api;
|
||||||
|
|
||||||
if (!in_array(strtolower($this->format), ['xml', 'json'])) {
|
if (!in_array(strtolower($this->format), ['xml', 'json'])) {
|
||||||
throw new InvalidArgumentException('Invalid response format: ' . $this->format);
|
throw new InvalidArgumentException('Invalid response format: ' . $this->format);
|
||||||
|
@ -70,6 +71,8 @@ class Order
|
||||||
throw new InvalidArgumentException('Invalid type value(base/all): ' . $this->type);
|
throw new InvalidArgumentException('Invalid type value(base/all): ' . $this->type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 附加参数
|
||||||
|
$params['times'] = time();
|
||||||
$params['output'] = $this->format;
|
$params['output'] = $this->format;
|
||||||
$params['extensions'] = $this->type;
|
$params['extensions'] = $this->type;
|
||||||
|
|
||||||
|
@ -109,6 +112,6 @@ class Order
|
||||||
$data = [
|
$data = [
|
||||||
'order_sn' => $order_sn
|
'order_sn' => $order_sn
|
||||||
];
|
];
|
||||||
return $this->baseFun($data);
|
return $this->baseFun($data, 'production.status');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue