Search code examples
oauthcomposer-phpquickbooks-onlinepecl

QuickBooks Online SDK - PECL OAuth / Composer


I'm in the middle of integrating QB Online and the documentation says it requires PECL OAuth at: http://pecl.php.net/package/oauth

I'm not too familiar with using OAuth itself, or how PECL works. I've just been using Composer mostly. So on that note, is there a way for me to install the required OAuth using Composer?


Solution

  • PECL are extensions, written in C, for PHP. They add functions/methods to the PHP language.

    There's no way to install PECL extensions via Composer right now, however, the pickle project aims to fix that someday soon:

    https://github.com/FriendsOfPHP/pickle

    Generally, you'd install PECL extensions via your OS package manager. e.g. in Debian:

    sudo apt-get install php-pear
    sudo pecl install oauth
    

    More info:

    http://php.net/manual/en/install.pecl.php

    If you get stuck, and need a QuickBooks Online PHP lib that doesn't rely on the PECL extension, you might try this one (disclaimer - I'm the author):

    http://github.com/consolibyte/quickbooks-php