2017 © Pedro Peláez
 

library gifty

Gifty.lt api service

image

kasp3r/gifty

Gifty.lt api service

  • Friday, October 3, 2014
  • by kasp3r
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Gifty api service

A PHP library to work with gifty.lt api, (*1)

Dependencies

  • PHP >= 5.4

Installation

composer

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)

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();
    // ...
}

The Versions

03/10 2014

dev-master

9999999-dev http://github.com/kasp3r/gifty

Gifty.lt api service

  Sources   Download

MIT

The Requires

  • php >=5.4

 

api php

03/10 2014

1.0.0

1.0.0.0 http://github.com/kasp3r/gifty

Gifty.lt api service

  Sources   Download

MIT

The Requires

  • php >=5.4

 

api php