'提交代码'

dev-discount
199901012 4 years ago
parent e79e0a5bdf
commit d5c1040c4c
  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 wxApiKey;
private String wxMchId;
private String wxMchAppId;
private String wxSubMchId;
private String wxUnifiedOrderUrl;
private String couponCodePath;
@ -91,4 +92,12 @@ public class SysConfig {
public void setWxSubMchId(String wxSubMchId) {
this.wxSubMchId = wxSubMchId;
}
public String getWxMchAppId() {
return wxMchAppId;
}
public void setWxMchAppId(String wxMchAppId) {
this.wxMchAppId = wxMchAppId;
}
}

@ -128,7 +128,7 @@ public class OrderController {
String nonce_str = MD5Util.MD5Encode(String.valueOf(ThreadLocalRandom.current().nextInt(10000)), "UTF-8");
int total_fee = MathUtils.objectConvertBigDecimal(map.get("payPrice")).multiply(new BigDecimal("100")).intValue();
WeChatPayReqInfo weChatPayReqInfo = new WeChatPayReqInfo();
weChatPayReqInfo.setAppid(SysConst.getSysConfig().getWxAppId()); //公众号id
weChatPayReqInfo.setAppid(SysConst.getSysConfig().getWxMchAppId()); //公众号id
weChatPayReqInfo.setMch_id(SysConst.getSysConfig().getWxMchId()); //商户号
weChatPayReqInfo.setSub_mch_id(SysConst.getSysConfig().getWxSubMchId()); //子商户号

@ -1,7 +1,10 @@
# 微信配置
wxAppId=wx637bd6f7314daa46
wxAppId=wx8d49e2f83025229d
wxAppSecret=d8d6dcaef77d3b659258a01b5ddba5df
wxApiKey=HfkjWxPayHaiShengGuang0123456789
wxMchAppId=wx637bd6f7314daa46
wxMchId=1289663601
wxSubMchId=1603942866
wxUnifiedOrderUrl=https://api.mch.weixin.qq.com/pay/unifiedorder

Loading…
Cancel
Save