You are here

public function Connect::getRefreshToken in Commerce Square Connect 8

Gets the refresh token.

Parameters

string $mode: The mode.

Return value

string The refresh token.

File

src/Connect.php, line 104

Class

Connect
Represents the Connect application for Square.

Namespace

Drupal\commerce_square

Code

public function getRefreshToken($mode) {
  if ($mode === 'production') {
    return $this->state
      ->get('commerce_square.production_refresh_token');
  }
  return '';
}