From e79e0a5bdf0dfbf7d4039501e55ba6c930f916f1 Mon Sep 17 00:00:00 2001 From: 199901012 Date: Sat, 27 Mar 2021 22:37:27 +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-cweb/src/main/java/com/cweb/config/SysConfig.java | 9 +++++++++ .../java/com/cweb/controller/pay/OrderController.java | 2 +- hai-cweb/src/main/resources/dev/config.properties | 5 +++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/hai-cweb/src/main/java/com/cweb/config/SysConfig.java b/hai-cweb/src/main/java/com/cweb/config/SysConfig.java index 7195d84a..ebea48eb 100644 --- a/hai-cweb/src/main/java/com/cweb/config/SysConfig.java +++ b/hai-cweb/src/main/java/com/cweb/config/SysConfig.java @@ -15,6 +15,7 @@ public class SysConfig { private String wxAppSecret; private String wxApiKey; private String wxMchId; + private String wxSubMchId; private String wxUnifiedOrderUrl; private String couponCodePath; private String notifyUrl; @@ -82,4 +83,12 @@ public class SysConfig { public void setCouponCodePath(String couponCodePath) { this.couponCodePath = couponCodePath; } + + public String getWxSubMchId() { + return wxSubMchId; + } + + public void setWxSubMchId(String wxSubMchId) { + this.wxSubMchId = wxSubMchId; + } } diff --git a/hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java b/hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java index cfb872d3..e937852a 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java @@ -130,7 +130,7 @@ public class OrderController { WeChatPayReqInfo weChatPayReqInfo = new WeChatPayReqInfo(); weChatPayReqInfo.setAppid(SysConst.getSysConfig().getWxAppId()); //公众号id weChatPayReqInfo.setMch_id(SysConst.getSysConfig().getWxMchId()); //商户号 - weChatPayReqInfo.setSub_mch_id(SysConst.getSysConfig().getWxMchId()); //子商户号 + weChatPayReqInfo.setSub_mch_id(SysConst.getSysConfig().getWxSubMchId()); //子商户号 weChatPayReqInfo.setOpenid(openId); weChatPayReqInfo.setNonce_str(nonce_str); //随机字符串 diff --git a/hai-cweb/src/main/resources/dev/config.properties b/hai-cweb/src/main/resources/dev/config.properties index 9c355143..31c06aa0 100644 --- a/hai-cweb/src/main/resources/dev/config.properties +++ b/hai-cweb/src/main/resources/dev/config.properties @@ -1,8 +1,9 @@ # ΢ -wxAppId=wx8d49e2f83025229d +wxAppId=wx637bd6f7314daa46 wxAppSecret=d8d6dcaef77d3b659258a01b5ddba5df wxApiKey=HfkjWxPayHaiShengGuang0123456789 -wxMchId=1603942866 +wxMchId=1289663601 +wxSubMchId=1603942866 wxUnifiedOrderUrl=https://api.mch.weixin.qq.com/pay/unifiedorder notifyUrl=https://hsgcs.dctpay.com//crest/wechatpay/notify