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); }