Closed ganxiaozhe closed 5 months ago
请问方便提供 SDK 的日志么?
问题似乎是由 out_trade_no 的错误造成的,但回显的却是 签名异常: 微信签名为空
2024-02-28T23:06:45.091125+08:00 > yansongda.artful.INFO > [Artful] 请求第三方 API 成功 {"rocket":{"radar":{"url":"https://api.mch.weixin.qq.com/v3/pay/transactions/native","method":"POST","headers":{"Host":["api.mch.weixin.qq.com"],"Accept":["application/json, text/plain, application/x-gzip"],"User-Agent":["yansongda/pay-v3"],"Content-Type":["application/json; charset=utf-8"],"Authorization":["WECHATPAY2-SHA256-RSA2048 mchid=\"1618697327\",nonce_str=\"***\",timestamp=\"1709132804\",serial_no=\"***\",signature=\"***\",\"description\":\"测试分析报告-标准版报告-人格九道\",\"amount\":{\"total\":2900},\"notify_url\":\"https:\\/\\/gxz.***.com\\/wechat\\/notify\",\"appid\":\"***\",\"mchid\":\"1618697327\"}"},"params":{"out_trade_no":"et01hqq9a1s6ebfya3m111qwvx7x1709132804","description":"测试分析报告-标准版报告","amount":{"total":2900.0}},"payload":{"out_trade_no":"et01hqq9a1s6ebfya3m111qwvx7x1709132804","description":"测试分析报告-标准版报告","amount":{"total":2900.0},"_method":"POST","_url":"v3/pay/transactions/native","_service_url":"v3/pay/partner/transactions/native","notify_url":"https://gxz.***.com/wechat/notify","appid":"wx6c973b972da5ff01","mchid":"1618697327","_body":"{\"out_trade_no\":\"et01hqq9a1s6ebfya3m111qwvx7x1709132804\",\"description\":\"测试分析报告-标准版报告\",\"amount\":{\"total\":2900},\"notify_url\":\"https:\\/\\/gxz.***.com\\/wechat\\/notify\",\"appid\":\"wx6c973b972da5ff01\",\"mchid\":\"1618697327\"}","_authorization":"WECHATPAY2-SHA256-RSA2048 mchid=\"1618697327\",nonce_str=\"***\",timestamp=\"1709132804\",serial_no=\"***\",signature=\"***\""},"packer":"Yansongda\\Artful\\Contract\\PackerInterface","direction":"Yansongda\\Artful\\Contract\\DirectionInterface","destination":{"GuzzleHttp\\Psr7\\Response":[]},"destination_origin":{"status":400,"headers":{"Server":["nginx"],"Date":["Wed, 28 Feb 2024 15:06:45 GMT"],"Content-Type":["application/json; charset=utf-8"],"Content-Length":["210"],"Connection":["keep-alive"],"Keep-Alive":["timeout=8"],"Cache-Control":["no-cache, must-revalidate"],"X-Content-Type-Options":["nosniff"],"Request-ID":["***-268435462"],"Content-Language":["zh-CN"]},"body":"{\"code\":\"PARAM_ERROR\",\"detail\":{\"location\":\"body\",\"value\":38},\"message\":\"输入源“/body/out_trade_no”映射到值字段“商户订单号”字符串规则校验失败,字节数 38,大于最大值 32\"}"}}}
ok,我晚些时候看看怎么优化下。
PS:如果感兴趣,可以尝试提个 PR
@ganxiaozhe 麻烦 composer update 到最新版本试试看这个问题
包版本号
3.6.2
问题描述
Yansongda\Pay\Exception\InvalidSignException: 签名异常: 微信签名为空
你的代码
报错详情