so guys, i have zohocrm integration code in 2.0 version but now i have change the laravel version to 5.2 to 9.0 so now zohocrm is not support 2.0 version so i am update the zohocrm version 3.0 but i dont understand how to update intial code of zohocrm here is my previos version code can you please help me out how to upgdade code
here is code
public function createAccessToken(){
$this->clientId = Config::get('constants.ZOHO_CRM_CLIENT_ID');
$this->clientSecretId = Config::get('constants.ZOHO_CRM_CLIENT_SECRET_ID');
$this->redirectUri = Config::get('constants.ZOHO_CRM_REDIRECT_URI');
$this->currentUserEmail = Config::get('constants.ZOHO_CRM_USER_EMAIL');
$this->tokenPersistancePath = public_path('zcrm_oauthtokens');
$configuration = [
"client_id" => $this->clientId ,
"client_secret"=>$this->clientSecretId,
"redirect_uri"=>$this->redirectUri,
"currentUserEmail"=>$this->currentUserEmail,
'token_persistence_path' => $this->tokenPersistancePath,
'sandbox' => false,
'apiBaseUrl' => 'www.zohoapis.com'
];
$result = false;
try {
ZCRMRestClient::initialize($configuration);
$oAuthClient = ZohoOAuth::getClientInstance();
$refreshToken = "xxx-a0";
$userIdentifier = $this->currentUserEmail;
$oAuthTokens = $oAuthClient->generateAccessTokenFromRefreshToken($refreshToken,$userIdentifier);
$result = true;
return $oAuthTokens->getAccessToken();
} catch (Exception $ex) {
$result = false;
}
return $result;
}
error comes in like Class “zcrmsdkcrmsetuprestclientZCRMRestClient” not found
vandan artifex is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.