diff --git a/hai-cweb/src/main/java/com/cweb/controller/pay/WechatPayController.java b/hai-cweb/src/main/java/com/cweb/controller/pay/WechatPayController.java index 137f8b64..79eac1d2 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/pay/WechatPayController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/pay/WechatPayController.java @@ -167,22 +167,17 @@ public class WechatPayController { wxSharingOrderRequest.setAppid("wx637bd6f7314daa46"); wxSharingOrderRequest.setNonce_str(WxUtils.makeNonStr()); -/* List list = new ArrayList<>(); + WxSharingReceiversVO receiversVO = new WxSharingReceiversVO(); receiversVO.setAccount(wxSharingOrderRequest.getSub_mch_id()); receiversVO.setType("MERCHANT_ID"); + receiversVO.setName("嗨加油"); receiversVO.setRelation_type("SERVICE_PROVIDER"); - list.add(receiversVO);*/ - Map receiversVO = new HashMap<>(); - receiversVO.put("type", "MERCHANT_ID"); - receiversVO.put("relation_type", "SERVICE_PROVIDER"); - receiversVO.put("account", wxSharingOrderRequest.getSub_mch_id()); - receiversVO.put("name", "个体户"); wxSharingOrderRequest.setReceiver(JSONObject.toJSONString(receiversVO)); BeanMap beanMap = BeanMap.create(wxSharingOrderRequest); - wxSharingOrderRequest.setSign(WxUtils.makeSign(beanMap, "SHA256" ,"SHA256")); + wxSharingOrderRequest.setSign(WxUtils.makeSign(beanMap, "ASDfksdrgg55dDJoe5fky5u8trylDs5u" ,"SHA256")); String url = "https://api.mch.weixin.qq.com/pay/profitsharingaddreceiver"; String xm = XmlUtil.toSplitXml(wxSharingOrderRequest); diff --git a/hai-service/src/main/java/com/hai/model/WxSharingReceiversVO.java b/hai-service/src/main/java/com/hai/model/WxSharingReceiversVO.java index 2de697f8..4bde8fcc 100644 --- a/hai-service/src/main/java/com/hai/model/WxSharingReceiversVO.java +++ b/hai-service/src/main/java/com/hai/model/WxSharingReceiversVO.java @@ -29,6 +29,11 @@ public class WxSharingReceiversVO { */ private String relation_type; + /** + * 分账接收方全称 + */ + private String name; + public String getType() { return type; } @@ -68,4 +73,12 @@ public class WxSharingReceiversVO { public void setRelation_type(String relation_type) { this.relation_type = relation_type; } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } }