From 666b35c6d476d48d215cc66fcfc6b1552fdc920d Mon Sep 17 00:00:00 2001 From: jyy <935090232@qq.com> Date: Mon, 15 Mar 2021 13:46:02 +0800 Subject: [PATCH] 测试支付2 --- zq-erp/src/main/java/com/matrix/component/wechat/externalInterface/weixinUtil/WeixinServiceUtil.java | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/zq-erp/src/main/java/com/matrix/component/wechat/externalInterface/weixinUtil/WeixinServiceUtil.java b/zq-erp/src/main/java/com/matrix/component/wechat/externalInterface/weixinUtil/WeixinServiceUtil.java index 30c7d4d..d53a58c 100644 --- a/zq-erp/src/main/java/com/matrix/component/wechat/externalInterface/weixinUtil/WeixinServiceUtil.java +++ b/zq-erp/src/main/java/com/matrix/component/wechat/externalInterface/weixinUtil/WeixinServiceUtil.java @@ -142,20 +142,28 @@ * @param openid * @return */ - public JsApiPayComResData comPay(String desc, String outTradeNo,int totalFee, String openid){ + public JsApiPayComResData comPay(String desc, String outTradeNo,int totalFee, String openid,Long companyId){ JsApiPayComResData result=null; //boolean flag=false; try { JsApiPayBusiness jsApiPayBusiness = new JsApiPayBusiness(); // TODO 企业付款 - Long companyId=HostInterceptor.getCompanyId(); + BusParameterSettings mchID = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_MCHID, companyId); BusParameterSettings paySecret = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_SECRET, companyId); + BusParameterSettings certLocalPath = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_CERTLOCAL_PATH, companyId); JsApiPayComReqData jsApiPayComReqData=new JsApiPayComReqData(mchID.getParamValue(),paySecret.getParamValue(),"","",0,"","",""); JsApiPayComService jsApiPayComService=new JsApiPayComService(); + + HttpsRequest2 request2= (HttpsRequest2) jsApiPayComService.getServiceRequest(); + request2.setCertLocalPath(certLocalPath.getParamValue()); + request2.setMchId(mchID.getParamValue()); + + result = jsApiPayBusiness.payComOrder(jsApiPayComService, jsApiPayComReqData); + LogUtil.info("#提现,企业付款到个人---result:{}",result); if (result.getResult_code().equals("SUCCESS")) { return result; -- Gitblit v1.9.1