PHP code example of yahaay-labs / upbank-php-sdk

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

    

yahaay-labs / upbank-php-sdk example snippets

shell


Labs\UpBank\Client;

$access_token = "[UPBANK ACCESS TOKEN]";

$client = new Client($access_token);

//Get All Accounts in an array of objects
$accounts = $client->accounts->all()->data();

array_walk( $accounts, function($account) {
    echo "{$account->id} => {$account->attributes->displayName} <br/>";
});