ZhangWenQiang 6 лет назад
Родитель
Сommit
49c54fbaa2

+ 10 - 0
happy-job-base-common/src/main/java/com/jeeplus/common/config/Global.java

@@ -236,6 +236,15 @@ public class Global {
     }
 
     /**
+     * 支付域名
+     *
+     * @return
+     */
+    public static String getPayPath() {
+        return getConfig("payPath");
+    }
+
+    /**
      */
     public static String getAliyunUrl() {
         return getConfig("aliyunUrl");
@@ -308,6 +317,7 @@ public class Global {
 
     /**
      * crmautodate
+     *
      * @return
      */
     public static String getCrmAutoDate() {

+ 7 - 1
happy-job-base-system/src/main/resources/properties/jeeplus.properties

@@ -189,4 +189,10 @@ noLogin=\u7528\u6237\u672A\u767B\u5F55
 
 
 #crmautodate
-crmautodate=180
+crmautodate=180
+
+################################\u670D\u52A1\u5668\u652F\u4ED8\u57DF\u540D##################################
+#\u6D4B\u8BD5
+payPath=https://kf.hap-job.com
+#\u6B63\u5F0F
+#payPath=https://web.hap-job.com

+ 2 - 2
happy-job-base-system/src/main/webapp/webpage/modules/sys/hppay/hpPayAccountForm.jsp

@@ -55,9 +55,9 @@
 					</div>
 				</div>
 				<div class="form-group">
-					<label class="col-sm-3 control-label"><font color="red">*</font>微信支付安全证书:</label>
+					<label class="col-sm-3 control-label">微信支付安全证书:</label>
 					<div class="col-sm-6">
-						<sys:fileUpload path="certificatePath"  value="${hpPayAccount.certificatePath}" type="file" uploadPath="/sys/hpPayAccount"/>
+						<sys:fileUpload path="certificatePath"  value="${hpPayAccount.certificatePath}" type="file" uploadPath=""/>
 						<span class="help-block">微信商户平台(pay.weixin.qq.com)-->账户设置-->API安全-->下载证书, 下载后请解压其中的 apiclient_cert文件并上传</span>
 					</div>
 				</div>

+ 23 - 0
happy-job-module-hppay/src/main/java/com/jeeplus/modules/wechatpay/utils/WeChatConstants.java

@@ -0,0 +1,23 @@
+package com.jeeplus.modules.wechatpay.utils;
+
+/**
+ * @Author: zwq
+ * @Description: 微信支付url
+ * @Date: Create in 15:57 2019/11/4
+ */
+public interface WeChatConstants {
+    /**
+     * 统一下单
+     */
+    public static String unifiedorder = "https://api.mch.weixin.qq.com/pay/unifiedorder";
+
+    /**
+     * 查询订单
+     */
+    public static String orderQueryUrl = "https://api.mch.weixin.qq.com/pay/orderquery";
+
+    /**
+     * 退款
+     */
+    public static String refundUrl = "https://api.mch.weixin.qq.com/secapi/pay/refund";
+}

+ 4 - 4
happy-job-module-hppay/src/main/java/com/jeeplus/modules/wechatpay/utils/WeChatPay.java

@@ -60,7 +60,7 @@ public class WeChatPay {
     public void customerToMerchant(HttpServletRequest request, HttpServletResponse response) {
         try {
             /** 微信下单接口 **/
-            String orderUrl = "https://api.mch.weixin.qq.com/pay/unifiedorder";
+            String orderUrl = WeChatConstants.unifiedorder;
 
             InputStream iStream = request.getInputStream();
             JSONObject paramJson = CommUtil.loadString(iStream);
@@ -189,7 +189,7 @@ public class WeChatPay {
     @RequestMapping(value = "/customerPayedOrderQuery.do", method = RequestMethod.POST)
     public void customerPayedOrderQuery(HttpServletRequest request, HttpServletResponse response) {
         try {
-            String orderQueryUrl = "https://api.mch.weixin.qq.com/pay/orderquery";
+            String orderQueryUrl = WeChatConstants.orderQueryUrl;
 
             InputStream iStream = request.getInputStream();
             JSONObject paramJson = CommUtil.loadString(iStream);
@@ -303,7 +303,7 @@ public class WeChatPay {
     public void customerRefund(HttpServletRequest request, HttpServletResponse response) {
         try {
             /** 微信退款接口 **/
-            String refundUrl = "https://api.mch.weixin.qq.com/secapi/pay/refund";
+            String refundUrl = WeChatConstants.refundUrl;
             InputStream iStream = request.getInputStream();
             JSONObject paramJson = CommUtil.loadString(iStream);
             System.out.println("======退款=======paramJson" + paramJson);
@@ -451,7 +451,7 @@ public class WeChatPay {
     public void customerRefundSingle(HttpServletRequest request, HttpServletResponse response) {
         try {
             /** 微信退款接口 **/
-            String refundUrl = "https://api.mch.weixin.qq.com/secapi/pay/refund";
+            String refundUrl = WeChatConstants.refundUrl;
             InputStream iStream = request.getInputStream();
             JSONObject paramJson = CommUtil.loadString(iStream);