From 7b196756c150616b5a7d14bbb0ceff8c6000aea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Tue, 21 May 2019 16:02:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Recharge.php=20=E6=A0=B9?= =?UTF-8?q?=E6=8D=AE=E6=9C=AC=E5=9C=B0=E6=96=87=E4=BB=B6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wx/Recharge.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/wx/Recharge.php b/wx/Recharge.php index 9582847..62d8235 100644 --- a/wx/Recharge.php +++ b/wx/Recharge.php @@ -68,7 +68,7 @@ class Recharge extends Base protected function builder() { $data = [ - 'appid' => $this->app_id, + 'appid' => $this->appid, 'mch_id' => $this->mch_id, 'nonce_str' => $this->random(32), 'body' => $this->body, @@ -84,7 +84,7 @@ class Recharge extends Base $data['sign'] = $this->sign($data); - return $this->toXml($data); + return static::toXml($data); } private function createPayUrl() @@ -98,6 +98,7 @@ class Recharge extends Base * @param $order * @param $REMOTE_ADDR * @return Result + * @throws * * 提现 */ @@ -107,7 +108,7 @@ class Recharge extends Base 'nonce_str' => $this->random(32), 'partner_trade_no' => $order, 'mchid' => $this->mch_id, - 'mch_appid' => $this->app_id, + 'mch_appid' => $this->appid, 'openid' => $openid, 'check_name' => 'NO_CHECK', 'amount' => $money * 100, @@ -119,7 +120,7 @@ class Recharge extends Base $array['sign'] = $this->sign($array); - return Http::post($transfers, $this->toXml($array), function ($data) { + return Http::post($transfers, static::toXml($array), function ($data) { $array = $this->toArray($data); if ($array['result_code'] != 'SUCCESS') { $data = ['code' => $array['err_code'], 'message' => $array['err_code_des']]; @@ -130,4 +131,4 @@ class Recharge extends Base }, NULL, [$this->ssl_cert, $this->ssl_key]); } -} \ No newline at end of file +}