PHP code example of cubits / cubits-php

1. Go to this page and download the library: Download cubits/cubits-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cubits / cubits-php example snippets


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

$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"
        ));

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

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

$response = $cubits->listAccounts();

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

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

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

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

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

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

composer