From 88537106358acd1616ec3eb1455130798eef8305 Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 11 May 2018 19:20:46 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E4=BF=AE=E5=A4=8D=E4=BC=81?= =?UTF-8?q?=E4=B8=9A=E6=89=93=E6=AC=BE=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Test/pay-transfers-create.php | 2 ++ WeChat/Pay.php | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Test/pay-transfers-create.php b/Test/pay-transfers-create.php index 7e4735c..77d70b0 100644 --- a/Test/pay-transfers-create.php +++ b/Test/pay-transfers-create.php @@ -35,6 +35,8 @@ try { $result = $wechat->createTransfers($options); echo '
';
     var_export($result);
+    $result = $wechat->queryTransfers($options['partner_trade_no']);
+    var_export($result);
 
 } catch (Exception $e) {
 
diff --git a/WeChat/Pay.php b/WeChat/Pay.php
index 9fd78d7..84d7d40 100644
--- a/WeChat/Pay.php
+++ b/WeChat/Pay.php
@@ -250,6 +250,10 @@ class Pay
     public function queryTransfers($partner_trade_no)
     {
         $url = 'https://api.mch.weixin.qq.com/mmpaymkttransfers/gettransferinfo';
+        $this->params->set('appid', $this->config->get('appid'));
+        $this->params->set('mch_id', $this->config->get('mch_id'));
+        $this->params->offsetUnset('mchid');
+        $this->params->offsetUnset('mch_appid');
         return $this->callPostApi($url, ['partner_trade_no' => $partner_trade_no], true, 'MD5', false);
     }