PHP code example of jesobreira / bankly

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

    

jesobreira / bankly example snippets


use BanklyPHP\Bankly;
use BanklyPHP\BankAccount;

$bankly = new Bankly('client_id', 'client_secret');

$bankly->getBalance('0001', '1234');

$bankly->getStatement('0001', '1234', 0, 10);

$bankly->getEvents('0001', '1234', 1, 10);

$from = new BankAccount;
$from->branch = '0001';
$from->account = '1234';
$from->document = '00000000000000';
$from->name = 'Company LTDA';

$to = new BankAccount;
$to->bankCode = '123';
$to->branch = '1234';
$to->account = '12345';
$to->document = '00000000000';
$to->name = 'John Doe';

// transfer BRL 5 (R$ 5)
$bankly->transfer(500, 'test', $from, $to);

$bankly->getTransferStatus('0001', '1234', 'AuthenticationId');

$banks = bankly->bankList;

$banks = Bankly::bankList();

$bankly.debug = function ($msg) {
	echo $msg . "\r\n";
};