Joel Leger
Joel Leger

Reputation: 347

Laravel 5 and Quickbooks

I'm trying to integrate the Quickbooks Online API into Laravel 5. I've got the code working outside of Laravel using the Consolibyte package. But its written in what I'll call a classic PHP style - meaning there are a number of REQUIRE_ONCE files etc. I'm sure I can crank through and integrate it all, but in the interest of saving time, I'm wondering if anyone else knows of a package for Laravel 5 which already does this?

Ultimately I need to be able to create Customers, Vendors and Invoices. Don't really need the rest of the functionality that the Consolibyte package uses (which is a great package by the way).

Upvotes: 4

Views: 4865

Answers (3)

Imran Khan
Imran Khan

Reputation: 358

You can use this one instead its fully enabled to be installed by composer in Laravel or Yii2. I installed it in Yii2. https://github.com/beanworks/quickbooks-online-v3-sdk install quickbooks from this url and then use the below url to implement oauth https://github.com/IntuitDeveloper/oauth-php

You can easily make routes for oauth steps involved and there are samples in the later repo which can be used to learn how to post and query objects from quickbook.

Upvotes: 1

Captain Hypertext
Captain Hypertext

Reputation: 2506

For anyone else looking to solve this problem, this obscure blog post will save your life. It's a lot to post here, but he essentially uses the consolibyte/quickbooks-php, but wraps it up in creamy Laravel goodness so you can see the "under the hood" objects you need to set up so that you don't break the framework.

I followed the instructions, with some alterations for my app, and it authorized first try (Laravel 5.2).

It's not perfect, but it's as clean as you can get for Laravel right now.

Major props to both the article writer Pawan and the package author Keith Palmer Jr!

Upvotes: 3

Keith Palmer Jr.
Keith Palmer Jr.

Reputation: 28002

If you're using this code:

You only need to require one file. There's no real work required to get this working in Laravel. Just do this in your Laravel app:

require_once './QuickBooks.php';

And you're done.

Upvotes: 3

Related Questions