Skip to content

Commit

Permalink
Typo Hotfix
Browse files Browse the repository at this point in the history
Fix wrong parameters names
  • Loading branch information
daniti authored Oct 5, 2018
1 parent 2d1044b commit 8d30988
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/PipedriveToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,16 @@ public function refreshIfNeeded($pipedrive)

$response = $client->request('POST', 'https://oauth.pipedrive.com/oauth/token', [
'form_params' => [
'grant_type' => 'refreshToken',
'refreshToken' => $this->refreshToken
'grant_type' => 'refresh_token',
'refresh_token' => $this->refreshToken
]
]);

$tokenInstance = json_decode($response->getBody());

$this->accessToken = $tokenInstance->accessToken;
$this->accessToken = $tokenInstance->access_token;
$this->expiresAt = time() + $tokenInstance->expires_in;
$this->refreshToken = $tokenInstance->refreshToken;
$this->refreshToken = $tokenInstance->refresh_token;

$storage = $pipedrive->getStorage();

Expand Down

0 comments on commit 8d30988

Please sign in to comment.