yani/coinbase

A simple Laravel 4 package for processing bitcoin payments via Coinbase
118 3
Install
composer require yani/coinbase
Latest Version:2.0
PHP:>=5.5.0
License:BSD-2-Clause
Last Updated:Oct 18, 2017
Links: GitHub  ·  Packagist
Maintainer: yani-

Coinbase

Build Status Scrutinizer Code Quality Latest Stable Version Total Downloads

A simple Laravel package for processing payments via Coinbase

Requirements

  • PHP 5.4 or greater
  • Laravel 4.1 or greater

Installation

You can install the package using the Composer package manager. Assuming you have Composer installed globally:

composer require yani/coinbase:0.*

Service provider and alias

Next, add the Yani\Coinbase\CoinbaseServiceProvider service provider to the providers array in your app/config.php file.

'providers' => array(
  ...
  'Yani\Coinbase\CoinbaseServiceProvider',
),

and then add the facade to your aliases array in your app/config.php file.

'aliases' => array(
  ...
  'Coinbase' => 'Yani\Coinbase\Facades\Coinbase',
),

Configuration

Publish the configuration with

php artisan config:publish yani/coinbase

This will add the boilerplate configuration to app/config/packages/yani/coinbase/config.php.

Usage

$amount   = 100;
$currency = 'USD';
$name     = 'Order #1';
try
{
	$checkout = Coinbase::createCheckout($amount, $currency, $name);
	echo $checkout->id;         // ffc93ba1-874d-5c55-853c-53c9c4814b1e
	echo $checkout->embed_code; // af0b52802ad7b36806e307b2d294e3b4
	// You can find a full list of the response here: https://developers.coinbase.com/api/v2#create-checkout
}
catch (CoinbaseCheckoutException $e)
{
	echo "The order failed because: " . $e->getMessage();
}

License

MIT

Related Packages

gustavtrenwith/coinbase_connector

A Connector package to handle the handshake during the OAuth2 part of the Coinba...

34 0
socialiteproviders/coinbase

Coinbase OAuth2 Provider for Laravel Socialite

20,997 4
php-tmdb/laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the...

53,312 160
kavenegar/laravel

laravel 4 and 5 kavenegar integration

366,462 86
laravel-ja/laravel

The Laravel Framework.

5,667 17