blackoptic/xerobundle
Symfony bundle that wraps the Xero API with a Guzzle-based client. Configure your Xero consumer key/secret and private key, then fetch resources like Invoices via the blackoptic.xero.client service for simple authenticated requests.
XeroBundle makes it easy to communicate with the Xero api using the Guzzle library
Add the following to your composer.json file
"require": {
...
"blackoptic/xerobundle": "*"
...
}
Run php composer.phar update "blackoptic/xerobundle"
Register the bundle in your app/AppKernel.php:
<?php
...
public function registerBundles()
{
$bundles = array(
...
new BlackOptic\Bundle\XeroBundle\BlackOpticXeroBundle(),
...
);
...
Add the config for your account details:
black_optic_xero:
consumer_key: <Your Consumer Key>
consumer_secret: <Your Consumer Secret>
private_key: <Path to you private key>
Request and use the service:
$xeroClient = $this->get('blackoptic.xero.client');
$response = $xeroClient->get('Invoices')->send();
How can I help you explore Laravel packages today?