Download the PHP package gullevek/amazon-incentives without Composer

On this page you can find all versions of the php package gullevek/amazon-incentives. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package amazon-incentives

Amazon Incentives - Gift Codes on Demand stand alone class

This is a abastract from https://github.com/kamerk22/AmazonGiftCod to be not dependend on Laravel base code.

Amazon Gift Codes On Demand (AGCOD). Integration for Amazon Incentive API.

General Amazon Incentives Documentation

How to install

composer require gullevek/amazon-incentives

_ENV variables needed

Uses .env file to load configuration data

The below keys are searched in the _ENV file for loading

How to use

The above _ENV variables must be set (Except AWS_DEBUG, defaults to off).

create gift card

Throttle Rates

Note that you can only send 10 requests per second. On a Throttle Excepion you need to wait about 10s to create another request.

Recommended to pool requests. Or check when last requests where sent and then process them.

On F400 errors

1) try again 2) if failed run cancel gift card 3) if cance ok try create again with different request id 4) if 2) failed, wait a view seconds and try again 5) if 10s elapse, we need to wait a full day 6) if >24h call Amazon

cancel gift card

check balance

Exceptions

If the HTTPS request does not return 220 OK it will throw an exception.

The error code is the curl handler error code. The error message is json encoded array with the layout

Use

to extract the below array from the thrown exception

status, code and type must be checked on a failure.

Other Errors from exceptions

T001

if code is T001 then this is a request flood error: In this case the request has to be resend after a certain waiting period.

E999

if code is E999 some other critical error has happened

E001

if code is E001 if the return create/cancel/check calls is not an array

C001

fif code is C001 curl failed to init

C002

if code is C002 a curl error has happened

empty error code

any other NON amazon error will have only 'message' set if run through decode

Debugging

If AWS_DEBUG is set to 1 and internal array will be written with debug info.

The gulleek\AmazonIncentives\Debug\AmazonDebug class handles all this.

In the gulleek\AmazonIncentives\AmazonIncentives main class the debugger gets set

New entries can be written with

AmazonDebug::writeLog(['foo' => 'bar']);

On sucessful run the log data is accessable with $aws->getLog() On exception the log data is in the error message json (see exceptions)


All versions of amazon-incentives with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gullevek/amazon-incentives contains the following files

Loading the files please wait ....