add clear
This commit is contained in:
+1
-20
@@ -4,28 +4,9 @@
|
||||
namespace wchat;
|
||||
|
||||
|
||||
class Token extends Miniprogarampage
|
||||
class Token extends SmallProgram
|
||||
{
|
||||
|
||||
private $url = 'https://api.weixin.qq.com/cgi-bin/token';
|
||||
|
||||
|
||||
/**
|
||||
* @return mixed|null
|
||||
*/
|
||||
public function generateAccess_token()
|
||||
{
|
||||
$query = [
|
||||
'grant_type' => 'client_credential',
|
||||
'appid' => $this->config->getAppid(),
|
||||
'secret' => $this->config->getAppsecret()
|
||||
];
|
||||
$param = $this->request->get($this->url, $query);
|
||||
if (!$param->isResultsOK()) {
|
||||
return null;
|
||||
}
|
||||
return $param->getData('access_token');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user