Download the PHP package sescandell/bitpay-client without Composer
On this page you can find all versions of the php package sescandell/bitpay-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sescandell/bitpay-client
More information about sescandell/bitpay-client
Files in sescandell/bitpay-client
Informations about the package bitpay-client
BitPay Library for PHP
Powerful, flexible, lightweight interface to the BitPay Bitcoin Payment Gateway API.
Installing via Composer
The recommended way to install the BitPay PHP Client is through Composer.
After installing, you need to require Composer's autoloader:
The library requires PHP 5.3+ and is PSR-0 compatible.
Basic Usage
To create an invoice:
With invoice creation, orderID
and currency
are the only required fields. If you are sending a customer from your website to make a purchase, setting redirectURL
on BitPay constructor options is required.
Response will be an object with information on your newly created invoice. Send your customer to the url
to complete payment:
There are many options available when creating invoices, which are listed in the BitPay API documentation.
To get updated information on this invoice, make a get call with the ID returned:
Options
When you instantiate BitPay you can pass options as a fourth argument. You can also set this options dinamically with setOptions()
.
Please look carefully through these options and adjust according to your installation.
Option | Default | Description |
---|---|---|
verifyPost | true |
Whether to verify POS data by hashing above api key. If set to false, you should have some way of verifying that callback data comes from bitpay.com. |
notificationEmail | '' |
Email where invoice update notifications should be sent. |
notificationURL | '' |
URL where bit-pay server should send update notifications. See API doc for more details. |
redirectURL | '' |
URL where the customer should be directed to after paying for the order. |
currency | 'BTC' |
This is the currency used for the price setting. A list of other pricing currencies supported is found at bitpay.com |
physical | true |
Indicates whether anything is to be shipped with the order (if false, the buyer will be informed that nothing is to be shipped) |
fullNotifications | true |
If set to false, then notificaitions are only sent when an invoice is confirmed (according the the transactionSpeed setting). If set to true, then a notification will be sent on every status change. |
transactionSpeed | 'low' |
Transaction speed: low/medium/high. See API docs for more details. |
API Documentation
API Documentation is available on the BitPay site.
Running the Tests
In addition to a full test suite, there is Travis integration.
Found a bug?
Let us know! Send a pull request or a patch. Questions? Ask! We're here to help. We will respond to all filed issues.
Authors
- Fede Isas
- Escandell Stéphane
All versions of bitpay-client with dependencies
ext-curl Version *