1. Go to this page and download the library: Download daibe/reloadly-php 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/ */
daibe / reloadly-php example snippets
use ReloadlyPHP\Client;
// Instantiate ReloadlyPHP
$reloadly = new Client('yourClientId', 'yourClientSecret');
use ReloadlyPHP\Client;
$isProd = (bool) App::environment('production'); // Laravel
// Instantiate ReloadPHP
$reloadly = new Client('yourClientId', 'yourClientSecret', $isProd);
// Check your account's balance using Reloadly's REST API and PHP
use ReloadlyPHP\Client;
$client_id = 'ACXXXXXX'; // Your developer client secret from www.reloadly.com/dashboard
$client_secret = 'YYYYYY'; // Your developer client password from www.reloadly.com/dashboard
try {
$reloadly = new Client($client_id, $client_secret);
$balance = $reloadly->getBalance();
echo '<pre>';
echo sprintf("Amount: <strong>%s</strong> <br/>", $balance->getBalance());
echo sprintf("Currency name: <strong>%s</strong> <br/>", $balance->getCurrencyName());
echo sprintf("Currency code: <strong>%s</strong> <br/>", $balance->getCurrencyCode());
echo '</pre>';
} catch (Exception $e) {
echo "Exception: ".$e->getMessage();
}