kasp3r / gifty
This package is abandoned and no longer maintained.
No replacement package was suggested.
Gifty.lt api service
1.0.0
2014-10-03 14:41 UTC
Requires
- php: >=5.4
This package is not auto-updated.
Last update: 2024-06-18 01:21:31 UTC
README
Gifty api service
A PHP library to work with gifty.lt api
Dependencies
- PHP >= 5.4
Installation
composer
To install Gifty with composer you need to create composer.json
in your project root and add:
{ "require": { "kasp3r/gifty": "dev-master" } }
Then run
$ wget -nc http://getcomposer.org/composer.phar $ php composer.phar install
Library will be installed in vendor/kasp3r/gifty
In your project include composer autoload file from vendor/autoload.php
Usage
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(); // ... }