Browse Source

bug fix

master
hotm 4 years ago
parent
commit
6954f89e37
1 changed files with 9 additions and 3 deletions
  1. +9
    -3
      xero.php

+ 9
- 3
xero.php View File

@@ -198,9 +198,15 @@ class Xero {
'urlResourceOwnerDetails' => 'https://api.xero.com/api.xro/2.0/Organisation'
]);
$newAccessToken = $provider->getAccessToken('refresh_token', [
'refresh_token' => $this->storage->getRefreshToken()
]);
try {
$newAccessToken = $provider->getAccessToken('refresh_token', [
'refresh_token' => $this->storage->getRefreshToken()
]);

}catch (\Exception $e) {
$this->startAuthorization();
return;
}
// Save my token, expiration and refresh token
$this->storage->setToken(

Loading…
Cancel
Save