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 =================="); } - - } }