From 355ac5e0c02e33a7ec396af426228f9d71dcc714 Mon Sep 17 00:00:00 2001
From: imzhi <yxz_blue@126.com>
Date: Tue, 27 Dec 2022 09:15:36 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0v3=E8=BD=AC=E8=B4=A6=E6=9F=A5?=
 =?UTF-8?q?=E8=AF=A2=E6=98=8E=E7=BB=86=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 WePayV3/Transfers.php | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/WePayV3/Transfers.php b/WePayV3/Transfers.php
index 325dec3..ccb794e 100644
--- a/WePayV3/Transfers.php
+++ b/WePayV3/Transfers.php
@@ -48,4 +48,30 @@ class Transfers extends BasicWePay
         ]);
         return $this->doRequest('GET', "{$pathinfo}?{$params}", '', true);
     }
-}
\ No newline at end of file
+
+    /**
+     * 通过微信明细单号查询明细单
+     * @param string $batchId 微信批次单号
+     * @param string $detailId 微信支付系统内部区分转账批次单下不同转账明细单的唯一标识
+     * @return array
+     * @throws \WeChat\Exceptions\InvalidResponseException
+     */
+    public function detailBatchId($batchId, $detailId)
+    {
+        $pathinfo = "/v3/transfer/batches/batch-id/{$batchId}/details/detail-id/{$detailId}";
+        return $this->doRequest('GET', $pathinfo, '', true);
+    }
+
+    /**
+     * 通过商家明细单号查询明细单
+     * @param string $outBatchNo 商户系统内部的商家批次单号,在商户系统内部唯一
+     * @param string $outDetailNo 商户系统内部区分转账批次单下不同转账明细单的唯一标识
+     * @return array
+     * @throws \WeChat\Exceptions\InvalidResponseException
+     */
+    public function detailOutBatchNo($outBatchNo, $outDetailNo)
+    {
+        $pathinfo = "/v3/transfer/batches/out-batch-no/{$outBatchNo}/details/out-detail-no/{$outDetailNo}";
+        return $this->doRequest('GET', $pathinfo, '', true);
+    }
+}