优化微信转账、分账完成解冻金额
This commit is contained in:
parent
9c8b13bede
commit
a4e4c990c3
|
|
@ -183,6 +183,7 @@ public class WxpayDivisionService implements IDivisionService {
|
|||
|
||||
com.github.binarywang.wxpay.bean.profitsharingV3.ProfitSharingRequest request = new com.github.binarywang.wxpay.bean.profitsharingV3.ProfitSharingRequest();
|
||||
request.setTransactionId(payOrder.getChannelOrderNo());
|
||||
request.setUnfreezeUnsplit(true);
|
||||
|
||||
request.setAppid(WxpayKit.getWxPayConfig(wxServiceWrapper).getAppId());
|
||||
// 特约商户
|
||||
|
|
|
|||
|
|
@ -120,11 +120,11 @@ public class WxpayTransferService implements ITransferService {
|
|||
} else if (CS.PAY_IF_VERSION.WX_V3.equals(wxServiceWrapper.getApiVersion())) {
|
||||
TransferBatchesRequest request = new TransferBatchesRequest();
|
||||
request.setAppid(wxServiceWrapper.getWxPayService().getConfig().getAppId());
|
||||
request.setTotalAmount(transferOrder.getAmount().intValue());
|
||||
request.setTotalNum(1);
|
||||
request.setOutBatchNo(transferOrder.getTransferId());
|
||||
request.setBatchName(transferOrder.getAccountName());
|
||||
request.setBatchRemark(transferOrder.getTransferDesc());
|
||||
request.setTotalAmount(transferOrder.getAmount().intValue());
|
||||
request.setTotalNum(1);
|
||||
|
||||
List<TransferBatchesRequest.TransferDetail> list = new ArrayList<>();
|
||||
TransferBatchesRequest.TransferDetail transferDetail = new TransferBatchesRequest.TransferDetail();
|
||||
|
|
@ -133,6 +133,7 @@ public class WxpayTransferService implements ITransferService {
|
|||
transferDetail.setTransferAmount(transferOrder.getAmount().intValue()); //付款金额,单位为分
|
||||
transferDetail.setUserName(transferOrder.getAccountName());
|
||||
transferDetail.setTransferRemark(transferOrder.getTransferDesc());
|
||||
list.add(transferDetail);
|
||||
request.setTransferDetailList(list);
|
||||
|
||||
TransferBatchesResult transferBatchesResult = wxServiceWrapper.getWxPayService().getTransferService().transferBatches(request);
|
||||
|
|
|
|||
|
|
@ -78,6 +78,10 @@ public class RefundOrderController extends ApiController {
|
|||
throw new BizException("mchOrderNo 和 payOrderId不能同时为空");
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(rq.getNotifyUrl()) && !StringKit.isAvailableUrl(rq.getNotifyUrl())){
|
||||
throw new BizException("异步通知地址协议仅支持http:// 或 https:// !");
|
||||
}
|
||||
|
||||
PayOrder payOrder = payOrderService.queryMchOrder(rq.getMchNo(), rq.getPayOrderId(), rq.getMchOrderNo());
|
||||
if(payOrder == null){
|
||||
throw new BizException("退款订单不存在");
|
||||
|
|
@ -117,10 +121,6 @@ public class RefundOrderController extends ApiController {
|
|||
throw new BizException("商户退款订单号["+rq.getMchRefundNo()+"]已存在");
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(rq.getNotifyUrl()) && !StringKit.isAvailableUrl(rq.getNotifyUrl())){
|
||||
throw new BizException("异步通知地址协议仅支持http:// 或 https:// !");
|
||||
}
|
||||
|
||||
//获取支付参数 (缓存数据) 和 商户信息
|
||||
MchAppConfigContext mchAppConfigContext = configContextQueryService.queryMchInfoAndAppInfo(mchNo, appId);
|
||||
if(mchAppConfigContext == null){
|
||||
|
|
@ -130,7 +130,6 @@ public class RefundOrderController extends ApiController {
|
|||
MchInfo mchInfo = mchAppConfigContext.getMchInfo();
|
||||
MchApp mchApp = mchAppConfigContext.getMchApp();
|
||||
|
||||
|
||||
//获取退款接口
|
||||
IRefundService refundService = SpringBeansUtil.getBean(payOrder.getIfCode() + "RefundService", IRefundService.class);
|
||||
if(refundService == null){
|
||||
|
|
|
|||
Loading…
Reference in New Issue