From f938ddb895cdcdfc925cfaa268c0ed8638f3b2a3 Mon Sep 17 00:00:00 2001
From: liujie <liujie>
Date: 星期四, 17 八月 2023 11:39:25 +0800
Subject: [PATCH] update
---
user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/util/PayMoneyUtil.java | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/util/PayMoneyUtil.java b/user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/util/PayMoneyUtil.java
index 7e358a2..77db938 100644
--- a/user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/util/PayMoneyUtil.java
+++ b/user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/util/PayMoneyUtil.java
@@ -72,11 +72,13 @@
@Value("${callbackPath}")
private String callbackPath;//支付回调网关地址
- private String app_cert_path = "/usr/local/server/cer/zhifubao/user/app_cert_path.crt";//应用公钥证书路径
+ private String app_cert_path = "/usr/local/server/app/cer/zhifubao/user/app_cert_path.crt";//应用公钥证书路径
- private String alipay_cert_path = "/usr/local/server/cer/zhifubao/user/alipay_cert_path.crt";//支付宝公钥证书文件路径
+ private String alipay_cert_path = "/usr/local/server/app/cer/zhifubao/user/alipay_cert_path.crt";//支付宝公钥证书文件路径
- private String alipay_root_cert_path = "/usr/local/server/cer/zhifubao/user/alipay_root_cert_path.crt";//支付宝CA根证书文件路径
+ private String alipay_root_cert_path = "/usr/local/server/app/cer/zhifubao/user/alipay_root_cert_path.crt";//支付宝CA根证书文件路径
+
+ private String weixin_cert_path = "/usr/local/server/app/cert/weixin/apiclient_cert.p12";//微信支付证书
private Map<String, JSONObject> order = new HashMap<>();//存储支付订单用于主动查询支付结果
@@ -601,8 +603,7 @@
Map<String, String> map1 = null;
String body1 = null;
try {
- String certPath = "/usr/local/server/cert/weixin/apiclient_cert.p12";
- body1 = HttpClientUtil.pushHttpsRequsetXml(url, xmlString.toString(), new HashMap<>(), mchId, certPath, "PKCS12");
+ body1 = HttpClientUtil.pushHttpsRequsetXml(url, xmlString.toString(), new HashMap<>(), mchId, weixin_cert_path, "PKCS12");
} catch (Exception e) {
e.printStackTrace();
}
@@ -855,8 +856,7 @@
xmlString.append("</xml>");
Map<String, String> map1 = null;
- String certPath = "/usr/local/server/cert/weixin/apiclient_cert.p12";//证书地址
- String body1 = HttpClientUtil.pushHttpsRequsetXml(url, xmlString.toString(), new HashMap<>(), mchId, certPath, "PKCS12");
+ String body1 = HttpClientUtil.pushHttpsRequsetXml(url, xmlString.toString(), new HashMap<>(), mchId, weixin_cert_path, "PKCS12");
//将结果xml解析成map
body1 = body1.replaceAll("<!\\[CDATA\\[","");
body1 = body1.replaceAll("]]>", "");
@@ -932,8 +932,7 @@
xmlString.append("</xml>");
Map<String, String> map1 = null;
- String certPath = "/usr/local/server/cert/weixin/apiclient_cert.p12";//证书地址
- String body1 = HttpClientUtil.pushHttpsRequsetXml(url, xmlString.toString(), new HashMap<>(), mchId, certPath, "PKCS12");
+ String body1 = HttpClientUtil.pushHttpsRequsetXml(url, xmlString.toString(), new HashMap<>(), mchId, weixin_cert_path, "PKCS12");
//将结果xml解析成map
body1 = body1.replaceAll("<!\\[CDATA\\[","");
body1 = body1.replaceAll("]]>", "");
--
Gitblit v1.7.1