PHP code example of galantom / galantom-api-php
1. Go to this page and download the library: Download galantom/galantom-api-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/ */
galantom / galantom-api-php example snippets
// If you are using Composer (recommended)
N');
use GalantomApi\GalantomClient;
$client = GalantomClient::factory(
['api_token' => $galantom_api_token]
);
// Get list of donations
/** @var \GuzzleHttp\Command\Result $response */
$response = $client->getPageDonations(['id' => 327]);
if ($response['response']['code'] !== '200') {
die($response['response']['message']);
}
foreach ($response['donations'] as $donation) {
echo $donation['id'].'|';
}