wx refund notify: xml=<xml><return_code>SUCCESS</return_code><appid><![CDATA[]]></appid><mch_id><![CDATA[]]></mch_id><nonce_str><![CDATA[7414b09eadc3479f67d318a252d887c4]]></nonce_str><req_info><![CDATA[4LhiFp4hptw1SArBTd92b+tRf61345N/PkycB4Wi/x48F5q2pDy6tG5WdysVbIaOJUjVE7GnENU4CHIIVwaRYiNZOghs+lk64XbKg/7MxsbYW0LUYGJ5UrWC7e9bDe2imA9OesarPWE/NoBB/wZwa8C6YYNXOWLQd/Dj+TsPFvTYrVYnmHeBsoyY5BJ7KsfpbBuDXGJtRbhHODdlkI6iX61dDsAU3uGYylKtI8B7xe91kO61VzvRlRpqTYNza8QMaIP1mBh61Zzd97y3MYh5E7RALqRibkJ1o+tzri28AQkKKZJiNY8W9dDUwOMLo+IFbhbrFwryyxUCbAFEVpbH5EHwqn+0zN3bTtU8u519rgwldSqEFAY9pAygIsrFZ6AbbUR2SMrGBsLIwPFjamtySiCsFa+WS7dhCYxpOsrCEtCUaSwqhJDUtN2yhNDgFo+nRU8yE4E5SQx5XPZHUKthov16H+6l2cbOF/SHMeaFYtduB8o4uAc//jJH4YNfZ6qHDFCrp4fhrQFgD3CctlHDMNNuVIG5f/9PvLAUv2OVaKBhMECOvL8LPDPAbf1MbHRjsv94fvK1pqOOXW8IAnqNvdqVzSgQApplqF64FpasMb+4l1RJYkZC3i27ngdA3oJcBbO8JQN7phiKVcmnZKZDRNijLHSnNTgvRkEZAX2+K2WdYeNqg+tXdVsONXNV7kQkx7QuAtvjH76qmQYIuGhH+FCSZxIUHMnvGZRiPH9sSuDydflDsIw4TcGBDH1qhoO1zh6I6lO6GcRqxYlSux1qdEneUEHWruUZeM2vAMqtqVT1+KKrdOPzG0/Egrrlp3cA4xEV11XywCb42FMnT19GjhXAaJYwK7zquBM2V8a3l8NP1GHOKrQU+8GPs66oCwmFvsfRfFKpOGoRbO25a8lTP636cQp0R5AafS1Kmnk/vrcJoTMESpME1OgKpJEDKNZGKrE6lkOHuDSq8gzb7FG41wq/1jL0zSwqfn+wuXdXoA+0tLZroIJVBoaICBGoGqBff/nzWd7QSfsofs4jIbGnD7AnJBQTReYmx4MwoVDquF2LKIBMA2u2sFasS2gnINcj]]></req_info></xml>
WxPayException(customErrorMsg=伪造的通知!, returnCode=null, returnMsg=null, resultCode=null, errCode=null, errCodeDes=null, xmlString=null)
at com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult.checkResult(WxPayOrderNotifyResult.java:321)
at com.github.binarywang.wxpay.service.impl.BaseWxPayServiceImpl.parseOrderNotifyResult(BaseWxPayServiceImpl.java:198)
at com.github.binarywang.wxpay.service.impl.BaseWxPayServiceImpl.parseOrderNotifyResult(BaseWxPayServiceImpl.java:185)
是退款回调,在 parseOrderNotifyResult 这一步抛出异常
// 支付回调通知处理 @PostMapping("/refund") public String refund(@RequestBody String xmlData) { log.info("wx refund notify: xml={}", xmlData); try { final WxPayOrderNotifyResult result = wxService.parseOrderNotifyResult(xmlData); log.info("wx refund notify result: {}", result); // 退款成功, 更改充值卡状态 } catch (Exception e) { e.printStackTrace(); } // 返回必须按照微信的格式! return WxPayNotifyResponse.success("成功"); }
我也遇到同样的问题,求解答!!
com.github.binarywang.wxpay.exception.WxPayException: 伪造的通知!
at com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult.checkResult(WxPayOrderNotifyResult.java:322)
at com.github.binarywang.wxpay.service.impl.BaseWxPayServiceImpl.parseOrderNotifyResult(BaseWxPayServiceImpl.java:322)
at com.github.binarywang.wxpay.service.impl.BaseWxPayServiceImpl.parseOrderNotifyResult(BaseWxPayServiceImpl.java:302)
at cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXPubPayClient.parseOrderNotifyV2(WXPubPayClient.java:192)
at cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXPubPayClient.parseOrderNotify(WXPubPayClient.java:169)
at cn.iocoder.yudao.module.pay.controller.app.notify.AppPayNotifyController.notifyCallback(AppPayNotifyController.java:87)
at cn.iocoder.yudao.module.pay.controller.app.notify.AppPayNotifyController$$FastClassBySpringCGLIB$$b4317dd0.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
at org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:123)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)
at cn.iocoder.yudao.framework.operatelog.core.aop.OperateLogAspect.around0(OperateLogAspect.java:94)
at cn.iocoder.yudao.framework.operatelog.core.aop.OperateLogAspect.around(OperateLogAspect.java:78)
你好,麻烦详细描述一下您这边具体问题。调用的什么API,请求参数以及日期麻烦提供一下。谢谢。