2020-11-04 17:45:06.031 ERROR [http-nio-8203-exec-10]com.sie.saaf.store.wechat.services.WechatCommonService.wxOrderRefundNotify:234 -发生异常,解密退款通知加密信息时出错
com.github.binarywang.wxpay.exception.WxPayException: 发生异常,解密退款通知加密信息时出错
at com.github.binarywang.wxpay.service.impl.BaseWxPayServiceImpl.parseRefundNotifyResult(BaseWxPayServiceImpl.java:204)
at com.sie.saaf.store.wechat.services.WechatCommonService.wxOrderRefundNotify(WechatCommonService.java:218)
at com.sie.saaf.store.wechat.services.WechatCommonService$$FastClassBySpringCGLIB$$9eed89a0.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:769)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:747)
at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:56)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:747)
at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:55)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:747)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
可能是java JDK里jar包的问题,具体可以看https://blog.csdn.net/tomatocc/article/details/85096911
我是通过替换jar包解决的问题
你好,你这边具体是哪个接口的退款解密问题呢?可参考以下步骤:
解密方式
解密步骤如下:
(1)对加密串A做base64解码,得到加密串B
(2)对商户key做md5,得到32位小写key* ( key设置路径:微信商户平台(pay.weixin.qq.com)-->账户设置-->API安全-->密钥设置 )
(3)用key*对加密串B做AES-256-ECB解密(PKCS7Padding)
解密demo:https://github.com/btbxbob/wxpay-refund-notify-decrypt-helper
【文档问题您来提,精美好礼我来送~微信支付文档期待您的声音~】欢迎点击下方链接了解微信支付文档有奖反馈活动详情:https://developers.weixin.qq.com/community/pay/doc/000aa24226cb18f5cc1ba2b815b001
文档反馈入口:https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/pages/api.shtml