Closed hetengji closed 2 years ago
- OS:ubuntu - PHP:7.4 - wechatpay-php:1.4
{"success":false,"code":500,"message":"Client error: GET https:\/\/api.mch.weixin.qq.com\/v3\/certificates resulted in a 401 Unauthorized response:\n{\"code\":\"SIGN_ERROR\",\"message\":\" 签名信息错误,验签失败\"}\n"}
GET https:\/\/api.mch.weixin.qq.com\/v3\/certificates
401 Unauthorized
php 框架是 hyperf 2.2
你好。
请参考下面的方式检查下私钥是否正确:
apiclient_cert.pem
1B8***
另外,从你的代码中看,你使用了错误的微信支付平台证书,apiclient_cert.pem 是跟商户私钥配对的商户证书。不过,这不会导致请求的签名验证失败。
运行环境
描述你的问题现象
{"success":false,"code":500,"message":"Client error:
GET https:\/\/api.mch.weixin.qq.com\/v3\/certificates
resulted in a401 Unauthorized
response:\n{\"code\":\"SIGN_ERROR\",\"message\":\" 签名信息错误,验签失败\"}\n"}php 框架是 hyperf 2.2