|
|
@@ -38,15 +38,15 @@ class Shop extends Shansong
|
|
|
// 计算签名(闪送使用 MD5 签名)
|
|
|
$sign = SignHelper::makeSign(
|
|
|
$params,
|
|
|
- $this->appSecret,
|
|
|
+ $this->appSecret,
|
|
|
'md5',
|
|
|
true,
|
|
|
'shansong'
|
|
|
);
|
|
|
$params['sign'] = $sign;
|
|
|
|
|
|
- // 发送请求
|
|
|
- $response = HttpClient::post($url, $params);
|
|
|
+ $headers = ['Content-Type' => 'application/x-www-form-urlencoded;charset=utf-8'];
|
|
|
+ $response = HttpClient::post($url, $params, $headers);
|
|
|
Yii::info("[ShansongUserAccount] Response: " . json_encode($response));
|
|
|
|
|
|
// 检查API响应状态
|
|
|
@@ -105,9 +105,8 @@ class Shop extends Shansong
|
|
|
// 计算签名
|
|
|
$sign = SignHelper::makeSign($payload, $this->appSecret, 'md5', true, 'shansong');
|
|
|
$payload['sign'] = $sign;
|
|
|
-
|
|
|
- // 发送请求
|
|
|
- $response = HttpClient::post($url, $payload);
|
|
|
+ $headers = ['Content-Type' => 'application/x-www-form-urlencoded;charset=utf-8'];
|
|
|
+ $response = HttpClient::post($url, $payload, $headers);
|
|
|
Yii::info("[ShansongAddShop] Response: " . json_encode($response));
|
|
|
|
|
|
// 检查API响应状态
|
|
|
@@ -165,9 +164,8 @@ class Shop extends Shansong
|
|
|
// 计算签名
|
|
|
$sign = SignHelper::makeSign($payload, $this->appSecret, 'md5', true, 'shansong');
|
|
|
$payload['sign'] = $sign;
|
|
|
-
|
|
|
- // 发送请求
|
|
|
- $response = HttpClient::post($url, $payload);
|
|
|
+ $headers = ['Content-Type' => 'application/x-www-form-urlencoded;charset=utf-8'];
|
|
|
+ $response = HttpClient::post($url, $payload, $headers);
|
|
|
Yii::info("[ShansongBatchAddShops] Response: " . json_encode($response));
|
|
|
|
|
|
// 检查API响应状态
|
|
|
@@ -227,9 +225,8 @@ class Shop extends Shansong
|
|
|
// 计算签名
|
|
|
$sign = SignHelper::makeSign($payload, $this->appSecret, 'md5', true, 'shansong');
|
|
|
$payload['sign'] = $sign;
|
|
|
-
|
|
|
- // 发送请求
|
|
|
- $response = HttpClient::post($url, $payload);
|
|
|
+ $headers = ['Content-Type' => 'application/x-www-form-urlencoded;charset=utf-8'];
|
|
|
+ $response = HttpClient::post($url, $payload, $headers);
|
|
|
Yii::info("[ShansongUpdateShop] Response: " . json_encode($response));
|
|
|
|
|
|
// 检查API响应状态
|
|
|
@@ -302,9 +299,8 @@ class Shop extends Shansong
|
|
|
// 计算签名
|
|
|
$sign = SignHelper::makeSign($payload, $this->appSecret, 'md5', true, 'shansong');
|
|
|
$payload['sign'] = $sign;
|
|
|
-
|
|
|
- // 发送请求
|
|
|
- $response = HttpClient::post($url, $payload);
|
|
|
+ $headers = ['Content-Type' => 'application/x-www-form-urlencoded;charset=utf-8'];
|
|
|
+ $response = HttpClient::post($url, $payload, $headers);
|
|
|
Yii::info("[ShansongQueryShops] Response: " . json_encode($response));
|
|
|
|
|
|
// 检查API响应状态
|