diff --git a/src/OrderActions/Order.php b/src/OrderActions/Order.php index e0c7ecb..5e49f3e 100644 --- a/src/OrderActions/Order.php +++ b/src/OrderActions/Order.php @@ -53,14 +53,15 @@ class Order /** * @param $params + * @param $api * @return mixed|string * @throws GuzzleException * @throws HttpException * @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'])) { throw new InvalidArgumentException('Invalid response format: ' . $this->format); @@ -70,6 +71,8 @@ class Order throw new InvalidArgumentException('Invalid type value(base/all): ' . $this->type); } + // 附加参数 + $params['times'] = time(); $params['output'] = $this->format; $params['extensions'] = $this->type; @@ -109,6 +112,6 @@ class Order $data = [ 'order_sn' => $order_sn ]; - return $this->baseFun($data); + return $this->baseFun($data, 'production.status'); } }