Closed freadman closed 6 months ago
laravel是10,laravel-pay3.5.2版本是正常的,没有改配置
方便调试一下看看什么问题么?
方便调试一下看看什么问题么?
2024-02-06T20:58:28.088173+08:00 > yansongda.artful.INFO > [Artful] 请求第三方 API 成功 {"rocket":{"radar":{"url":"https://api.mch.weixin.qq.com/v3/pay/transactions/out-trade-no/595555833178228508S3?mchid=1606629951","method":"GET","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=\"1606629951\",nonce_str=\"0X8M9KEo0K3w8srZDRHZ4Si6UXwcKOfO\",timestamp=\"1707224307\",serial_no=\"37F84A9CE02185FAA56AD1B9A21CD1FB48F0B1F5\",signature=\"xxxxxxxxxxxx\""]},"body":"[]"},"params":{"out_trade_no":"595555833178228508S3"},"payload":{"_method":"GET","_url":"v3/pay/transactions/out-trade-no/595555833178228508S3?mchid=1606629951","_service_url":"v3/pay/partner/transactions/out-trade-no/595555833178228508S3?sp_mchid=1606629951&sub_mchid=","_body":"[]","_authorization":"WECHATPAY2-SHA256-RSA2048 mchid=\"1606629951\",nonce_str=\"0X8M9KEo0K3w8srZDRHZ4Si6UXwcKOfO\",timestamp=\"1707224307\",serial_no=\"37F84A9CE02185FAA56AD1B9A21CD1FB48F0B1F5\",signature=\"xxxxxxxxx\""},"packer":"Yansongda\\Artful\\Contract\\PackerInterface","direction":"Yansongda\\Artful\\Contract\\DirectionInterface","destination":{"GuzzleHttp\\Psr7\\Response":[]},"destination_origin":{"status":401,"headers":{"Server":["nginx"],"Date":["Tue, 06 Feb 2024 12:58:28 GMT"],"Content-Type":["application/json; charset=utf-8"],"Content-Length":["457"],"Connection":["keep-alive"],"Keep-Alive":["timeout=8"],"Cache-Control":["no-cache, must-revalidate"],"X-Content-Type-Options":["nosniff"],"Request-ID":["08F4D988AE06104F188BDA8C5820C6D70A28BAB703-270283348"],"Content-Language":["zh-CN"]},"body":"{\"code\":\"SIGN_ERROR\",\"detail\":{\"detail\":{\"issue\":\"sign not match\"},\"field\":\"signature\",\"location\":\"authorization\",\"sign_information\":{\"method\":\"GET\",\"sign_message_length\":121,\"truncated_sign_message\":\"GET\\n/v3/pay/transactions/out-trade-no/595555833178228508S3?mchid=1606629951\\n1707224307\\n0X8M9KEo0K3w8srZDRHZ4Si6UXwcKOfO\\n\\n\",\"url\":\"/v3/pay/transactions/out-trade-no/595555833178228508S3?mchid=1606629951\"}},\"message\":\"签名错误,请检查后再试\"}"}}}
麻烦 composer update
试试
包版本号
3.6.0
问题描述
微信调用query方法提示“签名异常: 微信签名为空”
你的代码
Pay::wechat()->query($outTradeOrder)
报错详情
签名异常: 微信签名为空
sdk 日志
local.ERROR: 签名异常: 微信签名为空 {"userId":10000,"exception":"[object] (Yansongda\\Pay\\Exception\\InvalidSignException(code: 9501): 签名异常: 微信签名为空 at /Users/xxxxxx/Sites/xxxx/vendor/yansongda/pay/src/Functions.php:238)
nginx/apache 日志