PHP code example of digitalpianism / nzpost-client
1. Go to this page and download the library: Download digitalpianism/nzpost-client 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/ */
digitalpianism / nzpost-client example snippets
use DigitalPianism\NzPostClient\NzPostClient;
$clientID = 'NZPOST_CLIENT_ID';
$secret = 'NZPOST_CLIENT_SECRET';
$Client = new NzPostClient($clientID, $secret);
use Symfony\Component\Cache\Simple\FilesystemCache;
use DigitalPianism\NzPostClient\NzPostClient;
$cache = new FilesystemCache();
$ttl = 31536000; // One year cache TTL
$clientID = 'NZPOST_CLIENT_ID';
$secret = 'NZPOST_CLIENT_SECRET';
$Client = new NzPostClient($clientID, $secret, $cache);
$Client->setTTL($ttl);