Download the PHP package peterfox/bitpayclient without Composer
On this page you can find all versions of the php package peterfox/bitpayclient. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download peterfox/bitpayclient
More information about peterfox/bitpayclient
Files in peterfox/bitpayclient
Package bitpayclient
Short Description The purpose of this library is to be an object orientated alternative to the official BitPay PHP library. The library is designed to make it easier to integrate BitPay in to more heavy PHP frameworks that use composer as a package manager such as Symfony2 and Laravel.
License GPL-3.0
Informations about the package bitpayclient
BitPayClient
The purpose of this library is to be an object orientated alternative to the official BitPay PHP library.
The library is designed to make it easier to integrate BitPay in to more heavy PHP frameworks that use composer as a package manager such as Symfony2 and Laravel.
The library is written by myself, Peter Fox.
Version
1.1.0 - 16th March 2014 - Allows for throwing exception when an error api response is returned 1.0.0 - 5th Feburary 2014
Installation
Add to your projects composer.json
Then run composer install or composer update to install this package.
Usage
The most basic use is as follows:
You can supply further parameters for creating an invoice via a third array parameter (to see all possible parameters read the BitPay API):
You can also supply a PosData value as an array and it will be sent as a Base64 encoded string (please note that other data will be modified to be base64 as well):
The library also allows for making responses from Array (like from a $_POST):
There's also the functionality of getting an invoice from BitPay's API if you so wish:
Testing
After cloning and installing this repo you can run /vendor/bin/phpunit in the root of the project and test it.
You will have to create a file called apikey.txt in the root directory of the project containing your api to actually run these tests.
The testing of this project uses PHP-VCR which is useful for running the tests multiple times as testCreateInvoice_LimitExceeded() test will cause BitPay to send you an email as a warning which can be a bit tedious. The fixtures are all stored in test/fixtures/.
License
GNU GPL Version 3