From 8d3098831f2ab8e9218c1eddd99bebfece707b77 Mon Sep 17 00:00:00 2001 From: Daniele Timo Date: Fri, 5 Oct 2018 16:50:28 +0300 Subject: [PATCH] Typo Hotfix Fix wrong parameters names --- src/PipedriveToken.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PipedriveToken.php b/src/PipedriveToken.php index 1fe51f0..74efe09 100644 --- a/src/PipedriveToken.php +++ b/src/PipedriveToken.php @@ -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();