PHP code example of trolley / core
1. Go to this page and download the library: Download trolley/core 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/ */
trolley / core example snippets
// This line is for the Composer autoloader
ire_once 'php-sdk/lib/autoload.php';
use Trolley;
Trolley\Configuration::publicKey(YOUR_ACCESS_KEY);
Trolley\Configuration::privateKey(YOUR_SECRET_KEY);
try {
$recipients = Trolley\Recipient::all();
foreach ($recipients as $rcpt) {
print_r($rcpt->id . "\n");
}
} catch (Exception $e) {
echo 'Exception when calling Trolley\\Recipient::all ', $e->getMessage(), PHP_EOL;
}
bash
git clone https://github.com/PaymentRails/php-sdk.git