# === Warning === This is the old BitPay based PHP client and should be considered deprecated (even though it currently still works). If you are building something from scratch, [use the new Greenfield API](https://github.com/btcpayserver/btcpayserver-greenfield-php). bitpay/php-bitpay-client ================= [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://raw.githubusercontent.com/bitpay/php-bitpay-client/master/LICENSE.md) [![Travis](https://img.shields.io/travis/bitpay/php-bitpay-client.svg?style=flat-square)](https://travis-ci.org/bitpay/php-bitpay-client) [![Packagist](https://img.shields.io/packagist/v/bitpay/php-client.svg?style=flat-square)](https://packagist.org/packages/bitpay/php-client) [![Code Climate](https://img.shields.io/codeclimate/github/bitpay/php-bitpay-client.svg?style=flat-square)](https://codeclimate.com/github/bitpay/php-bitpay-client) [![Scrutinizer](https://img.shields.io/scrutinizer/g/bitpay/php-bitpay-client.svg?style=flat-square)](https://scrutinizer-ci.com/g/bitpay/php-bitpay-client/) [![Coveralls](https://img.shields.io/coveralls/bitpay/php-bitpay-client.svg?style=flat-square)](https://coveralls.io/r/bitpay/php-bitpay-client) [![Documentation Status](https://readthedocs.org/projects/php-bitpay-client/badge/?version=latest)](https://readthedocs.org/projects/php-bitpay-client/?badge=latest) [![Total Downloads](https://poser.pugx.org/bitpay/php-client/downloads.svg)](https://packagist.org/packages/bitpay/php-client) [![Latest Unstable Version](https://poser.pugx.org/bitpay/php-client/v/unstable.svg)](https://packagist.org/packages/bitpay/php-client) This is a self-contained PHP implementation of BitPay's new cryptographically secure API: https://bitpay.com/api # Installation ## Composer ### Install Composer ```bash curl -sS https://getcomposer.org/installer | php ``` ### Install via composer by hand Add to your composer.json file by hand. ```javascript { ... "require": { ... "bitpay/php-client": "dev-master" }, "repositories": [ ... { "type": "vcs", "url": "https://github.com/btcpayserver/php-bitpay-client" } ], ... } ``` Once you have added this, just run: ```bash php composer.phar update bitpay/php-client ``` ### Install using composer ```bash php composer.phar require bitpay/php-client:~2.2 ``` # Configuration See https://support.bitpay.com/hc/en-us/articles/115003001063-How-do-I-configure-the-PHP-BitPay-Client-Library- # Usage ## Autoloader To use the library's autoloader (which doesn't include composer dependencies) instead of composer's autoloader, use the following code: ```php