调用 条件查询批次列表API
https://api.mch.weixin.qq.com/v3/marketing/favor/stocks
头信息
WECHATPAY2-SHA256-RSA2048 mchid="48457082",nonce_str="WBEE6W1ZKR3ST1RRPAPWR1V7JDOHB6D1",signature="UnujrktmDFNMtrj/Z8k99xphDKFQpBupFc5cb3sUKKH8U+9DUaPyJFJLfwVkx6QUbj025CUpD7emCOh8i5dZGzTcYRvtEXynDML+lyKfvkpVrHZEKOcVAE1cH9GmqFl6GgxmFCknUCA+ys4LgLXo+JHZAiVM8xzEraMtHmOk3ukQAeg02VWLdruJozx1+ZUpT88xdqUk2QONjGnJhZZNWnz9rnye5iTnvCuV4WWhfwUUlWKe+o4SVLhaAbWgQFVvEjhazSAgulKutWV0bsthh2IhbpfvkBgyrflPWSN0VP9uNUYVcZpbtFhjztEl0TeMKIwuTSpW65NbIOL1YSSleQ==",timestamp="1694231093",serial_no="178A62589F166AF6D0DDD3F5A9EC2AE197367BA2"
返回
{
"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\n1694231093\nWBEE6W1ZKR3ST1RRPAPWR1V7JDOHB6D1\n\n",
"url": "/v3/certificates"
}
},
"message": "错误的签名,验签失败"
}
以前一直没有问题,今天突然调不通了,证书状态正常,证书和商户号也匹配。
有大神知道是什么原因吗
去用脚本验证一下https://github.com/wechatpay-apiv3/wechatpay-postman-script
测试可以返回批次列表。
code 500 errormsg: https://api.mch.weixin.qq.com/v3/marketing/favor/stocks。
https证书过期了
检查一下是不是证书过期了