From ad7397b6e11ea00802d831a284a2dd57faf9a190 Mon Sep 17 00:00:00 2001 From: Robert Baelde Date: Thu, 16 Mar 2017 16:59:12 +0100 Subject: [PATCH] Updated the code variable name, and removed code paramater --- src/MollieConnectProvider.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/MollieConnectProvider.php b/src/MollieConnectProvider.php index d011853..8b77169 100644 --- a/src/MollieConnectProvider.php +++ b/src/MollieConnectProvider.php @@ -110,34 +110,33 @@ public function getAccessToken($code) /** * Get the access token with a refresh token. * - * @param string $code + * @param string $refresh_token * * @return array */ - public function getRefreshTokenResponse($code) + public function getRefreshTokenResponse($refresh_token) { $response = $this->getHttpClient()->post($this->getTokenUrl(), [ 'headers' => ['Accept' => 'application/json'], - 'form_params' => $this->getRefreshTokenFields($code), + 'form_params' => $this->getRefreshTokenFields($refresh_token), ]); return json_decode($response->getBody(), true); } /** * Get the refresh tokenfields with a refresh token. * - * @param string $code + * @param string $refresh_token * * @return array */ - protected function getRefreshTokenFields($code) + protected function getRefreshTokenFields($refresh_token) { return [ 'client_id' => $this->clientId, 'client_secret' => $this->clientSecret, - 'code' => $code, 'grant_type' => 'refresh_token', - 'refresh_token' => $code, + 'refresh_token' => $refresh_token, ]; }