承接 yani/coinbase 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

yani/coinbase

最新稳定版本:2.0

Composer 安装命令:

composer require yani/coinbase

包简介

A simple Laravel 4 package for processing bitcoin payments via Coinbase

README 文档

README

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

统计信息

  • 总下载量: 118
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2015-08-30