wechatpay-apiv3 / wechatpay-guzzle-middleware

微信支付 APIv3 Guzzle HTTP Client中间件(middleware)
Apache License 2.0
209 stars 46 forks source link

/v3/combine-transactions/jsapi合单支付接口验签不通过, 使用postman结局一致, 其他接口正常, 但是打印出验签message和传给微信的签名, 在验签工具里是能通过的, 求助 #26

Closed helloJiu closed 3 years ago

helloJiu commented 4 years ago

进件接口都是可以正常通过的, 只有这个接口/v3/combine-transactions/jsapi验签失败, 辛苦大佬帮忙看看 { "code": "SIGN_ERROR", "detail": { "detail": { "issue": "sign not match" }, "field": "signature", "location": "authorization", "sign_information": { "method": "POST", "sign_message_length": 542, "truncated_sign_message": "POST\n/v3/combine-transactions/jsapi\n1595401198\n1595401198349\n{\"combin\n", "url": "/v3/combine-transactions/jsapi" } }, "message": "验签失败,请检查签名\t" }

xy-peng commented 4 years ago

你检查下上送的参数,留意下amount.total_amount字段,是不是送的total。可能是业务内部处理参数问题,错误的返回了签名错误。

TheNorthMemory commented 4 years ago

微信开放社区 这贴很像,问题定位到参数 sub_orders[@].amount.total_amount 的赋值上,送 sub_orders[@].amount.total 完整可复现401 SIGN_ERROR