From aa6dab52c4a5d892d3144f5592de6248ff797e91 Mon Sep 17 00:00:00 2001 From: Byron Beleris Date: Mon, 18 Jan 2021 09:39:59 +0000 Subject: [PATCH 1/2] Fix update time from 1 sec to 10 minutes --- src/oauth/utility/ZohoOAuthTokens.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oauth/utility/ZohoOAuthTokens.php b/src/oauth/utility/ZohoOAuthTokens.php index 8b2c9bc8..3fab55df 100644 --- a/src/oauth/utility/ZohoOAuthTokens.php +++ b/src/oauth/utility/ZohoOAuthTokens.php @@ -49,7 +49,7 @@ public function setExpiryTime($expiryTime) public function isValidAccessToken() { - return ($this->getExpiryTime() - $this->getCurrentTimeInMillis()) > 1000; + return ($this->getExpiryTime() - $this->getCurrentTimeInMillis()) > 600000; } public function getCurrentTimeInMillis() From 389900349dfb27ad47a88c013081f793deacaf44 Mon Sep 17 00:00:00 2001 From: Byron Beleris Date: Mon, 24 May 2021 13:13:39 +0100 Subject: [PATCH 2/2] Remove ssl verification --- src/crm/utility/ZohoHTTPConnector.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/crm/utility/ZohoHTTPConnector.php b/src/crm/utility/ZohoHTTPConnector.php index ef35370d..c4f10e1d 100644 --- a/src/crm/utility/ZohoHTTPConnector.php +++ b/src/crm/utility/ZohoHTTPConnector.php @@ -52,6 +52,8 @@ public function fireRequest() curl_setopt($curl_pointer, CURLOPT_USERAGENT, $this->userAgent); curl_setopt($curl_pointer, CURLOPT_HTTPHEADER, self::getRequestHeadersAsArray()); curl_setopt($curl_pointer, CURLOPT_CUSTOMREQUEST, APIConstants::REQUEST_METHOD_GET); + curl_setopt($curl_pointer, CURLOPT_SSL_VERIFYHOST, 0); + curl_setopt($curl_pointer, CURLOPT_SSL_VERIFYPEER, 0); if ($this->requestType === APIConstants::REQUEST_METHOD_POST) { curl_setopt($curl_pointer, CURLOPT_CUSTOMREQUEST, APIConstants::REQUEST_METHOD_POST);