🆕 【微信支付】增加服务商查询单笔退款的v3接口
This commit is contained in:
@@ -29,4 +29,16 @@ public class WxPayRefundQueryV3Request implements Serializable {
|
||||
*/
|
||||
@SerializedName(value = "out_refund_no")
|
||||
private String outRefundNo;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:子商户号
|
||||
* 变量名:sub_mchid
|
||||
* 是否必填:是
|
||||
* 类型:string[1, 32]
|
||||
* 描述:子商户的商户号,由微信支付生成并下发。
|
||||
* 示例值:1900000109
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "sub_mchid")
|
||||
private String subMchid;
|
||||
}
|
||||
|
||||
@@ -868,7 +868,7 @@ public interface WxPayService {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 微信支付-查询退款
|
||||
* 微信支付-查询退款-直连商户
|
||||
* 应用场景:
|
||||
* 提交退款申请后,通过调用该接口查询退款状态。退款有一定延时,建议在提交退款申请后1分钟发起查询退款状态,一般来说零钱支付的退款5分钟内到账,银行卡支付的退款1-3个工作日到账。
|
||||
* 详见 <a href="https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_10.shtml">https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_10.shtml</a>
|
||||
@@ -881,6 +881,21 @@ public interface WxPayService {
|
||||
*/
|
||||
WxPayRefundQueryV3Result refundQueryV3(WxPayRefundQueryV3Request request) throws WxPayException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 微信支付-查询退款-服务商
|
||||
* 应用场景:
|
||||
* 提交退款申请后,通过调用该接口查询退款状态。退款有一定延时,建议在提交退款申请后1分钟发起查询退款状态,一般来说零钱支付的退款5分钟内到账,银行卡支付的退款1-3个工作日到账。
|
||||
* 详见 <a href="https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_1_10.shtml">https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_1_10.shtml</a>
|
||||
* 接口链接:https://api.mch.weixin.qq.com/v3/refund/domestic/refunds/{out_refund_no}?sub_mchid={sub_mchid}
|
||||
* </pre>
|
||||
*
|
||||
* @param request 微信退款单号
|
||||
* @return 退款信息 wx pay refund query result
|
||||
* @throws WxPayException the wx pay exception
|
||||
*/
|
||||
WxPayRefundQueryV3Result refundPartnerQueryV3(WxPayRefundQueryV3Request request) throws WxPayException;
|
||||
|
||||
/**
|
||||
* 解析支付结果通知.
|
||||
* 详见https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_7
|
||||
|
||||
@@ -298,6 +298,13 @@ public abstract class BaseWxPayServiceImpl implements WxPayService {
|
||||
return GSON.fromJson(response, WxPayRefundQueryV3Result.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxPayRefundQueryV3Result refundPartnerQueryV3(WxPayRefundQueryV3Request request) throws WxPayException {
|
||||
String url = String.format("%s/v3/refund/domestic/refunds/%s?sub_mchid=%s", this.getPayBaseUrl(), request.getOutRefundNo(),request.getSubMchid());
|
||||
String response = this.getV3(url);
|
||||
return GSON.fromJson(response, WxPayRefundQueryV3Result.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxPayOrderNotifyResult parseOrderNotifyResult(String xmlData) throws WxPayException {
|
||||
return this.parseOrderNotifyResult(xmlData, null);
|
||||
|
||||
Reference in New Issue
Block a user