dev-master
9999999-dev http://github.com/kasp3r/giftyGifty.lt api service
MIT
The Requires
- php >=5.4
api php
1.0.0
1.0.0.0 http://github.com/kasp3r/giftyGifty.lt api service
MIT
The Requires
- php >=5.4
api php
Wallogit.com
2017 © Pedro Peláez
Gifty.lt api service
A PHP library to work with gifty.lt api, (*1)
To install Gifty with composer you need to create composer.json in your project root and add:, (*2)
{
"require": {
"kasp3r/gifty": "dev-master"
}
}
Then run, (*3)
$ wget -nc http://getcomposer.org/composer.phar $ php composer.phar install
Library will be installed in vendor/kasp3r/gifty, (*4)
In your project include composer autoload file from vendor/autoload.php, (*5)
use Gifty\GiftyService;
$giftyService = new GiftyService('customerKey', 'customerSecret', 'userId');
$response = $giftyService
->setTesting(true) // to enable testing
->createGift('productId', 'templateId', 'recipient');
if ($response->isError()) {
echo $response->getErrorCode() . ': ' . $response->getErrorDescription();
} else {
echo 'Gift name: ' . $response->getGiftName();
echo 'Gift code: ' . $response->getGiftCode();
// ...
}
Gifty.lt api service
MIT
api php
Gifty.lt api service
MIT
api php