mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
🆕 【微信支付】平台收付通(退款)增加垫付退款回补和查询垫付回补结果的接口
This commit is contained in:
@@ -364,6 +364,33 @@ public interface EcommerceService {
|
||||
*/
|
||||
RefundQueryResult queryRefundByRefundId(String subMchid, String refundId) throws WxPayException;
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 垫付退款回补API
|
||||
* 文档地址: https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_6_4.shtml
|
||||
* </pre>
|
||||
*
|
||||
* @param subMchid 二级商户号
|
||||
* @param refundId 微信退款单号
|
||||
* @return 返回数据 return refunds result
|
||||
* @throws WxPayException the wx pay exception
|
||||
*/
|
||||
ReturnAdvanceResult refundsReturnAdvance(String subMchid, String refundId) throws WxPayException;
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 查询垫付回补结果API
|
||||
* 文档地址: https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_6_5.shtml
|
||||
* </pre>
|
||||
*
|
||||
* @param subMchid 二级商户号
|
||||
* @param refundId 微信退款单号
|
||||
* @return 返回数据 return refunds result
|
||||
* @throws WxPayException the wx pay exception
|
||||
*/
|
||||
ReturnAdvanceResult queryRefundsReturnAdvance(String subMchid, String refundId) throws WxPayException;
|
||||
/**
|
||||
* <pre>
|
||||
* 查询退款API
|
||||
|
||||
@@ -290,6 +290,25 @@ public class EcommerceServiceImpl implements EcommerceService {
|
||||
return GSON.fromJson(response, RefundQueryResult.class);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ReturnAdvanceResult refundsReturnAdvance(String subMchid, String refundId) throws WxPayException {
|
||||
String url = String.format("%s/v3/ecommerce/refunds/%s/return-advance", this.payService.getPayBaseUrl(), refundId);
|
||||
Map request = new HashMap();
|
||||
request.put("sub_mchid",subMchid);
|
||||
String response = this.payService.postV3(url, GSON.toJson(request));
|
||||
return GSON.fromJson(response, ReturnAdvanceResult.class);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ReturnAdvanceResult queryRefundsReturnAdvance(String subMchid, String refundId) throws WxPayException {
|
||||
String url = String.format("%s/v3/ecommerce/refunds/%s/return-advance?sub_mchid=%s", this.payService.getPayBaseUrl(), refundId,subMchid);
|
||||
String response = this.payService.getV3(url);
|
||||
return GSON.fromJson(response, ReturnAdvanceResult.class);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public RefundQueryResult queryRefundByOutRefundNo(String subMchid, String outRefundNo) throws WxPayException {
|
||||
String url = String.format("%s/v3/ecommerce/refunds/out-refund-no/%s?sub_mchid=%s", this.payService.getPayBaseUrl(), outRefundNo, subMchid);
|
||||
|
||||
Reference in New Issue
Block a user