定制 mateodioev/coinbase-commerce 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

mateodioev/coinbase-commerce

最新稳定版本:v1.3

Composer 安装命令:

composer require mateodioev/coinbase-commerce

包简介

Coinbase commerce api

README 文档

README

Install

composer require mateodioev/coinbase-commerce

Add your api key

use Mateodioev\CoinbaseCommerce\Client;

Client::init($your_api_key);

Contents

Charges

use Mateodioev\CoinbaseCommerce\Charges;
$charges = new Charges;

List charges

$charges->list();

Create charge

$chargeData = [
  'name'         => 'Charge name',
  'description'  => 'My description',
  'pricing_type' => 'fixed_price',
  'local_price'  => [
    'amount'   => '10.00',
    'currency' => 'USD'
  ],
  'metadata'     => [
    'user_id' => '123456789'
  ]
];
$charges->create($chargeData);

Show a charge

$charges->show($chargeId);

Cancel a charge

$charges->cancel($chargeId);

Resolve a charge

$charges->resolve($chargeId);

Checkouts

use Mateodioev\CoinbaseCommerce\Checkouts;
$checkouts = new Checkouts;

List checkouts

$checkouts->list();

Create a checkout

$checkoutData = [
  'name'         => 'The Sovereign Individual',
  'description'  => 'Mastering the Transition to the Information Age',
  'pricing_type' => 'fixed_price',
  'local_price'  => [
    'amount'   => '100.00',
    'currency' => 'USD'
  ],
  'requested_info' => ['name', 'email']
];
$checkouts->create($checkoutData);

Show a checkout

$checkouts->show($id);

Update a checkout

$checkoutData = [
    'name' => 'New name'
];
$checkouts->update($checkoutId, $checkoutData);

Delete a checkout

$checkouts->delete($checkoutId);

Invoices

use Mateodioev\CoinbaseCommerce\Invoices;
$invoices = new Invoices;

List invoices

$invoices->list();

Create an invoice

$invoiceData = [
  'business_name' => 'Crypto Payment\'s',
  'customer_email' => 'customer@test.com',
  'customer_name' => 'Test customer',
  'local_price' => [
    'amount'   => 10.00,
    'currency' => 'USD'
  ]
];
$invoices->create($invoiceData);

Show an invoice

$invoices->show($id);

Void an invoice

$invoices->void($id);

Resolve an invoice

$invoices->resolve($id);

Events

use Mateodioev\CoinbaseCommerce\Events;
$events = new Events;

List events

$events->list();

Show an event

$events->show($id);

Coinbase doc's

See coinbase-commerce docs

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固