Download the PHP package paylike/php-api without Composer
On this page you can find all versions of the php package paylike/php-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download paylike/php-api
More information about paylike/php-api
Files in paylike/php-api
Package php-api
Short Description PHP SDK to communicate with the Paylike HTTP API
License MIT
Informations about the package php-api
THIS SDK HAS BEEN DISCONTINUED
Paylike client (PHP)
You can sign up for a Paylike account at https://paylike.io.
Getting an API key
An API key can be obtained by creating a merchant and adding an app through Paylike dashboard.
Requirements
PHP 5.3.3 and later.
Install
You can install the package via Composer. Run the following command:
If you don't use Composer, you can download the latest release and include the init.php
file.
Dependencies
The bindings require the following extension in order to work properly:
If you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that these extensions are available.
If you don't want to use curl, you can create your own client to extend from HttpClientInterface
and send that as a parameter when instantiating the Paylike
class.
Example
Methods
Pagination
The methods that return multiple merchants/transactions (find,after,before) use cursors, so you don't need to worry about pagination, you can access any index, or iterate all the items, this is handled in the background.
Error handling
The api wrapper will throw errors when things do not fly. All errors inherit from
ApiException
. A very verbose example of catching all types of errors:
In most cases catching NotFound
and InvalidRequest
as client errors
and logging ApiException
would suffice.
Development
Install dependencies:
Tests
Install dependencies as mentioned above (which will resolve PHPUnit), then you can run the test suite:
All versions of php-api with dependencies
ext-curl Version *