PHP code example of fullpipe / biglion-client
1. Go to this page and download the library: Download fullpipe/biglion-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/ */
fullpipe / biglion-client example snippets
$bc = new \Fullpipe\Biglion\Client('[email protected]', 'password');
try {
var_dump($bc->getCouponInfo('012345-0000-0001'));
var_dump($bc->redeemCoupon('012345-0000-0001', '1234'));
var_dump($bc->reserveCoupon('012345-0000-0001', '387'));
} catch (\Fullpipe\Biglion\BiglionException $e) {
echo $e->getMessage();
}
try {
var_dump($bc->getCouponInfo('012345-0000-0002'));
var_dump($bc->redeemCoupon('012345-0000-0002', '1234'));
var_dump($bc->reserveCoupon('012345-0000-0002', '387'));
} catch (\Fullpipe\Biglion\BiglionException $e) {
echo $e->getMessage();
}
try {
var_dump($bc->getCouponInfo('012345-0000-0003'));
var_dump($bc->redeemCoupon('012345-0000-0003', '1234'));
var_dump($bc->reserveCoupon('012345-0000-0003', '387'));
} catch (\Fullpipe\Biglion\BiglionException $e) {
echo $e->getMessage();
}