更新 Recharge.php

根据本地文件修改
This commit is contained in:
2019-05-21 16:02:17 +08:00
parent a499722047
commit 7b196756c1
+6 -5
View File
@@ -68,7 +68,7 @@ class Recharge extends Base
protected function builder() protected function builder()
{ {
$data = [ $data = [
'appid' => $this->app_id, 'appid' => $this->appid,
'mch_id' => $this->mch_id, 'mch_id' => $this->mch_id,
'nonce_str' => $this->random(32), 'nonce_str' => $this->random(32),
'body' => $this->body, 'body' => $this->body,
@@ -84,7 +84,7 @@ class Recharge extends Base
$data['sign'] = $this->sign($data); $data['sign'] = $this->sign($data);
return $this->toXml($data); return static::toXml($data);
} }
private function createPayUrl() private function createPayUrl()
@@ -98,6 +98,7 @@ class Recharge extends Base
* @param $order * @param $order
* @param $REMOTE_ADDR * @param $REMOTE_ADDR
* @return Result * @return Result
* @throws
* *
* 提现 * 提现
*/ */
@@ -107,7 +108,7 @@ class Recharge extends Base
'nonce_str' => $this->random(32), 'nonce_str' => $this->random(32),
'partner_trade_no' => $order, 'partner_trade_no' => $order,
'mchid' => $this->mch_id, 'mchid' => $this->mch_id,
'mch_appid' => $this->app_id, 'mch_appid' => $this->appid,
'openid' => $openid, 'openid' => $openid,
'check_name' => 'NO_CHECK', 'check_name' => 'NO_CHECK',
'amount' => $money * 100, 'amount' => $money * 100,
@@ -119,7 +120,7 @@ class Recharge extends Base
$array['sign'] = $this->sign($array); $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); $array = $this->toArray($data);
if ($array['result_code'] != 'SUCCESS') { if ($array['result_code'] != 'SUCCESS') {
$data = ['code' => $array['err_code'], 'message' => $array['err_code_des']]; $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]); }, NULL, [$this->ssl_cert, $this->ssl_key]);
} }
} }