| | |
| | | import cc.mrbird.febs.common.properties.XcxProperties; |
| | | import cc.mrbird.febs.common.utils.SpringContextHolder; |
| | | import cc.mrbird.febs.pay.model.*; |
| | | import cc.mrbird.febs.pay.service.impl.JsApiPayComService; |
| | | import cc.mrbird.febs.pay.service.impl.RefundService; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | } |
| | | return flag; |
| | | } |
| | | |
| | | /**@Description 用户提现提现审核,企业付款到个人 |
| | | @date 2017年5月26日 |
| | | @atuhor jiangyouyao |
| | | * @param desc 描述 |
| | | * @param outTradeNo 提现申请编号 |
| | | * @param totalFee 提现金额(分) |
| | | * @param openid |
| | | * @return |
| | | */ |
| | | public boolean comPay(String desc, String outTradeNo,int totalFee, String openid){ |
| | | boolean flag=false; |
| | | try { |
| | | JsApiPayBusiness jsApiPayBusiness = new JsApiPayBusiness(); |
| | | String paySecret = xcxProperties.getWecharpaySecret(); |
| | | String appId = xcxProperties.getXcxAppid(); |
| | | String certLocalPath = xcxProperties.getCertLocalPath(); |
| | | String mchID = xcxProperties.getWecharpayMchid(); |
| | | |
| | | JsApiPayComReqData jsApiPayComReqData=new JsApiPayComReqData(mchID, |
| | | appId, |
| | | paySecret, |
| | | desc,outTradeNo,totalFee,openid,"NO_CHECK",""); |
| | | JsApiPayComService jsApiPayComService=new JsApiPayComService(); |
| | | |
| | | HttpsRequest2 request2= (HttpsRequest2) jsApiPayComService.getServiceRequest(); |
| | | request2.setCertLocalPath(certLocalPath); |
| | | request2.setMchId(mchID); |
| | | |
| | | JsApiPayComResData result = jsApiPayBusiness.payComOrder(jsApiPayComService, jsApiPayComReqData); |
| | | |
| | | log.info("#提现,企业付款到个人---result:{}",result); |
| | | if (result.getResult_code().equals("SUCCESS")) { |
| | | flag=true; |
| | | }else{ |
| | | log.info("#提现,企业付款到个人失败,{}!", "商户余额不足"); |
| | | flag=false; |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("#企业付款到个人异常#提现#outTradeNo:{}#opUserID:{}", e, outTradeNo,openid); |
| | | flag=false; |
| | | } |
| | | return flag; |
| | | } |
| | | |
| | | /**@Description 支付获取远程设备的ip |
| | | @date 2017年6月27日 |