PHP code example of vizad / intuit

1. Go to this page and download the library: Download vizad/intuit library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

vizad / intuit example snippets



define('QB_CUSTOMER_ID', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
define('QB_CUSTOMER_SECRET', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');


$intuitClient = new Vizad\Intuit([
            'identifier'   => QB_CUSTOMER_ID,
            'secret'       => QB_CUSTOMER_SECRET,
            'callback_uri' => "CALLBACK_URI",
            'sandboxMode' => true
        ]);

$temporaryCredentials = $intuitClient->getTemporaryCredentials();
$_SESSION['temporary_credentials'] = serialize($temporaryCredentials);
$authurl = $intuitClient->getAuthorizationUrl($temporaryCredentials);

echo "<a href='".$authurl."'>Connect to Quickbooks Account</a>";