Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

me.chanjar.weixin.common.error.WxErrorException: 错误代码:-99, 错误信息:平台签名验证错误 #2714

Closed
Kidwind opened this issue Jun 24, 2022 · 4 comments · Fixed by #2761

Comments

@Kidwind
Copy link

Kidwind commented Jun 24, 2022

简要描述

小程序的即时配送接口在接入配送平台后,使用 addOrder 接口创建配送单时,提示 "me.chanjar.weixin.common.error.WxErrorException: 错误代码:-99, 错误信息:平台签名验证错误"

模块版本情况

  • WxJava 模块名: weixin-java-miniapp
  • WxJava 版本号: 4.3.6.B

详细描述

查看 wxMaService.post 方法的执行解析 AddOrderRequest 对象的 json 中不含有 "delivery_sign" 参数,但查看 AddOrderRequest 的基类 WxMaDeliveryBaseRequest ,发现是含有 "delivery_sign" 参数的声明的,不明白是什么原因。
WxMaDeliveryBaseRequest 类中的 delivery_sign 参数是通过 getDeliverySign 方法返回的,该方法使用 shopid、shop_order_id、appSecret 参数加密,这几个参数均已提供,但却不生成 "delivery_sign" 。

日志

Caused by: me.chanjar.weixin.common.error.WxErrorException: 错误代码:-99, 错误信息:平台签名验证错误
at cn.binarywang.wx.miniapp.api.impl.WxMaImmediateDeliveryServiceImpl.parse(WxMaImmediateDeliveryServiceImpl.java:213)
at cn.binarywang.wx.miniapp.api.impl.WxMaImmediateDeliveryServiceImpl.addOrder(WxMaImmediateDeliveryServiceImpl.java:97)

@gxh0797
Copy link

gxh0797 commented Jul 27, 2022

请问此问题你解决了吗?

@zhurenkai
Copy link

遇到了同样的问题,WxMaDeliveryBaseRequest.getDeliverySign()并没有把值序列化给deliverySign

@BB86818BB
Copy link

MAVEN仓库里 4.3.8.B 下载的代码跟GITHUB这里的代码不一致,应该是上传jar包的时候代码不对吧

@binarywang
Copy link
Owner

MAVEN仓库里 4.3.8.B 下载的代码跟GITHUB这里的代码不一致,应该是上传jar包的时候代码不对吧

这里看到的是最新代码,你要看对应tag的源码才一致

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants