PHP code example of rangka / quickbooks
1. Go to this page and download the library: Download rangka/quickbooks 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/ */
rangka / quickbooks example snippets
\Rangka\Quickbooks\Client::configure([
'client_id' => 'CLIENT_ID',
'client_secret' => 'CLIENT_SECRET',
'sandbox' => true, // or `false`
'oauth' => $_SESSION['OAUTH'],
'realm_id' => $_SESSION['REALM_ID'],
]);
$service = new \Rangka\Quickbooks\Services\Invoice;
$response = $service->load($id);
$service = new \Rangka\Quickbooks\Services\Invoice;
$response = $service->delete($id);
$service = new \Rangka\Quickbooks\Services\Invoice;
$builder = $service->getBuilder();
$id = 566; // Required
$files = [
[
'path' => '/path/to/file', // Required
'type' => 'image/png' // Optional
'name' => 'filename.png' // Optional
]
];
$
$service = new \Rangka\Quickbooks\Services\Attachable;
$builder = $service->getBuilder();
// This is name' => 'filename.png' // Optional
];
// This is optional
$entities = [
[
'entity' => 'Invoice',
'id' => 566,
'
$service = new \Rangka\Quickbooks\Services\Invoice;
$service->downloadPdf($invoiceID);