diff --git a/ThinkPHP/Library/Org/SumaPay/Client.class.php b/ThinkPHP/Library/Org/SumaPay/Client.class.php index 8672d21a..a565d395 100644 --- a/ThinkPHP/Library/Org/SumaPay/Client.class.php +++ b/ThinkPHP/Library/Org/SumaPay/Client.class.php @@ -36,8 +36,8 @@ class Client curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_POST, true); - // $headers = ['content-type: application/x-www-form-urlencoded; charset=GBK']; - // curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); + $headers = ['Content-Type: application/x-www-form-urlencoded;']; + curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); curl_setopt($curl, CURLOPT_POSTFIELDS, $params); $response = curl_exec($curl); curl_close($curl); diff --git a/ThinkPHP/Library/Org/SumaPay/Request/Request.class.php b/ThinkPHP/Library/Org/SumaPay/Request/Request.class.php index 0d74a075..161cfa99 100644 --- a/ThinkPHP/Library/Org/SumaPay/Request/Request.class.php +++ b/ThinkPHP/Library/Org/SumaPay/Request/Request.class.php @@ -45,7 +45,7 @@ class Request foreach ($params as $key => $value) { $params[$key] = Encoding::convert($value, 'GBK'); } - // $params[Sign::SIGN_KEY] = Sign::generate($params, $this->signFields, $this->secretKey); + $params[Sign::SIGN_KEY] = Sign::generate($params, $this->signFields, $this->secretKey); return $params; }