From 0911582d2f80e7f3162fb6d0b59ee12e23de133b Mon Sep 17 00:00:00 2001 From: luodangjia <luodangjia> Date: 星期四, 17 十月 2024 09:39:05 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/controller/WxPayController.java | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/controller/WxPayController.java b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/controller/WxPayController.java index 04048b4..546a0b7 100644 --- a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/controller/WxPayController.java +++ b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/controller/WxPayController.java @@ -123,7 +123,7 @@ */ @PostMapping("pay/notify") @ApiOperation("订单回调") - public R<Map<String, Object>> payNotify(HttpServletRequest request) throws Exception { + public void payNotify(HttpServletRequest request) throws Exception { try { Map<String, Object> params = wxV3Pay.verifyNotify(request, new TypeReference<Map<String, Object>>() {}); log.info("支付回调:{}", params); @@ -147,13 +147,10 @@ break; } wxV3Pay.ack(); - return R.ok(params); } catch (Exception e) { log.error("支付回调异常:{}", e, e); wxV3Pay.ack(false, e.getMessage()); - return R.fail("回调异常"); } - } /** @@ -175,7 +172,7 @@ * 退款回调 */ @PostMapping("refund/notify") - public R<WxRefundNotifyResp> refundNotify(HttpServletRequest request) throws IOException { + public void refundNotify(HttpServletRequest request) throws IOException { try { Map<String, Object> params = wxV3Pay.verifyNotify(request, new TypeReference<Map<String, Object>>() { }); @@ -219,14 +216,13 @@ resp.setRefund_id(refund_id); resp.setSuccess_time(success_time); wxV3Pay.ack(); - return R.ok(resp); } else { wxV3Pay.ack(false, "不是成功的退款状态"); } } catch (Exception e) { + e.printStackTrace(); wxV3Pay.ack(false, e.getMessage()); } - return R.fail(); } /** -- Gitblit v1.7.1