diff --git a/app/controller/OAuthController.php b/app/controller/OAuthController.php index 3ecddbc..d409a6a 100644 --- a/app/controller/OAuthController.php +++ b/app/controller/OAuthController.php @@ -110,13 +110,15 @@ class OAuthController try { $listAccessibleCustomers = $this->googleAdsAccountService->runListAccessibleCustomers($option); }catch (\Exception $e) { - return $this->errorResponse(300, 'The Google account (@gmail.com user) that generated the OAuth access tokens is not associated with any Ads accounts. Create a new account, or add the Google account to an existing Ads account.'); + $googleOAuthService = new GoogleOAuthService(); + $googleOAuthService->revokeToken($tokens['refresh_token'], $merchantId); + return $this->errorResponse(300, 'The Google account not associated with any Ads accounts'); } if (empty($listAccessibleCustomers)) { $googleOAuthService = new GoogleOAuthService(); $googleOAuthService->revokeToken($tokens['refresh_token'], $merchantId); - return $this->errorResponse(300, 'The Google account (@gmail.com user) that generated the OAuth access tokens is not associated with any active Ads accounts. Create a active account and try again.'); + return $this->errorResponse(300, 'The Google account not associated with any active Ads accounts'); } // $googleOAuthService->saveRefreshToken($tokens['refresh_token'], $state); //作废2025-2-13