Skip to content

Commit 2019eff

Browse files
committed
🎨 修复接口参数命名错误问题
1 parent cabee0f commit 2019eff

File tree

4 files changed

+14
-16
lines changed

4 files changed

+14
-16
lines changed

weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayRefundQueryV3Request.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,14 @@ public class WxPayRefundQueryV3Request implements Serializable {
1919
private static final long serialVersionUID = 1L;
2020
/**
2121
* <pre>
22-
* 字段名:商户订单号
23-
* 变量名:out_trade_no
22+
* 字段名:商户退款单号
23+
* 变量名:out_refund_no
2424
* 是否必填:是
25-
* 类型:string[1,32]
26-
* 描述:
27-
* 商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一。
28-
* 特殊规则:最小字符长度为6
29-
* 示例值:1217752501201407033233368018
25+
* 类型:string[1, 64]
26+
* 描述:商户系统内部的退款单号,商户系统内部唯一,只能是数字、大小写字母_-|*@ ,同一退款单号多次请求只退一笔。
27+
* 示例值:1217752501201407033233368018
3028
* </pre>
3129
*/
32-
@SerializedName(value = "out_trade_no")
33-
private String outTradeNo;
30+
@SerializedName(value = "out_refund_no")
31+
private String outRefundNo;
3432
}

weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/WxPayService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,11 +697,11 @@ WxPayRefundQueryResult refundQuery(String transactionId, String outTradeNo, Stri
697697
* 接口链接:https://api.mch.weixin.qq.com/v3/refund/domestic/refunds/{out_refund_no}
698698
* </pre>
699699
*
700-
* @param outTradeNo 商户订单号
700+
* @param outRefundNo 商户退款单号
701701
* @return 退款信息 wx pay refund query result
702702
* @throws WxPayException the wx pay exception
703703
*/
704-
WxPayRefundQueryV3Result refundQueryV3(String outTradeNo) throws WxPayException;
704+
WxPayRefundQueryV3Result refundQueryV3(String outRefundNo) throws WxPayException;
705705

706706
/**
707707
* <pre>

weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,15 +305,15 @@ public WxPayRefundQueryResult refundQueryV2(WxPayRefundQueryRequest request) thr
305305
}
306306

307307
@Override
308-
public WxPayRefundQueryV3Result refundQueryV3(String outTradeNo) throws WxPayException {
309-
String url = String.format("%s/v3/refund/domestic/refunds/%s", this.getPayBaseUrl(), outTradeNo);
308+
public WxPayRefundQueryV3Result refundQueryV3(String outRefundNo) throws WxPayException {
309+
String url = String.format("%s/v3/refund/domestic/refunds/%s", this.getPayBaseUrl(), outRefundNo);
310310
String response = this.getV3(url);
311311
return GSON.fromJson(response, WxPayRefundQueryV3Result.class);
312312
}
313313

314314
@Override
315315
public WxPayRefundQueryV3Result refundQueryV3(WxPayRefundQueryV3Request request) throws WxPayException {
316-
String url = String.format("%s/v3/refund/domestic/refunds/%s", this.getPayBaseUrl(), request.getOutTradeNo());
316+
String url = String.format("%s/v3/refund/domestic/refunds/%s", this.getPayBaseUrl(), request.getOutRefundNo());
317317
String response = this.getV3(url);
318318
return GSON.fromJson(response, WxPayRefundQueryV3Result.class);
319319
}

weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImplTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -769,8 +769,8 @@ public void testRefundV3() throws WxPayException {
769769
@Test
770770
public void testRefundQueryV3() throws WxPayException {
771771
WxPayRefundQueryV3Request request = new WxPayRefundQueryV3Request();
772-
// request.setOutTradeNo("n1ZvYqjAg3D7LUBa");
773-
request.setOutTradeNo("123456789011");
772+
// request.setOutRefundNo("n1ZvYqjAg3D7LUBa");
773+
request.setOutRefundNo("123456789011");
774774
WxPayRefundQueryV3Result result = this.payService.refundQueryV3(request);
775775
System.out.println(GSON.toJson(result));
776776
}

0 commit comments

Comments
 (0)