PHP code example of roseblade / quickfile-php-sdk

1. Go to this page and download the library: Download roseblade/quickfile-php-sdk 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/ */

    

roseblade / quickfile-php-sdk example snippets






$creds  = [
    'AccountNumber' => 6131400000,
    'APIKey'        => '000AA000-AAAA-0000-A',
    'ApplicationID' => '00000000-AAAA-AAAA-AAAA-00AA00AA00AA'
];
\QuickFile\QuickFile::config($creds);

\QuickFile\QuickFile::setAccountNumber($creds['AccountNumber']);
\QuickFile\QuickFile::setAPIKey($creds['APIKey']);
\QuickFile\QuickFile::setApplicationID($creds['ApplicationID']);

\QuickFile\Client::search([
    // Search Data
]);

\QuickFile\Invoice::create([
    // Invoice Data
]);

$creds  = [
    'AccountNumber' => 6131400000,
    'Token'         => 'ABCD1234',
    'ProductKey'    => '00000000-AAAA-AAAA-AAAA-00AA00AA00AA',
    'SecretKey'     => '00000000-AAAA-AAAA-AAAA-00AA00AA00AA'
];
\QuickFile\Partner::config($creds);

\QuickFile\Partner::setAccountNumber($creds['AccountNumber']);
\QuickFile\Partner::setToken($creds['Token']);
\QuickFile\Partner::setProductKey($creds['ProductKey']);
\QuickFile\Partner::setSecretKey($creds['SecretKey']);

\QuickFile\Partner::authenticate();

// Or, specify the returnArray and verifyProduct
// Example below is the default - verify the product and return a bool (rather than array)

\QuickFile\Partner::authenticate(true, false);

// Or be fancy with names variables

\QuickFile\Partner::authenticate(returnArray: true, verifyProduct: false);

\QuickFile\Partner::setupConfig();
\QuickFile\Invoice::get([
    'InvoiceID' => 123456
]);
bash
composer