Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

拉取支付评价的接口报错:商户签名错误 #752

Copy link
Copy link
Closed
@bennie0829

Description

@bennie0829
Issue body actions

调用微信支付里拉取用户评论数据的接口:
this.wxService.queryComment(DateUtils.addDays(new Date(), -30), new Date(), 0, 200);

报错:
WxPayException(customErrorMsg=null, returnCode=FAIL, returnMsg=商户签名错误, resultCode=null, errCode=null, errCodeDes=null, xmlString=
<return_code></return_code>
<return_msg></return_msg>
)

将打印出来的请求数据放到微信支付接口签名校验工具里校验,结果如下:
1.接口请求的原始数据去校验,校验失败。
image

2.接口请求的原始数据去掉 <sign_type>HMAC-SHA256</sign_type>,校验成功。
image

结论:从实验结果上,请求数据设置了signType就会签名出错,不清楚是微信本身问题,还是weixin-java-pay的接口问题, <sign_type>HMAC-SHA256</sign_type> 本身有默认值,建议去掉这个设置,以便解决这个问题。

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.