mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-02-17 05:48:12 +08:00
🆕 #1923 【微信支付】电商收付通增加添加、删除分账接收方等接口
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user