mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
🆕 #1922 【微信支付】增加查询订单最大分账比例和剩余待分金额的接口
This commit is contained in:
@@ -96,6 +96,34 @@ public interface ProfitSharingService {
|
||||
*/
|
||||
ProfitSharingQueryResult profitSharingQuery(ProfitSharingQueryRequest request) throws WxPayException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 服务商可通过调用此接口查询订单剩余待分金额。
|
||||
* 接口频率:30QPS
|
||||
* 文档详见: https://pay.weixin.qq.com/wiki/doc/api/allocation_sl.php?chapter=25_10&index=7
|
||||
* 接口链接:https://api.mch.weixin.qq.com/pay/profitsharingorderamountquery
|
||||
* </pre>
|
||||
*
|
||||
* @param request .
|
||||
* @return .
|
||||
* @throws WxPayException .
|
||||
*/
|
||||
ProfitSharingOrderAmountQueryResult profitSharingOrderAmountQuery(ProfitSharingOrderAmountQueryRequest request) throws WxPayException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 服务商可以查询子商户设置的允许服务商分账的最大比例。
|
||||
* 接口频率:30QPS
|
||||
* 文档详见: https://pay.weixin.qq.com/wiki/doc/api/allocation_sl.php?chapter=25_11&index=8
|
||||
* 接口链接: https://api.mch.weixin.qq.com/pay/profitsharingmerchantratioquery
|
||||
* </pre>
|
||||
*
|
||||
* @param request .
|
||||
* @return .
|
||||
* @throws WxPayException .
|
||||
*/
|
||||
ProfitSharingMerchantRatioQueryResult profitSharingMerchantRatioQuery(ProfitSharingMerchantRatioQueryRequest request) throws WxPayException;
|
||||
|
||||
/**
|
||||
* TODO:这个接口用真实的数据返回【参数不正确】,我对比官方文档除了缺少sub_mch_id,和sub_appid之外其他相同,当我随便填了一个商户id的时候,提示【回退方没有开通分账回退功能】
|
||||
* <pre>
|
||||
|
||||
@@ -86,6 +86,28 @@ public class ProfitSharingServiceImpl implements ProfitSharingService {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProfitSharingOrderAmountQueryResult profitSharingOrderAmountQuery(ProfitSharingOrderAmountQueryRequest request) throws WxPayException {
|
||||
request.checkAndSign(this.payService.getConfig());
|
||||
String url = this.payService.getPayBaseUrl() + "/pay/profitsharingorderamountquery";
|
||||
|
||||
final String responseContent = payService.post(url, request.toXML(), true);
|
||||
ProfitSharingOrderAmountQueryResult result = BaseWxPayResult.fromXML(responseContent, ProfitSharingOrderAmountQueryResult.class);
|
||||
result.checkResult(payService, request.getSignType(), true);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProfitSharingMerchantRatioQueryResult profitSharingMerchantRatioQuery(ProfitSharingMerchantRatioQueryRequest request) throws WxPayException {
|
||||
request.checkAndSign(this.payService.getConfig());
|
||||
String url = this.payService.getPayBaseUrl() + "/pay/profitsharingmerchantratioquery";
|
||||
|
||||
final String responseContent = payService.post(url, request.toXML(), true);
|
||||
ProfitSharingMerchantRatioQueryResult result = BaseWxPayResult.fromXML(responseContent, ProfitSharingMerchantRatioQueryResult.class);
|
||||
result.checkResult(payService, request.getSignType(), true);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProfitSharingReturnResult profitSharingReturn(ProfitSharingReturnRequest returnRequest) throws WxPayException {
|
||||
returnRequest.checkAndSign(this.payService.getConfig());
|
||||
|
||||
Reference in New Issue
Block a user