2017 © Pedro Peláez
 

library guzzle-bitpay

Guzzle client for Bitpay API

image

symm/guzzle-bitpay

Guzzle client for Bitpay API

  • Saturday, July 19, 2014
  • by symm
  • Repository
  • 2 Watchers
  • 5 Stars
  • 487 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

BitPay Client for PHP

Build Status Code Coverage Scrutinizer Quality Score Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Add BitPay payment processing support to your PHP application using the BitPay API and Guzzle, (*2)

Installation

Require the library in your composer.json file:, (*3)

``` json { "require": { "symm/guzzle-bitpay": "~1.0" } }, (*4)


## Usage ### Create a client ``` php use Symm\BitpayClient\BitpayClient; $client = BitpayClient::createClient('YOUR_API_KEY_HERE');

Create a Test Environment Client

A client which communicates with the Test Environment, (*5)

use Symm\BitpayClient\BitpayClient;

$client = BitpayClient::createTestClient('YOUR_TEST_API_KEY_HERE');

Create a new invoice

``` php $invoice = $client->createInvoice( array( 'price' => 5, 'currency' => 'GBP', ) );, (*6)

print $invoice->getUrl() . PHP_EOL;, (*7)


### Receive an existing invoice ``` php $invoice = $client->getInvoice( array( 'id' => 'YOUR_INVOICE_ID_HERE' ) ); print $invoice->getStatus() . PHP_EOL;

Verify BitPay Notification

``` php $invoice = $client->verifyNotification(file_get_contents("php://input"));, (*8)


### Get exchange rates ``` php $currencyCollection = $client->getRates(); foreach ($currencyCollection as $currency) { /** @var \Symm\BitpayClient\Model\Currency $currency */ print $currency->getCode() . ': ' . $currency->getRate(); }

Localise Invoice page

``` php use Symm\BitpayClient\Localisation\Language;, (*9)

print $invoice->getUrl(Language::SPANISH) ```, (*10)

Resources

Guzzle Documentation, (*11)

Official API Documentation, (*12)

Code copyright Gareth Jones and released under the MIT license., (*13)

The Versions

19/07 2014

dev-master

9999999-dev

Guzzle client for Bitpay API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Gareth Jones

05/07 2014

v1.1.2

1.1.2.0

Guzzle client for Bitpay API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Gareth Jones

29/05 2014

v1.1.1

1.1.1.0

Guzzle client for Bitpay API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Gareth Jones

12/03 2014

v1.1.0

1.1.0.0

Guzzle client for Bitpay API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Gareth Jones

16/02 2014

v1.0.0

1.0.0.0

Guzzle client for Bitpay API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Gareth Jones

15/02 2014

v0.2.1

0.2.1.0

Guzzle client for Bitpay API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Gareth Jones

14/02 2014

v0.1.1

0.1.1.0

Guzzle client for Bitpay API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Gareth Jones