From 2fd1d0c1f90715b7fb1aa7f834602b600965c3ea Mon Sep 17 00:00:00 2001 From: xiafang Date: Sat, 25 Feb 2023 13:20:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=9B=B4=E8=BF=9E=E5=95=86=E6=88=B7?= =?UTF-8?q?=E5=90=88=E5=8D=95=E6=94=AF=E4=BB=98=E5=A2=9E=E5=8A=A0=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=8D=95=E7=AC=94=E9=80=80=E6=AC=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wechat/v3/WechatCombinePayApi.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatCombinePayApi.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatCombinePayApi.java index a3b4fd4..53af532 100644 --- a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatCombinePayApi.java +++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatCombinePayApi.java @@ -209,4 +209,26 @@ public class WechatCombinePayApi extends AbstractApi { .request(); return wechatResponseEntity; } + + /** + * 查询单笔退款API + * + * @param outRefundNo the out refund no + * @return the wechat response entity + * @since 1.0.16.RELEASE + */ + public WechatResponseEntity queryRefundInfo(String outRefundNo) { + WechatResponseEntity wechatResponseEntity = new WechatResponseEntity<>(); + this.client().withType(WechatPayV3Type.QUERY_REFUND, outRefundNo) + .function(((type, param) -> { + URI uri = UriComponentsBuilder.fromHttpUrl(type.uri(WeChatServer.CHINA)) + .build() + .expand(param) + .toUri(); + return Get(uri); + })) + .consumer(wechatResponseEntity::convert) + .request(); + return wechatResponseEntity; + } }