message
This commit is contained in:
parent
9caf26e7cd
commit
48a7d08bac
|
@ -48,9 +48,21 @@ class Base
|
|||
return $request;
|
||||
}
|
||||
|
||||
public function transformForAccessTokenRequest($uri, $params)
|
||||
{
|
||||
$uri = new Uri($uri);
|
||||
foreach ($params as $param) {
|
||||
$uri = Uri::withQueryValues($uri, $params);
|
||||
}
|
||||
|
||||
$request = new Request('GET', $uri, []);
|
||||
return $request;
|
||||
}
|
||||
|
||||
public function transformForGetRequest($uri, $params)
|
||||
{
|
||||
$uri = new Uri($uri);
|
||||
$uri = Uri::withQueryValue($uri, 'access_token', $this->getAccessToken());
|
||||
foreach ($params as $param) {
|
||||
$uri = Uri::withQueryValues($uri, $params);
|
||||
}
|
||||
|
@ -81,7 +93,7 @@ class Base
|
|||
return $token;
|
||||
}
|
||||
|
||||
$request = $this->transformForGetRequest('gettoken', [
|
||||
$request = $this->transformForAccessTokenRequest('gettoken', [
|
||||
'corpid' => $config['corp_id'],
|
||||
'corpsecret' => $config['secret']
|
||||
]);
|
||||
|
|
Loading…
Reference in New Issue
Block a user