|
@@ -91,10 +91,12 @@ class GmService
|
|
|
//拼接签名参数,md5转大写
|
|
|
$data['sign'] = self::SM3Crypt($data['random'] . $data['seqNO'] . self::$appSecretKey . $key);
|
|
|
|
|
|
- dump($data);
|
|
|
- exit;
|
|
|
+// dump($data);
|
|
|
+// exit;
|
|
|
//发送post接口请求
|
|
|
$res = self::https_post(self::$tokenUrl, $data);
|
|
|
+ dump($res);
|
|
|
+ exit;
|
|
|
|
|
|
//解密返回token数据
|
|
|
$token = self::SM2Decrypt(base64_decode($res['sm2EncryptData']), $k1);
|
|
@@ -277,7 +279,7 @@ class GmService
|
|
|
public static function SM3Crypt($data)
|
|
|
{
|
|
|
$recode = php_SM3Crypt($data, $sm3hash);
|
|
|
- echo "<br/>recode:$recode \n";
|
|
|
+// echo "<br/>recode:$recode \n";
|
|
|
//加签数据base64返回
|
|
|
return strtoupper(self::string2hex($sm3hash));
|
|
|
}
|