GithubHelp home page GithubHelp logo

goaround / amazongiftcode Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kamerk22/amazongiftcode

0.0 1.0 0.0 53 KB

Laravel package for Amazon Gift Codes On Demand (AGCOD). Integration for Amazon Incentive API ๐ŸŽ

License: Other

PHP 100.00%

amazongiftcode's Introduction

AmazonGiftCode

Scrutinizer Code Quality Build Status Code Intelligence Status Latest Version on Packagist Total Downloads

AmazonGiftCode is Laravel package for Amazon Gift Codes On Demand (AGCOD). Integration for Amazon Incentive API. Read more at https://developer.amazon.com/amazon-incentives-api

This package will give you a simplest APIs to Create/Cancel Amazon Gift Code On Demand.

Installation

You can install this package via Composer.

$ composer require kamerk22/amazongiftcode

Set the following Environment Variable in .env file.

GIFT_CARD_ENDPOINT=agcod-v2-gamma.amazon.com
GIFT_CARD_KEY=AWS_ACCESS_KEY
GIFT_CARD_SECRET=AWS_SECRET
GIFT_CARD_PARTNER_ID=AWS_PARTNER_ID

The package will register itself automatically. Optionally publish config file of package

$ php artisan vendor:publish --provider="kamerk22\AmazonGiftCode\AmazonGiftCodeServiceProvider" --tag="config"

Usage

To Create Amazon Gift Card

$aws = AmazonGiftCode::make()->buyGiftCard($value);

Create a Amazon Gift Card with your own $creationRequestId (otherwise generated)

$aws = AmazonGiftCode::make()->buyGiftCard($value, $creationRequestId);

To Cancel Amazon Gift Card

$aws = AmazonGiftCode::make()->cancelGiftCard($creationRequestId, $gcId);

To Get Available Funds Balance

$aws = AmazonGiftCode::make()->getAvailableFunds();

Available Methods

To change client configuration dynamic. If you pass only $key or other parameter will takes value from default config.

$aws = AmazonGiftCode::make($key, $secret, $partner, $endpoint, $currency)->buyGiftCard($value);

CreateGiftCard

getStatus()

Get the status of perform request. (status)

$status = $aws->getStatus();

getId()

To get unique Amazon Gift Card id. (gcId)

$gcId = $aws->getId();

getCreationRequestId()

Original Creation Request Id. (creationRequestId)

$creationRequestId = $aws->getCreationRequestId();

getClaimCode()

Amazon Gift Card Claim Code to be used. (gcClaimCode)

$gcClaimCode = $aws->getClaimCode();

getValue()

Amount of generated Gift Card. (amount)

$amount = $aws->getValue();

getCurrency()

Currency Code of generated Gift Card. (currencyCode)

$currencyCode = $aws->getCurrency();

getRawJson()

Get the raw JSON response. (original response)

$rawJson = $aws->getRawJson();

CancelGiftCard

getStatus()

Get the status of perform request. (status)

$status = $aws->getStatus();

getId()

To get unique Amazon Gift Card id. (gcId)

$gcId = $aws->getId();

getCreationRequestId()

Original Creation Request Id. (creationRequestId)

$creationRequestId = $aws->getCreationRequestId();

getRawJson()

Get the raw JSON response. (original response)

$rawJson = $aws->getRawJson();

GetAvailableFunds

getStatus()

Get the status of perform request. (status)

$status = $aws->getStatus();

getAmount()

To get available balance amount. (amount)

$amount = $aws->getAmount();

getCurrency()

To get currency. (currency)

$currency = $aws->getCurrency();

getTimestamp()

Get request timestamp. (getTimestamp)

$timestamp = $aws->getTimestamp();

getRawJson()

Get the raw JSON response. (original response)

$rawJson = $aws->getRawJson();

Change log

Please see the changelog for more information on what has changed recently.

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

MIT. Please see the license file for more information.

amazongiftcode's People

Contributors

davemorris80 avatar goaround avatar kamerk22 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.