dev-discount
胡锐 4 years ago
commit 573ced0775
  1. 9
      hai-cweb/src/main/java/com/cweb/config/SysConfig.java
  2. 2
      hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java
  3. 5
      hai-cweb/src/main/resources/dev/config.properties

@ -15,6 +15,7 @@ public class SysConfig {
private String wxAppSecret; private String wxAppSecret;
private String wxApiKey; private String wxApiKey;
private String wxMchId; private String wxMchId;
private String wxSubMchId;
private String wxUnifiedOrderUrl; private String wxUnifiedOrderUrl;
private String couponCodePath; private String couponCodePath;
private String notifyUrl; private String notifyUrl;
@ -82,4 +83,12 @@ public class SysConfig {
public void setCouponCodePath(String couponCodePath) { public void setCouponCodePath(String couponCodePath) {
this.couponCodePath = couponCodePath; this.couponCodePath = couponCodePath;
} }
public String getWxSubMchId() {
return wxSubMchId;
}
public void setWxSubMchId(String wxSubMchId) {
this.wxSubMchId = wxSubMchId;
}
} }

@ -130,7 +130,7 @@ public class OrderController {
WeChatPayReqInfo weChatPayReqInfo = new WeChatPayReqInfo(); WeChatPayReqInfo weChatPayReqInfo = new WeChatPayReqInfo();
weChatPayReqInfo.setAppid(SysConst.getSysConfig().getWxAppId()); //公众号id weChatPayReqInfo.setAppid(SysConst.getSysConfig().getWxAppId()); //公众号id
weChatPayReqInfo.setMch_id(SysConst.getSysConfig().getWxMchId()); //商户号 weChatPayReqInfo.setMch_id(SysConst.getSysConfig().getWxMchId()); //商户号
weChatPayReqInfo.setSub_mch_id(SysConst.getSysConfig().getWxMchId()); //子商户号 weChatPayReqInfo.setSub_mch_id(SysConst.getSysConfig().getWxSubMchId()); //子商户号
weChatPayReqInfo.setOpenid(openId); weChatPayReqInfo.setOpenid(openId);
weChatPayReqInfo.setNonce_str(nonce_str); //随机字符串 weChatPayReqInfo.setNonce_str(nonce_str); //随机字符串

@ -1,8 +1,9 @@
# 微信配置 # 微信配置
wxAppId=wx8d49e2f83025229d wxAppId=wx637bd6f7314daa46
wxAppSecret=d8d6dcaef77d3b659258a01b5ddba5df wxAppSecret=d8d6dcaef77d3b659258a01b5ddba5df
wxApiKey=HfkjWxPayHaiShengGuang0123456789 wxApiKey=HfkjWxPayHaiShengGuang0123456789
wxMchId=1603942866 wxMchId=1289663601
wxSubMchId=1603942866
wxUnifiedOrderUrl=https://api.mch.weixin.qq.com/pay/unifiedorder wxUnifiedOrderUrl=https://api.mch.weixin.qq.com/pay/unifiedorder
notifyUrl=https://hsgcs.dctpay.com//crest/wechatpay/notify notifyUrl=https://hsgcs.dctpay.com//crest/wechatpay/notify

Loading…
Cancel
Save