2019-10-25 15:20:09 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
2020-03-05 12:41:49 +08:00
|
|
|
namespace wchat\qq;
|
2019-10-25 15:20:09 +08:00
|
|
|
|
|
|
|
|
|
2022-09-09 16:42:55 +08:00
|
|
|
use wchat\common\Result;
|
2019-10-25 15:20:09 +08:00
|
|
|
|
2022-09-09 16:42:55 +08:00
|
|
|
class Token extends SmallProgram
|
2019-10-25 15:20:09 +08:00
|
|
|
{
|
|
|
|
|
|
2023-11-14 01:08:06 +08:00
|
|
|
/**
|
|
|
|
|
* @return Result
|
|
|
|
|
*/
|
|
|
|
|
public function token(): Result
|
|
|
|
|
{
|
|
|
|
|
$query = [
|
|
|
|
|
'grant_type' => 'client_credential',
|
|
|
|
|
'appid' => $this->payConfig->appId,
|
|
|
|
|
'secret' => $this->payConfig->appSecret
|
|
|
|
|
];
|
2023-11-14 12:39:28 +08:00
|
|
|
return $this->get('api.q.qq.com', '/api/getToken', $query);
|
2023-11-14 01:08:06 +08:00
|
|
|
}
|
2019-10-25 15:20:09 +08:00
|
|
|
|
|
|
|
|
}
|