2017 © Pedro Peláez
 

library cubits-php

Cubits PHP Client Library

image

cubits/cubits-php

Cubits PHP Client Library

  • Monday, July 16, 2018
  • by uLow
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Cubits PHP Client Library

An easy way to buy, send, and accept bitcoin through the Cubits API., (*1)

This library supports API key authentication method, (*2)

Installation

composer require cubits/cubits-php

Usage

Start by enabling an API Key on your account., (*3)

Next, configure the Cubits library via Cubits::configure method and create an instance of the client using the Cubits::withApiKey method:, (*4)

 Cubits::configure("https://pay.cubits.com/api/v1/",true);
 $cubits = Cubits::withApiKey($_ENV['Cubits_API_KEY'], $_ENV['Cubits_API_SECRET'])

Examples

Create an Invoice

$response = $cubits->createInvoice("EUR", "42.95", "Your Order #1234", array(
            "description" => "1 widget at EUR 42.95",
            "reference" =>  "my custom tracking code for this order"
        ));

Get an Invoice

$response = $cubits->getInvoice("ef73a6ed61a8c97427eaae2073b9127b");

Send Money

$response = $cubits->sendMoney("3Pj4mJfK62n9mjMRcHYs96nd15UQLHHhPS","0.25120521");

List Accounts

$response = $cubits->listAccounts();

Request Quote

$response = $cubits->requestQuote("buy","EUR","10","BTC");

Buy

$response = $cubits->buy("EUR","10");

Sell

$response = $cubits->sell("0.150","EUR");

createChannel

$response =  $cubits->createChannel("EUR");

getChannel

  $cubits->getChannel("7ff31a5843887cbaffb9adb3fcb2aebd");

updateChannel

$response = $cubits->updateChannel("7ff31a5843887cbaffb9adb3fcb2aebd", "EUR", "Alpaca underwear");

Security notes

If someone gains access to your API Key they will have complete control of your Cubits account. This includes the abillity to send all of your bitcoins elsewhere., (*5)

For this reason, API access is disabled on all Cubits accounts by default. If you decide to enable API key access you should take precautions to store your API key securely in your application. How to do this is application specific, but it's something you should research if you have never done this before., (*6)

The Versions

16/07 2018

dev-master

9999999-dev

Cubits PHP Client Library

  Sources   Download

The Development Requires

13/06 2018

1.0.1

1.0.1.0

Cubits PHP Client Library

  Sources   Download

The Development Requires

13/06 2018

1.0.0

1.0.0.0

Cubits PHP Client Library

  Sources   Download

The Development Requires

20/02 2017

dev-0.1-dev

dev-0.1-dev

A client library for the Cubits API on https://cubits.com

  Sources   Download

MIT

The Requires

 

by Hannes Schulz

api client bitcoin cubits