|
@@ -112,8 +112,11 @@ class Client implements ClientInterface |
|
@@ -112,8 +112,11 @@ class Client implements ClientInterface |
|
112
|
'timestamp' => date('Y-m-d H:i:s'),
|
112
|
'timestamp' => date('Y-m-d H:i:s'),
|
|
113
|
] + $pathQueryArray;
|
113
|
] + $pathQueryArray;
|
|
114
|
$data['sign'] = SignatureUtil::generate($data, Arr::get($this->config, 'app_secret'));
|
114
|
$data['sign'] = SignatureUtil::generate($data, Arr::get($this->config, 'app_secret'));
|
|
|
|
115
|
+ ksort($data);
|
|
115
|
$response = $this->guzzleClient->request($this->request->getMethod(), $this->request->getPath(), [
|
116
|
$response = $this->guzzleClient->request($this->request->getMethod(), $this->request->getPath(), [
|
|
116
|
- $key => $data,
|
117
|
+ $key => array_filter($data, function ($v) {
|
|
|
|
118
|
+ return !(is_null($v) || $v === '');
|
|
|
|
119
|
+ }),
|
|
117
|
RequestOptions::HEADERS => [
|
120
|
RequestOptions::HEADERS => [
|
|
118
|
'Content-Type' => 'application/json;charset=UTF-8',
|
121
|
'Content-Type' => 'application/json;charset=UTF-8',
|
|
119
|
]
|
122
|
]
|