QuickBooks-V3-PHP-SDK: (1/1) SdkException cURL error during making API call. cURL Error Number:[60] with error:[SSL certificate problem: self signed certificate in certificate chain]

Good day I just installed the library on laravel using composer and deployed it on my https server.

I just copy pasted the example for Oauth2:

use QuickBooksOnline\API\DataService\DataService;

$dataService = DataService::Configure(array(
         'auth_mode' => 'oauth2',
         'ClientID' => "Q0XG3aA8zb7WQbKURFRISkt3QrWJxgWGS1jRF2l3nYtM6dOw2h",
         'ClientSecret' => "34z5qBRskA161AaKDadGAiY4ojz8TXX9RsSfu0E1",
         'accessTokenKey' => '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' => "L011509163184Q0K7DT40SVXhJXAfyoj6B6EbSr3Ty64yVvF5A",
         'QBORealmID' => "123145862616089",
         'baseUrl' => "https://sandbox-quickbooks.api.intuit.com"
        ));
        $dataService->setMinorVersion("9");
        $dataService->disableLog();

        $CompanyInfo = $dataService->getCompanyInfo();
        $error = $dataService->getLastError();
        if ($error != null) {
            echo "The Status code is: " . $error->getHttpStatusCode() . "\n";
            echo "The Helper message is: " . $error->getOAuthHelperError() . "\n";
            echo "The Response message is: " . $error->getResponseBody() . "\n";
            echo "The Intuit Helper message is: IntuitErrorType:{" . $error->getIntuitErrorType() . "} IntuitErrorCode:{" . $error->getIntuitErrorCode() . "} IntuitErrorMessage:{" . $error->getIntuitErrorMessage() . "} IntuitErrorDetail:{" . $error->getIntuitErrorDetail() . "}";
        } 

I just also installed SSL on my server too…

how do I fix this please.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 19 (3 by maintainers)

Commits related to this issue

Most upvoted comments

@all

Sorry, I didn’t think about the case for using the root Certificate from the Server. I will update the code with it accordingly. Please see the next release.

Best, Hao

Are you sure the baseURL is right? The sandbox baseURL was the final problem I needed to solve after the above issue with certs to get connected. In some of the example code it is outdated. I updated the base to this “https://sandbox-quickbooks.api.intuit.com” and it worked, now I am connected and make API calls (both oauth 2 and 1)

@m3Lvs oh awesome. I’ll deff take a look into it! Lets keep in touch!

@m3Lvs @josephmancuso It will be available next Monday.

Hao

@josephmancuso got it now… I just need to click ‘get token’ button 😄 I thought I need to proceed to step 3, got me confused for a while… anyways… I think we are on the same page now… needs to automate refresh token so that the user wont need to go on the steps everytime…

is this possible @hlu2 ? if so… can you please point out where to start? thanks!