🆕 #1923 【微信支付】电商收付通增加添加、删除分账接收方等接口

This commit is contained in:
cloudX
2021-01-15 15:21:52 +08:00
committed by GitHub
parent ecbefea5e5
commit 43771f6048
5 changed files with 275 additions and 4 deletions

View File

@@ -251,6 +251,30 @@ public interface EcommerceService {
*/
ProfitSharingResult queryProfitSharing(ProfitSharingQueryRequest request) throws WxPayException;
/**
* <pre>
* 添加分账接收方API
* 文档地址: https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/ecommerce/profitsharing/chapter3_7.shtml
* </pre>
*
* @param request 添加分账接收方
* @return 返回数据 profit sharing result
* @throws WxPayException the wx pay exception
*/
ProfitSharingReceiverResult addReceivers(ProfitSharingReceiverRequest request) throws WxPayException;
/**
* <pre>
* 删除分账接收方API
* 文档地址: https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/ecommerce/profitsharing/chapter3_8.shtml
* </pre>
*
* @param request 删除分账接收方
* @return 返回数据 profit sharing result
* @throws WxPayException the wx pay exception
*/
ProfitSharingReceiverResult deleteReceivers(ProfitSharingReceiverRequest request) throws WxPayException;
/**
* <pre>
* 请求分账回退API

View File

@@ -203,6 +203,20 @@ public class EcommerceServiceImpl implements EcommerceService {
return GSON.fromJson(response, ProfitSharingResult.class);
}
@Override
public ProfitSharingReceiverResult addReceivers(ProfitSharingReceiverRequest request) throws WxPayException {
String url = String.format("%s/v3/ecommerce/profitsharing/receivers/add", this.payService.getPayBaseUrl());
String response = this.payService.postV3(url, GSON.toJson(request));
return GSON.fromJson(response, ProfitSharingReceiverResult.class);
}
@Override
public ProfitSharingReceiverResult deleteReceivers(ProfitSharingReceiverRequest request) throws WxPayException {
String url = String.format("%s/v3/ecommerce/profitsharing/receivers/delete", this.payService.getPayBaseUrl());
String response = this.payService.postV3(url, GSON.toJson(request));
return GSON.fromJson(response, ProfitSharingReceiverResult.class);
}
@Override
public ReturnOrdersResult returnOrders(ReturnOrdersRequest request) throws WxPayException {
String url = String.format("%s/v3/ecommerce/profitsharing/returnorders", this.payService.getPayBaseUrl());