PHP code example of stephenjude / blochq-php-sdk

1. Go to this page and download the library: Download stephenjude/blochq-php-sdk 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/ */

    

stephenjude / blochq-php-sdk example snippets


$blocHQ = new \Stephenjude\BlocHqPhpSdk\BlocHQ(TOKEN_HERE);

$blocHQ->createCollectionAccount();
 
$account = $blocHQ->getAccountByAccountNumber(ACCOUNT_NUMBER);

$account = $blocHQ->getAccountById(ID);

$account->freeze();
$account->unfreeze();

$account->close();
$account->reopen();

$account->credit(AMOUNT); // Simulation endpoint
$account->debit(AMOUNT); // Simulation endpoint

$blocHQ->transferFromOrgBalance(AMOUNT, ACCOUNT_NUMBER, BANK_CODE, NARRATION, [META_DATA]);

$blocHQ->getAllTransactions();
$blocHQ->getTransactionById(TRANSACTION_ID);
$blocHQ->getTransactionByReference(TRANSACTION_REFERENCE);

$blocHQ->getBankList();
$blocHQ->resolveBankAccount(ACCOUNT_NUMBER, BANK_CODE);
bash
composer