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

支付回调验签签名长度问题 #310

Open
kangshifuSteven opened this issue Nov 15, 2024 · 1 comment
Open

支付回调验签签名长度问题 #310

kangshifuSteven opened this issue Nov 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@kangshifuSteven
Copy link

错误描述

有2种问题,第一种是验签报错Input byte array has wrong 4-byte ending unit,第二种是验签报错Last unit does not have enough valid bits,按照支付官方的说法是探测签名故意发的错误的,实际我跟踪发现sign是正常的,找不到原因,后面我去问官方那个ai说的是APIV3密钥生成错误,我使用的是https://suijimimashengcheng.bmcx.com/#google_vignette这个来生成的32为密钥。支付成功,回调始终报错Input byte array has wrong 4-byte ending unit,针对上面问题,我重新支付了N次,更换2次密钥,我使用postman方式测试过,求解决哪里存在问题,贴代码如下

重现bug的步骤

微信图片_20241115182628
微信图片_20241115182701
微信图片_20241115182749
微信图片_20241115182832
微信图片_20241115182928

预期行为

希望能验签成功,好处理业务逻辑。

导致错误的代码片段

No response

操作系统

windows

Java 版本

8

wechatpay-java 版本

0.2.14

其他信息

No response

@kangshifuSteven kangshifuSteven added the bug Something isn't working label Nov 15, 2024
@kangshifuSteven
Copy link
Author

我补充一下,我是用微信官方那个解密工具类,把这串参数写进去,一样报错
微信图片_20241115184516
问题是不是出在下单预支付的参数里面?JsapiServiceExtension类?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant