diff --git a/WePay/Transfers.php b/WePay/Transfers.php index 410aa8b..f86d147 100644 --- a/WePay/Transfers.php +++ b/WePay/Transfers.php @@ -32,10 +32,10 @@ class Transfers extends BasicPay */ public function create(array $options) { - $this->params->set('mchid', $this->config->get('mch_id')); - $this->params->set('mch_appid', $this->config->get('appid')); $this->params->offsetUnset('appid'); $this->params->offsetUnset('mch_id'); + $this->params->set('mchid', $this->config->get('mch_id')); + $this->params->set('mch_appid', $this->config->get('appid')); $url = 'https://api.mch.weixin.qq.com/mmpaymkttransfers/promotion/transfers'; return $this->callPostApi($url, $options, true, 'MD5', false); } @@ -48,11 +48,11 @@ class Transfers extends BasicPay */ public function query($partnerTradeNo) { - $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'); + $this->params->set('appid', $this->config->get('appid')); + $this->params->set('mch_id', $this->config->get('mch_id')); + $url = 'https://api.mch.weixin.qq.com/mmpaymkttransfers/gettransferinfo'; return $this->callPostApi($url, ['partner_trade_no' => $partnerTradeNo], true, 'MD5', false); }