-
Notifications
You must be signed in to change notification settings - Fork 1
/
process.php
27 lines (22 loc) · 926 Bytes
/
process.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
require_once 'configuration.php'; // Configuration constants
require_once 'classes/MyQuickBooksIntegration.php'; // Custom MyQuickBooksIntegration class
// Require the library code
require_once 'quickbooks-php/QuickBooks.php';
$parameters = array
(
'dsn' => DSN,
'encryption_key' => ENCRYPTION_KEY,
'oauth_consumer_key' => OAUTH_CONSUMER_KEY,
'oauth_consumer_secret' => OAUTH_CONSUMER_SECRET,
'quickbooks_oauth_url' => OAUTH_URL,
'quickbooks_success_url' => SUCCESS_URL,
'username' => APP_USERNAME,
'tenant' => APP_TOKEN
);
$qb = new MyQuickBooksIntegration($parameters);
$invoices = $qb->getInvoices('2015-01-22');
//$invoices = $qb->getInvoices(); // no date can also be called
//$invoices = $qb->getInvoices('', 1, 25); // second example with no date (retrieves the last 25 records)
echo '<pre>';
print_r($invoices);