PHP code example of cubepay / cubepay-api-library

1. Go to this page and download the library: Download cubepay/cubepay-api-library 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/ */

    

cubepay / cubepay-api-library example snippets


$ php composer.phar 

$response = $cubepay->getCoin();

$response = $cubepay->getFiat();

$response = $cubepay->doPayment($sourceCoinId, $sourceAmount, $itemName, $merchantTransactionId, $other = null, $returnUrl = null, $ipnUrl = null, $sendCoinId = null, $sendAmount = null, $receiveAddress = null);

$response = $cubepay->doPaymentByCoinId($coinId, $sourceCoinId, $sourceAmount, $itemName, $merchantTransactionId, $other = null, $returnUrl = null, $ipnUrl = null, $sendCoinId = null, $sendAmount = null, $receiveAddress = null);

$response = $cubepay->queryPayment($id = null, $merchantTransactionId = null);