🆕 #2664 【微信支付】电商收付通(分账)增加查询订单剩余待分金额的接口

This commit is contained in:
hiddentrack
2022-05-26 17:03:08 +08:00
committed by GitHub
parent 403d9c58ea
commit cd034c4a6a
4 changed files with 103 additions and 0 deletions

View File

@@ -252,6 +252,18 @@ public interface EcommerceService {
*/
ProfitSharingResult queryProfitSharing(ProfitSharingQueryRequest request) throws WxPayException;
/**
* <pre>
* 查询订单剩余待分金额API
* 文档地址: https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_4_9.shtml
* </pre>
*
* @param request 查询订单剩余待分金额请求
* @return 返回数据 profit sharing UnSplitAmount result
* @throws WxPayException the wx pay exception
*/
ProfitSharingOrdersUnSplitAmountResult queryProfitSharingOrdersUnsplitAmount(ProfitSharingOrdersUnSplitAmountRequest request) throws WxPayException;
/**
* <pre>
* 添加分账接收方API

View File

@@ -200,6 +200,14 @@ public class EcommerceServiceImpl implements EcommerceService {
return GSON.fromJson(response, ProfitSharingResult.class);
}
@Override
public ProfitSharingOrdersUnSplitAmountResult queryProfitSharingOrdersUnsplitAmount(ProfitSharingOrdersUnSplitAmountRequest request) throws WxPayException {
String url = String.format("%s/v3/ecommerce/profitsharing/orders/%s/amounts",
this.payService.getPayBaseUrl(), request.getTransactionId());
String response = this.payService.getV3(url);
return GSON.fromJson(response, ProfitSharingOrdersUnSplitAmountResult.class);
}
@Override
public ProfitSharingReceiverResult addReceivers(ProfitSharingReceiverRequest request) throws WxPayException {
String url = String.format("%s/v3/ecommerce/profitsharing/receivers/add", this.payService.getPayBaseUrl());