-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
微信支付相关:新商户不再支持平台证书模式 只支持公钥模式 导致调用https://api.mch.weixin.qq.com/v3/certificates接口返回证书不存在 #3402
Comments
补一下 异常信息 Caused by: com.github.binarywang.wxpay.exception.WxPayException: v3请求构造异常! |
+1 |
same issue |
+1 |
3 similar comments
+1 |
+1 |
+1 |
本项目是否已经支持了微信支付公钥?我看源码好像没有写这方面的东西,只有加载平台证书。 |
测试了下,通过修改重写WxPayConfig类可暂时解决:https://blog.csdn.net/qq_37391200/article/details/143508109 |
官方给的publicKeyId是带有前缀的吧,看你因为类型转换问题这部分替换掉了,如果没影响是没问题, |
欢迎楼上的朋友帮忙提供最新修复代码 |
@PiscesNick 大佬不提下pr嘛 |
还没测试,所以,临时应急可以先用上面那个兄弟的方案, 实现verifier 自定义X509Certificate 改写getPublicKey的方法和getSerialNumber 看他文档是测试了,这个是改动最小的 涉及三个原有的类,新增一个自定义 |
简要描述
微信支付官方的变更导致目前 新商户想入驻平台 调起支付时报错
模块版本情况
详细描述
该方法请求https://api.mch.weixin.qq.com/v3/certificates接口获取平台证书 返回证书不存在 目前因微信官方变更导致新入驻的商户不在支持平台证书模式 转而支持公钥模式
private void autoUpdateCert() throws IOException, GeneralSecurityException {
WxPayV3HttpClientBuilder wxPayV3HttpClientBuilder = WxPayV3HttpClientBuilder.create()
.withCredentials(credentials)
.withValidator(verifier == null ? response -> true : new WxPayValidator(verifier));
}
The text was updated successfully, but these errors were encountered: