PHP code example of alancole / true-layer
1. Go to this page and download the library: Download alancole/true-layer 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/ */
alancole / true-layer example snippets
$tl = new TrueLayer\Connection(
$client_id,
$client_secret,
$redirect_uri
);
header('Location: ' . $tl->getAuthorizartionLink());
$token = $tl->getOauthToken($code);
$accounts = (new TrueLayer\Bank\Accounts($tl, $token))
->getAllAccounts();
var_dump($accounts);