From 2e4fb6cf6d1c888387d56788537d15fec14d6720 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Wed, 29 May 2024 14:18:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hfkj/service/pay/HuiPayService.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/service/src/main/java/com/hfkj/service/pay/HuiPayService.java b/service/src/main/java/com/hfkj/service/pay/HuiPayService.java index 60a0253..11b5525 100644 --- a/service/src/main/java/com/hfkj/service/pay/HuiPayService.java +++ b/service/src/main/java/com/hfkj/service/pay/HuiPayService.java @@ -97,19 +97,24 @@ public class HuiPayService { */ public static JSONObject refund(String merNo,String merKey,String outTradeNo,String refundTradeNo, BigDecimal refundAmount) { try { + log.info("=============== start 惠支付退款 start =================="); Map param = new HashMap<>(); param.put("merchantNo", merNo); param.put("outTradeNo", outTradeNo); param.put("refundTradeNo", refundTradeNo); param.put("refundAmount", refundAmount); param.put("sign" , SignatureUtil.createSign(param, merKey)); - return HttpsUtils.doPost(REQUEST_URL + "trade/refund", param, new HashMap<>()); - } catch (Exception e) { + log.info("请求地址:" + (REQUEST_URL + "trade/preorder")); + log.info("请求参数:" + JSONObject.toJSONString(param)); + JSONObject response = HttpsUtils.doPost(REQUEST_URL + "trade/refund", param, new HashMap<>()); + log.info("响应参数:" + response.toJSONString()); + return response; + } catch (Exception e) { + log.info("出现异常"+ e.getMessage()); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "退款异常"); } finally { - + log.info("=============== end 惠支付退款 end =================="); } - - } }