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.
You can install this package via Composer.
$ composer require kamerk22/amazongiftcodeSet the following Environment Variable in .env file.
GIFT_CARD_ENDPOINT=https://agcod-v2-gamma.amazon.com
GIFT_CARD_KEY=AWS_ACCESS_KEY
GIFT_CARD_SECRET=AWS_SECRET
GIFT_CARD_PARTNER_ID=AWS_PARTNER_IDThe package will register itself automatically. Optionally publish config file of package
$ php artisan vendor:publish --provider="kamerk22\AmazonGiftCode\AmazonGiftCodeServiceProvider" --tag="config"To Create Amazon Gift Card
$aws = AmazonGiftCode::make()->buyGiftCard($value);To Cancel Amazon Gift Card
$aws = AmazonGiftCode::make()->cancelGiftCard($creationRequestId, $gcId);To Get Available Funds Balance
$aws = AmazonGiftCode::make()->getAvailableFunds();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);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();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();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();Please see the changelog for more information on what has changed recently.
Please see contributing.md for details and a todolist.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
MIT. Please see the license file for more information.

