public function Connect::getAccessTokenExpiration in Commerce Square Connect 8
Gets the access token expiration timestamp.
Parameters
string $mode: The mode.
Return value
int The expiration timestamp. Or -1 if sandbox.
File
- src/
Connect.php, line 120
Class
- Connect
- Represents the Connect application for Square.
Namespace
Drupal\commerce_squareCode
public function getAccessTokenExpiration($mode) {
if ($mode == 'production') {
return $this->state
->get('commerce_square.production_access_token_expiry');
}
return -1;
}