2017 © Pedro Peláez
 

library amazon-mws-laravel

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

image

keithbrink/amazon-mws-laravel

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

  • Saturday, July 28, 2018
  • by KeithBrink
  • Repository
  • 1 Watchers
  • 1 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 185 Forks
  • 0 Open issues
  • 23 Versions
  • 0 % Grown

The README.md

Build Status StyleCI, (*1)

# Amazon MWS for Laravel

Planning to migrate to the new Selling Partner API? Have a look at our PHP SDK for Amazon's Selling Partner API, as well as our Laravel wrapper., (*2)

A Laravel package to connect to Amazon's Merchant Web Services (MWS)., (*3)

If you are using Laravel 6 or lower, use version 5.0. On Laravel 7, use version 7.0+., (*4)

This is NOT for Amazon Web Services (AWS) - Cloud Computing Services., (*5)

Installation

Install the package using composer require keithbrink/amazon-mws-laravel., (*6)

For Laravel 5.5 and up, the package will be automatically discovered. For other versions, you can add KeithBrink\AmazonMws\MwsServiceProvider to your config/app.php file., (*7)

Run php artisan vendor:publish --provider="KeithBrink\AmazonMws\MwsServiceProvider" --tag="config" to add the amazon-mws.php config file to your config directory., (*8)

Usage

The general work flow for using one of the objects is this:, (*9)

  1. Create an object for the task you need to perform.
  2. Load it up with parameters, depending on the object, using set____ methods.
  3. Submit the request to Amazon. The methods to do this are usually named fetch____ or submit____ and have no parameters.
  4. Reference the returned data, whether as single values or in bulk, using get____ methods.
  5. Monitor the performance of the library using the built-in logging system.

Note that if you want to act on more than one Amazon store, you will need a separate object for each store., (*10)

Also note that the objects perform best when they are not treated as reusable. Otherwise, you may end up grabbing old response data if a new request fails., (*11)

If you want to learn how to use a specific function, the best way is to read the comments above the function; they are detailed and helpful., (*12)

Dynamic Config

If you would like to change the configuration info used in an Amazon call to something other than the info in the config file, you can add the setConfig($config) function to any call. The $config parameter should be an array following this template:, (*13)

$config = [
    'merchantId' => '',
    'marketplaceId' => '',
    'keyId' => '',
    'secretKey' => '',
    'amazonServiceUrl' => '',
];

Example Usage

Here are a couple of examples of the library in use., (*14)

Here is an example of a function used to get all warehouse-fulfilled orders from Amazon updated in the past 24 hours:, (*15)

use KeithBrink\AmazonMws\AmazonOrderList;

function getAmazonOrders() {
    $amz = new AmazonOrderList("myStore"); //store name matches the array key in the config file
    $amz->setLimits('Modified', "- 24 hours");
    $amz->setFulfillmentChannelFilter("MFN"); //no Amazon-fulfilled orders
    $amz->setOrderStatusFilter(
        array("Unshipped", "PartiallyShipped", "Canceled", "Unfulfillable")
        ); //no shipped or pending
    $amz->setUseToken(); //Amazon sends orders 100 at a time, but we want them all
    $amz->fetchOrders();

    $orders = [];
    foreach($amz->getList() as $order) {
        $orders = $order->getData();
    }
    return $orders;
}

This example shows a function used to send a previously-created XML feed to Amazon to update Inventory numbers, and includes an example of a dynamic config:, (*16)

use KeithBrink\AmazonMws\AmazonFeed;

function sendInventoryFeed($feed) {
    $config = [
        'merchantId' => '',
        'marketplaceId' => '',
        'keyId' => '',
        'secretKey' => '',
        'amazonServiceUrl' => '',
    ];

    $amz = new AmazonFeed("myStore"); //store name matches the array key in the config file
    $amz->setConfig($config);
    $amz->setFeedType("_POST_INVENTORY_AVAILABILITY_DATA_"); //feed types listed in documentation
    $amz->setFeedContent($feed);
    $amz->submitFeed();
    return $amz->getResponse();
}

Credits

This package was forked from: https://github.com/sonnenglas/amazon-mws-laravel, (*17)

which was forked from: https://github.com/creacoon/amazon-mws-laravel, (*18)

which was forked from: https://github.com/CPIGroup/phpAmazonMWS, (*19)

who is the original creator of this package., (*20)

The Versions

28/07 2018

dev-master

9999999-dev

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Keith Brink

laravel api php amazon mws

28/07 2018

v4.1.1

4.1.1.0

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Keith Brink

laravel api php amazon mws

28/07 2018

dev-analysis-qBeyOV

dev-analysis-qBeyOV

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Keith Brink

laravel api php amazon mws

19/06 2018

v4.1.0

4.1.0.0

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Keith Brink

laravel api php amazon mws

12/06 2018

v4.0.9

4.0.9.0

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Keith Brink

laravel api php amazon mws

17/05 2018

v4.0.8

4.0.8.0

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Keith Brink

laravel api php amazon mws

17/05 2018

v4.0.7

4.0.7.0

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Keith Brink

laravel api php amazon mws

17/05 2018

v4.0.6

4.0.6.0

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Keith Brink

laravel api php amazon mws

17/05 2018

v4.0.5

4.0.5.0

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Keith Brink

laravel api php amazon mws

17/05 2018

v4.0.4

4.0.4.0

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Keith Brink

laravel api php amazon mws

17/05 2018

v4.0.3

4.0.3.0

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Keith Brink

laravel api php amazon mws

17/05 2018

v4.0.1

4.0.1.0

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Keith Brink

laravel api php amazon mws

17/05 2018

v4.0.2

4.0.2.0

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Keith Brink

laravel api php amazon mws

16/05 2018

v4.0.0

4.0.0.0

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Keith Brink

laravel api php amazon mws

29/01 2017

3.0.2

3.0.2.0

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Przemek Peron

laravel api php amazon mws

28/01 2017

3.0.1

3.0.1.0

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Przemek Peron

laravel api php amazon mws

28/01 2017

3.0.0

3.0.0.0

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Przemek Peron

laravel api php amazon mws

31/05 2016

2.0.3

2.0.3.0

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Przemek Peron

laravel api php amazon mws

31/05 2016

2.0.2

2.0.2.0

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Przemek Peron

laravel api php amazon mws

02/02 2016

2.0.1

2.0.1.0

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Przemek Peron

laravel api php amazon mws

02/02 2016

2.0.0

2.0.0.0

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Przemek Peron

laravel api php amazon mws

06/05 2015

1.0.1

1.0.1.0

An open-source library to connect to Amazon's MWS web services in an object-oriented manner, with a focus on intuitive usage.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel api php amazon mws

29/04 2015

1.0.0

1.0.0.0

An open-source library to connect to Amazon's MWS web services in an object-oriented manner, with a focus on intuitive usage.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel api php amazon mws