dev-master
9999999-dev https://github.com/sdavis1902/quickbooksonline-php
MIT
The Requires
The Development Requires
by Scott D
quickbooks sdavis1902 qbophp quickbooksonlinephp quickbooksonline
Wallogit.com
2017 © Pedro Peláez
![Software License][ico-license]
![Total Downloads][ico-downloads], (*1)
This is a php package for Intuits QuickBooks Online api. It can also handle the all the OAuth stuff., (*2)
This package is still under development. So far the OAuth stuff is complete and a few api calls. It is just using guzzle to do the rest api calls, so is pretty simple to create more calls, just a matter of finding the time. I will wait until most of the calls are abailable before I make a release., (*3)
Via Composer, (*4)
``` bash $ composer require sdavis1902/quickbooksonline-php, (*5)
As there is not yet a stable release, you will probably need to specify the version. ## Usage ``` php // Start OAuth, will be redirected to qbo to sign in $auth = new \sdavis1902\QboPhp\Auth($identifier, $secret, $callback_url); $auth->connect(); // put this on your callback page to handle the return from qbo $auth = new \sdavis1902\QboPhp\Auth($identifier, $secret, $callback_url); $auth->handleCallback(); // to check if your still connect ( is still incomplete ) $auth->check(); // do a call $customer = new \sdavis1902\QboPhp\Customer($identifier, $secret, $callback_url); $result = $customer->find(2); // search $results = $customer->select(['Id', 'GivenName'])->order('id', 'desc')->limit(2)->start(10)->get(); $results = $customer->where('GivenName', '=', 'Bill')->where('FamilyName', '=', 'Lucchini')->first(); // update $result = $customer->update([ 'Id' => 5, 'GivenName' => 'Billy', 'FamilyName' => 'Guy' ]); // get the user whos account we are managing $qbo = new \sdavis1902\QboPhp\qbo($identifier, $secret, $callback_url); $user = $qbo->getUser(); // alternatly, you can make an object of Qbo class and call other classes through it like this $qbo = new \sdavis1902\QboPhp\qbo($identifier, $secret, $callback_url); $qbo->Auth()->connect(); $qbo->Customer()->find(2); // the Qbo class, if it can not find the method you call, // it will look for a class in the same namespace instead and create an object if it finds one
Laravel 5, (*6)
Add Service Provider and Alias, (*7)
``` php 'providers' => [ ... sdavis1902\QboPhp\Laravel\QboServiceProvider::class, ],, (*8)
``` php 'aliases' => [ ... 'Qbo' => sdavis1902\QboPhp\Laravel\Facades\Qbo::class, ],
Add the following to your .env file, (*9)
``` php QBO_IDENTIFIER=identifier QBO_SECRET=secret QBO_CALLBACK_URL=http://someurl, (*10)
You can now make the same calls through the Qbo class ``` php Qbo::Auth()->connect(); Qbo::Customer()->find(1);
Please see CONTRIBUTING and CONDUCT for details., (*11)
The MIT License (MIT). Please see License File for more information., (*12)
MIT
quickbooks sdavis1902 qbophp quickbooksonlinephp quickbooksonline