Skip to content

Commit

Permalink
Updated the code variable name, and removed code paramater
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Baelde committed Mar 16, 2017
1 parent d8c0ab0 commit ad7397b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/MollieConnectProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
];
}

Expand Down

0 comments on commit ad7397b

Please sign in to comment.