title: cURL error during making API call. cURL Error Number:[60] SSL certificate prob: self signed certificate in certificate chain
body: <p>Good Day, I am new to server settings. I am currently using laravel 5.4 to integrate my <a href="https://github.com/intuit/QuickBooks-V3-PHP-SDK" rel="nofollow noreferrer">quickbooks app</a> on my live server <a href="http://qb.dagnum.com/connect" rel="nofollow noreferrer">http://qb.dagnum.com/connect</a> but I continue to get this error</p>
  
  <pre><code>(1/1) SdkException
  cURL error during making API call. cURL Error Number:[60] with error:[SSL certificate problem: self signed certificate in certificate chain]
  </code></pre>
  
  <p>I added the package using 'composer require quickbooks/v3-php-sdk'. the server has SSL certificated Installed as well but still my getting the error.</p>
  
  <p>my code:</p>
  
  <pre><code>use App\Http\Controllers\Controller;   
  use QuickBooksOnline\API\DataService\DataService;
  
  class Auth2Controller extends Controller
   {
    public function index()
     {
  
          $dataService = DataService::Configure(array(
           'auth_mode' =&gt; 'oauth2',
           'ClientID' =&gt; "Q0lCkcEshsGMHOEula2r5RKc2yhxvMsYEpKN1lw1WZwyfd1Si6",
           'ClientSecret' =&gt; "gE0F9hLgwx9OBzRpNxyOvWJH6L2fIhzAwBugPJHq",
           'accessTokenKey' =&gt; 'eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiZGlyIn0..4z4Assj4x1qt8H4DtQco6A.nmV2jTxaDMVdFWEUO16q5qhbd5aD6U-U-RYnSNywqg-HPC_3_jvwpMJU1a1S5X-PgPUy60WvVy_8p1awY7kIoFzTV4IhdFLrZpYtBUGCjcsvjxWeOSgP6oCayBEmCv7zzabtgB6vxU46jQqKX2IXYUGPPtyYO64hrgELFR4SKUK6boZiVnh8z19gnvsReKMmIINA3-NgC6QJqMRp6HWgzCa9RuDN9tCtrAK2dy5xmJRNSNgdv_gyg1bfdX4l4b30fLPzFk31fsTT9NTJq9PuGtdTsvUuCj7Hme6HPldD9TKYRXWU8TKrQQrQWEpdlbPr6F3rhP6IdmCv9t1XH_WzF_1IseRUoYhiTUjubig-j8gzwajIdYQTzpJQKJ92QiAEyt8k40WWg0v69hEC0w7WRBuUE-IJ50xWypqS_P28IWt1G14rovZ97soGOteSik-41g1icR2zxfNhXGq7zO7oU5B8r-ej5Pb52T0MCMktgd6y32bqwo2pcEzblL2bZs7DZ7LDx5peY4TIfGW21crTE6xjhRr7LdqB8K505pRqIOP20eaRgwtGHLZ3bdBt1_negw2AGjc409BM0nLzzmODxr3yo-YdGwkcOjm5QgbGAsrnpoSo9tSpxPHoN0vMRneRdsKCd6CZG5M1OIOMuj7spkm442tvwiAMCx2Fh-STG6fMnhOq7l_f8NW_3kscxtF2.obQxJKjPfi1KlaQQ_OUoNg',
           'refreshTokenKey' =&gt; "L011509163184Q0K7DT40SVXhJXAfyoj6B6EbSr3Ty64yVvF5A",
           'QBORealmID' =&gt; "123145857569084",
           'baseUrl' =&gt; "https://sandbox-quickbooks.api.intuit.com"
        ));
  
        $dataService-&gt;setMinorVersion("9");
        $CompanyInfo = $dataService-&gt;getCompanyInfo();
        $error = $dataService-&gt;getLastError();
  
      if ($error != null) {
          echo "The Status code is: " . $error-&gt;getHttpStatusCode() . "\n";
          echo "The Helper message is: " . $error-&gt;getOAuthHelperError() . "\n";
          echo "The Response message is: " . $error-&gt;getResponseBody() . "\n";
          echo "The Intuit Helper message is: IntuitErrorType:{" . $error-&gt;getIntuitErrorType() . "} IntuitErrorCode:{" . $error-&gt;getIntuitErrorCode() . "} IntuitErrorMessage:{" . $error-&gt;getIntuitErrorMessage() . "} IntuitErrorDetail:{" . $error-&gt;getIntuitErrorDetail() . "}";
      } 
  
     }
  </code></pre>
  
  <p>I also saw the curl function</p>
  
  <pre><code>private function setSSL(&amp;$curl_opt, $verifySSL){
        if($verifySSL){
            $curl_opt[CURLOPT_SSL_VERIFYPEER] = true;
            $curl_opt[CURLOPT_SSL_VERIFYHOST] = 2;
            $curl_opt[CURLOPT_CAINFO] = dirname(dirname(__FILE__)) . "/OAuth/OAuth2/certs/apiintuitcom.pem"; //Pem certification Key Path
       }
      }
  </code></pre>
  
  <p>tried to replace </p>
  
  <pre><code>$curl_opt[CURLOPT_CAINFO] = dirname(dirname(__FILE__)) . "/OAuth/OAuth2/certs/apiintuitcom.pem";
  
  to `$curl_opt[CURLOPT_CAINFO] ="/home/servername/public_html/quickbooks_app/resources/cert/cacert.pem";` 
  </code></pre>
  
  <p>but I get this error 
      Http Status Code:[401] Http Response Body are null or Empty.</p>
  
  <p>What should I do to fix this please..</p>