Package com.foxinmy.weixin4j.pay.api
Class ProfitSharingApi
- java.lang.Object
-
- com.foxinmy.weixin4j.api.BaseApi
-
- com.foxinmy.weixin4j.pay.api.MchApi
-
- com.foxinmy.weixin4j.pay.api.ProfitSharingApi
-
public class ProfitSharingApi extends MchApi
微信商户平台分账接口(直连商户/服务商)- Since:
- weixin4j-pay 1.1.0
- Author:
- kit (kit.li@qq.com)
-
-
Field Summary
-
Fields inherited from class com.foxinmy.weixin4j.pay.api.MchApi
weixinAccount, weixinSignature
-
-
Constructor Summary
Constructors Constructor Description ProfitSharingApi(WeixinPayAccount weixinAccount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReceiverResult
addReceiver(Receiver receiver)
添加分账接收方 服务商代子商户发起添加分账接收方请求,后续可通过发起分账请求将结算后的钱分到该分账接收方。ProfitSharingResult
profitSharing(String transactionId, String outOrderNo, List<ReceiverProfit> receivers, Boolean multi)
请求分帐ProfitSharingResult
profitSharingFinish(String transactionId, String outOrderNo, String description)
完结分账 1、不需要进行分账的订单,可直接调用本接口将订单的金额全部解冻给本商户 2、调用多次分账接口后,需要解冻剩余资金时,调用本接口将剩余的分账金额全部解冻给特约商户 3、已调用请求单次分账后,剩余待分账金额为零,不需要再调用此接口。ProfitSharingResult
profitSharingQuery(String transactionId, String outOrderNo)
分帐查询ProfitSharingReturnResult
profitSharingReturn(ProfitId id, String outReturnNo, ReturnAccountType returnAccountType, String returnAccount, int returnAmount, String description)
分账回退ProfitSharingReturnResult
profitSharingReturnQuery(ProfitId id, String outReturnNo)
回退结果查询ReceiverResult
removeReceiver(Receiver receiver)
删除分账接收方 商户发起删除分账接收方请求,删除后不支持将结算后的钱分到该分账接收方。-
Methods inherited from class com.foxinmy.weixin4j.pay.api.MchApi
createBaseRequestMap, declareMerchant, getWeixinSignature, getWeixinSSLExecutor, weixinBundle
-
-
-
-
Constructor Detail
-
ProfitSharingApi
public ProfitSharingApi(WeixinPayAccount weixinAccount)
-
-
Method Detail
-
addReceiver
public ReceiverResult addReceiver(Receiver receiver) throws com.foxinmy.weixin4j.exception.WeixinException
添加分账接收方 服务商代子商户发起添加分账接收方请求,后续可通过发起分账请求将结算后的钱分到该分账接收方。- Parameters:
receiver
- 分帐接收方- Returns:
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
Receiver
,ReceiverResult
, 添加分账接收方
-
removeReceiver
public ReceiverResult removeReceiver(Receiver receiver) throws com.foxinmy.weixin4j.exception.WeixinException
删除分账接收方 商户发起删除分账接收方请求,删除后不支持将结算后的钱分到该分账接收方。- Parameters:
receiver
- 分帐接收方- Returns:
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
Receiver
,ReceiverResult
, 删除分账接收方
-
profitSharing
public ProfitSharingResult profitSharing(String transactionId, String outOrderNo, List<ReceiverProfit> receivers, Boolean multi) throws com.foxinmy.weixin4j.exception.WeixinException
请求分帐- Parameters:
transactionId
- 微信订单号outOrderNo
- 商户分帐单号receivers
- 分帐接收方multi
- 是否多次分帐,默认为单次分帐,即调用分帐成功后马上解冻剩余金额给商户,不需要完结分帐。多次分帐可多次调用分帐API,需调完结分帐结束分帐- Returns:
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
- 请求单次分帐
-
profitSharingQuery
public ProfitSharingResult profitSharingQuery(String transactionId, String outOrderNo) throws com.foxinmy.weixin4j.exception.WeixinException
分帐查询- Parameters:
transactionId
- 微信订单号outOrderNo
- 商户分帐单号- Returns:
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
- 分帐查询
-
profitSharingFinish
public ProfitSharingResult profitSharingFinish(String transactionId, String outOrderNo, String description) throws com.foxinmy.weixin4j.exception.WeixinException
完结分账 1、不需要进行分账的订单,可直接调用本接口将订单的金额全部解冻给本商户 2、调用多次分账接口后,需要解冻剩余资金时,调用本接口将剩余的分账金额全部解冻给特约商户 3、已调用请求单次分账后,剩余待分账金额为零,不需要再调用此接口。- Parameters:
transactionId
- 微信订单号outOrderNo
- 商户分帐单号description
- 分帐完结描述- Returns:
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
- 完结分账
-
profitSharingReturn
public ProfitSharingReturnResult profitSharingReturn(ProfitId id, String outReturnNo, ReturnAccountType returnAccountType, String returnAccount, int returnAmount, String description) throws com.foxinmy.weixin4j.exception.WeixinException
分账回退- Parameters:
id
- 分帐单号outReturnNo
- 商户回退单号returnAccountType
- 回退方类型returnAccount
- 回退方账号returnAmount
- 回退金额description
- 回退描述- Returns:
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
ProfitSharingReturnRequest
, 分账回退
-
profitSharingReturnQuery
public ProfitSharingReturnResult profitSharingReturnQuery(ProfitId id, String outReturnNo) throws com.foxinmy.weixin4j.exception.WeixinException
回退结果查询- Parameters:
id
- 分帐单号outReturnNo
- 商户回退单号- Returns:
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
ProfitSharingReturnRequest
, 回退结果查询
-
-