mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-02-18 06:06:23 +08:00
🆕 #1764 微信支付电商收付通增加请求分账回退接口
This commit is contained in:
@@ -201,4 +201,16 @@ public interface EcommerceService {
|
||||
*/
|
||||
ProfitSharingResult profitSharing(ProfitSharingRequest request) throws WxPayException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 请求分账回退API
|
||||
* 文档地址: https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/ecommerce/profitsharing/chapter3_3.shtml
|
||||
* </pre>
|
||||
*
|
||||
* @param request 分账回退请求
|
||||
* @return 返回数据 return orders result
|
||||
* @throws WxPayException the wx pay exception
|
||||
*/
|
||||
ReturnOrdersResult returnOrders(ReturnOrdersRequest request) throws WxPayException;
|
||||
|
||||
}
|
||||
|
||||
@@ -155,6 +155,13 @@ public class EcommerceServiceImpl implements EcommerceService {
|
||||
return GSON.fromJson(response, ProfitSharingResult.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReturnOrdersResult returnOrders(ReturnOrdersRequest request) throws WxPayException {
|
||||
String url = String.format("%s/v3/ecommerce/profitsharing/returnorders", this.payService.getPayBaseUrl());
|
||||
String response = this.payService.postV3(url, GSON.toJson(request));
|
||||
return GSON.fromJson(response, ReturnOrdersResult.class);
|
||||
}
|
||||
|
||||
private boolean verifyNotifySign(SignatureHeader header, String data) {
|
||||
String beforeSign = String.format("%s\n%s\n%s\n",
|
||||
header.getTimeStamp(),
|
||||
|
||||
Reference in New Issue
Block a user