Download the PHP package digfish/ivx-api2-php without Composer
On this page you can find all versions of the php package digfish/ivx-api2-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download digfish/ivx-api2-php
More information about digfish/ivx-api2-php
Files in digfish/ivx-api2-php
Package ivx-api2-php
Short Description PHP client implementation of InvoiceXpress API using new json-based API 2.0
License MIT
Informations about the package ivx-api2-php
The InvoiceXpress API PHP client, now ready for the new 2.0 API.
Is no more than a simple PHP wrapper for making requests with the InvoiceXpress API. It's a fork of the original WidgiLabs/InvoiceXpressRequest-PHP-API, coded by nunomorgadinho.
Made compatible with the new API version 2.0 that now natively responds with JSON format.
This code can be perhaps very low level to the impatient, if you feel that after taking a look at it, and you are a fan of Laravel, as I am too, I would recommend to you as an alternative to take a look at the invoicexpress-api by rpsimao.
If you intend to use this code in a project of yours, I show below some examples on how can be used.
With the following class, which extends the class in InvoiceXpressRequest.php :
You should already have assigned values to the and . If, for example you are using myFirm as the name for your company you should use that name. The is the API Key you can obtain at the InvoiceXpress backoffice in Account >> Integrations >> API .
You can then assign to them:
You can put these two lines on a separate file with the adequate permissions to not be world-readable and include it in the header of the file of the example code above.
Then, to invoke your new class to get data, like listing invoices, you can do:
is an associative PHP array with the parameters you pass to the API like for example the page number:
The API response should be in the variable, which contains a PHP array with the invoice data.
Some things are not implemented
Only the methods to list and manipulate Invoices, Clients and access the Invoice Items are available. Methods that use other things like Estimates, Guides, Purchase Orders, Sequences, Taxes and Accounts were not implemented (yet). Some methods that require that the args are passed through JSON as request (and don't use HTTP GET method) to the API server are still to be implemented.
Implementation project
Have a look at the ivxapi project, which provides a example case of use of this library, along with unitary tests.