v3签名问题
请求地址:https://api.mch.weixin.qq.com/v3/certificates
{
"code"
:
"SIGN_ERROR"
,
"detail"
:
{
"detail"
:
{
"issue"
:
"sign not match"
},
"field"
:
"signature"
,
"location"
:
"authorization"
,
"sign_information"
:
{
"method"
:
"GET"
,
"sign_message_length"
:
66
,
"truncated_sign_message"
:
"GET\n/v3/certificates\n1612856095\na1fvv93qt5v3zs5m3fdz0sfnqknfjpm1\n\n"
,
"url"
:
"/v3/certificates"
}
},
"message"
:
"错误的签名,验签失败"
}
请问下这怎么解决呢?
$str = "GET"."\n".$url."\n".$time."\n".$noncestr."\n".$jsonData."\n";
$signHead = $this->getSign($str);
这里用 GET,别用POST
我解决了,有问题可以@我,搞死了这玩意
官方也没个格式。气死了