|
|
@@ -42,7 +42,7 @@ class DispatchService
|
|
|
}
|
|
|
|
|
|
//检测 token 是否即将过期
|
|
|
- $tokenExpireTime = $pt['expireAt'];
|
|
|
+ $tokenExpireTime = $pt['expiresAt'];
|
|
|
if ($tokenExpireTime < time() + 86400 * 5) {
|
|
|
Yii::info('刷新 token: ' . $pt['platform'] . ',refreshToken: ' . $pt['refreshToken'] . ',merchantId: ' . $pt['merchantId']);
|
|
|
$this->refreshToken($pt['platform'], $pt['refreshToken'], ['merchantId' => $pt['merchantId']]);
|
|
|
@@ -68,7 +68,7 @@ class DispatchService
|
|
|
break;
|
|
|
}
|
|
|
$this->platformName = $platform;
|
|
|
- if($authPlatform['expireAt'] < time() + 86400 * 5) {
|
|
|
+ if($authPlatform['expiresAt'] < time() + 86400 * 5) {
|
|
|
Yii::info('刷新 token: ' . $platform . ',refreshToken: ' . $authPlatform['refreshToken'] . ',merchantId: ' . $authPlatform['merchantId']);
|
|
|
$this->refreshToken($platform, $authPlatform['refreshToken'], ['merchantId' => $authPlatform['merchantId']]);
|
|
|
}
|