Wechat-Group / WxJava

微信开发 Java SDK ,支持包括微信支付,开放平台,小程序,企业微信,视频号,公众号等的后端开发
Apache License 2.0
29.88k stars 8.67k forks source link

微信支付回调通知重复调用 #3355

Closed TonyLiuYan closed 1 month ago

TonyLiuYan commented 2 months ago

简要描述

微信支付v3版本,回调时返回成功的状态后,仍然会再次回调 代码如下:

    @PostMapping("/wxpay/notify")
    public String notify(HttpServletRequest request) throws IOException, WxPayException {
        String xmlResult = IOUtils.toString(request.getInputStream(), request.getCharacterEncoding());
        WxPayNotifyV3Result result = wxPayService.parseOrderNotifyV3Result(xmlResult,null);
        return WxPayNotifyV3Response.success("ok");
    }

模块版本情况

qichhhhh commented 2 months ago

image https://pay.weixin.qq.com/docs/merchant/apis/native-payment/payment-notice.html