From 95c04aebaaa5a5b835d0f1de1224f57ec0f8ffb5 Mon Sep 17 00:00:00 2001
From: hurui <177768073@qq.com>
Date: Mon, 13 Feb 2023 16:51:48 +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
---
hai-order/src/main/resources/dev/logback.xml | 22 +++++++++++++++++++
.../java/com/hai/config/WxOrderConfig.java | 9 +++++++-
2 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/hai-order/src/main/resources/dev/logback.xml b/hai-order/src/main/resources/dev/logback.xml
index 430d1fb5..eb4dc1eb 100644
--- a/hai-order/src/main/resources/dev/logback.xml
+++ b/hai-order/src/main/resources/dev/logback.xml
@@ -125,6 +125,25 @@
UTF-8
+
+
+ log/wechatPay.log
+
+ log/wechatPayLog/wechatPayLog.log.%d.%i
+
+
+ 64 MB
+
+
+
+
+ %d %p (%file:%line\)- %m%n
+
+ UTF-8
+
+
+
+
@@ -152,5 +171,8 @@
+
+
+
diff --git a/hai-service/src/main/java/com/hai/config/WxOrderConfig.java b/hai-service/src/main/java/com/hai/config/WxOrderConfig.java
index bd73797e..5841937c 100644
--- a/hai-service/src/main/java/com/hai/config/WxOrderConfig.java
+++ b/hai-service/src/main/java/com/hai/config/WxOrderConfig.java
@@ -115,7 +115,14 @@ public class WxOrderConfig {
param.put("sign_type", "HMAC-SHA256");
String signStr = WxUtils.generateSignature(param, "Skufk5oi85wDFGl888i6wsRSTkdd5df5" , WXPayConstants.SignType.HMACSHA256);
param.put("sign", signStr);
- String resultXmL = doSSLRequest(param.get("mch_id"), "https://api.mch.weixin.qq.com/secapi/pay/refund", WxUtils.mapToXml(param));
+
+ String paramXml = WxUtils.mapToXml(param);
+ log.info("==========退款START=========");
+ log.info("订单号:" + paySerialNo);
+ log.info("请求参数:" + paramXml);
+ String resultXmL = doSSLRequest(param.get("mch_id"), "https://api.mch.weixin.qq.com/secapi/pay/refund", paramXml);
+ log.info("响应参数:" + resultXmL);
+ log.info("==========退款END=========");
return XmlUtil.getObjectFromXML(resultXmL, OrderRefundModel.class);
}