From 42f8ba8fb983cf1f6150d3387e4523e8a2fd6512 Mon Sep 17 00:00:00 2001 From: 199901012 Date: Sat, 27 Mar 2021 22:28:25 +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 --- .../java/com/cweb/controller/pay/OrderController.java | 4 +++- .../java/com/hai/common/pay/entity/WeChatPayReqInfo.java | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) 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 3bea8460..cfb872d3 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 @@ -129,8 +129,10 @@ public class OrderController { int total_fee = MathUtils.objectConvertBigDecimal(map.get("payPrice")).multiply(new BigDecimal("100")).intValue(); WeChatPayReqInfo weChatPayReqInfo = new WeChatPayReqInfo(); weChatPayReqInfo.setAppid(SysConst.getSysConfig().getWxAppId()); //公众号id - weChatPayReqInfo.setOpenid(openId); weChatPayReqInfo.setMch_id(SysConst.getSysConfig().getWxMchId()); //商户号 + weChatPayReqInfo.setSub_mch_id(SysConst.getSysConfig().getWxMchId()); //子商户号 + + weChatPayReqInfo.setOpenid(openId); weChatPayReqInfo.setNonce_str(nonce_str); //随机字符串 weChatPayReqInfo.setBody(map.get("body").toString()); //商品描述 weChatPayReqInfo.setOut_trade_no(map.get("orderNo").toString()); //商户订单号 diff --git a/hai-service/src/main/java/com/hai/common/pay/entity/WeChatPayReqInfo.java b/hai-service/src/main/java/com/hai/common/pay/entity/WeChatPayReqInfo.java index 7cbe4873..c36a4c13 100644 --- a/hai-service/src/main/java/com/hai/common/pay/entity/WeChatPayReqInfo.java +++ b/hai-service/src/main/java/com/hai/common/pay/entity/WeChatPayReqInfo.java @@ -9,6 +9,7 @@ public class WeChatPayReqInfo implements Serializable { private static final long serialVersionUID = -7642108447915413137L; private String appid; // 公众号id 必填 private String mch_id; // 商户号 必填 + private String sub_mch_id; // 微信支付分配的子商户号 必填 private String nonce_str; // 随机字符串 必填 private String sign; // 签名 必填 private String device_info; // 设备号 可以为终端设备号(门店号或收银设备ID),PC网页或公众号内支付可以传"WEB" @@ -202,4 +203,11 @@ public class WeChatPayReqInfo implements Serializable { this.scene_info = scene_info; } + public String getSub_mch_id() { + return sub_mch_id; + } + + public void setSub_mch_id(String sub_mch_id) { + this.sub_mch_id = sub_mch_id; + } }