add clear
This commit is contained in:
@@ -12,6 +12,10 @@ use wchat\common\HttpClient;
|
||||
use wchat\common\Result;
|
||||
use wchat\common\Help;
|
||||
|
||||
/**
|
||||
* Class Recharge
|
||||
* @package wchat\wx
|
||||
*/
|
||||
class Recharge extends SmallProgram
|
||||
{
|
||||
private $money = 0;
|
||||
@@ -21,7 +25,7 @@ class Recharge extends SmallProgram
|
||||
private $data = [];
|
||||
|
||||
private $transfers = 'https://api.mch.weixin.qq.com/mmpaymkttransfers/promotion/transfers';
|
||||
private $unifiedorder = 'https://api.mch.weixin.qq.com/pay/unifiedorder';
|
||||
private $uniformed = 'https://api.mch.weixin.qq.com/pay/unifiedorder';
|
||||
|
||||
/**
|
||||
* @param int $money
|
||||
@@ -62,7 +66,7 @@ class Recharge extends SmallProgram
|
||||
}
|
||||
return new Result($return);
|
||||
});
|
||||
return $this->send($this->unifiedorder, $this->builder());
|
||||
return $this->send($this->uniformed, $this->builder());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,7 +18,7 @@ class SmallProgram extends Miniprogarampage
|
||||
* @return mixed
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function generateAccess_token()
|
||||
public function generateAccess_token($get_token = false)
|
||||
{
|
||||
if (!empty($this->config->getToken())) {
|
||||
return $this->config->getToken();
|
||||
@@ -34,6 +34,9 @@ class SmallProgram extends Miniprogarampage
|
||||
if (!$param->isResultsOK()) {
|
||||
throw new \Exception($param->getMessage());
|
||||
}
|
||||
if ($get_token) {
|
||||
return $param->getData('access_token');
|
||||
}
|
||||
return $param->getData();
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -4,7 +4,9 @@
|
||||
namespace wchat\wx;
|
||||
|
||||
|
||||
class Token extends SmallProgram
|
||||
use wchat\base\Access_Token;
|
||||
|
||||
class Token extends SmallProgram implements Access_Token
|
||||
{
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user