Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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).

like image 815
Joel Leger Avatar asked Mar 17 '23 11:03

Joel Leger


2 Answers

If you're using this code:

  • https://github.com/consolibyte/quickbooks-php

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.

like image 69
Keith Palmer Jr. Avatar answered Mar 22 '23 23:03

Keith Palmer Jr.


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!

like image 34
Captain Hypertext Avatar answered Mar 23 '23 00:03

Captain Hypertext