New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

tapha/mws-laravel

A minimal service provider to set up and use the MWS API PHP library in Laravel 5.*
94 16

Larablocks Analysis

tapha/mws-laravel works with Laravel 5 (latest release 1.0.2, Jun 22, 2016), which reached end of life: no more fixes, even for security.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • Supports only Laravel 5, past end of life
  • No release in the last 12 months (last: Jun 22, 2016)
  • 3 downloads a month (needs 10,000)
  • 16 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Jun 22, 2016.
  • No releases in the last 12 months.
  • First released: May 31, 2016.
  • Monthly downloads: 3.
  • 4 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 25, 2026.

Install
composer require tapha/mws-laravel
Latest Version:1.0.2
Laravel:5
License:MIT
Last Updated:Feb 20, 2022
Links: GitHub  ·  Packagist
Maintainer: tapha

tapha/mws-laravel

A minimal service provider to set up and use the Amazon MWS API PHP library in Laravel 5.*

Forked from https://github.com/CPIGroup/phpAmazonMWS

How it works - Usage Example

use Mws\Laravel\AmazonOrderList;
$amz = new AmazonOrderList(Setting::get('storeName')); //Store name matches the array key in the settings
$amz->setLimits('Modified', "- 5000 hours");
$amz->setFulfillmentChannelFilter("AFN"); //Amazon-fulfilled orders
$amz->setOrderStatusFilter(
    array("Shipped")
    ); 
$amz->setUseToken(); //Amazon sends orders 100 at a time, but we want them all
$amz->fetchOrders();
$amz->getList();

See how this all comes together below.

Setup

Step 1: Adding the dependency to composer.json

Add this to your composer.json in your Laravel folder. Note: Adding this dependency will automatically setup "anlutro/l4-settings" too.

"require": {
    "tapha/mws-laravel": "1.*",
}

Step 2: Register the service providers and alias

Register the service providers in config/app.php by inserting into the providers array

'providers' => [
	anlutro\LaravelSettings\ServiceProvider::class,
	Mws\Laravel\MwsServiceProvider::class,
]

Add the following alias to your 'aliases' array config/app.php

'aliases' => [
	'Setting' => 'anlutro\LaravelSettings\Facade'
]

Step 3: From the command-line run

php artisan vendor:publish

This will publish the LaravelSettings config file to the config directory, which will give you control over which storage engine to use as well as some storage-specific settings.

Step 4: Add your settings to the LaravelSettings Settings Facade in the 'boot' method of the MwsServiceProvider.php file like this

//Set up the MWS configutation as defined in the LaravelSettings Object by app.

Setting::set("storeName","mystore"); // This will be the key to store the configuration, you pass this as an option to objects you instanstiate with setstore() 
Setting::set("authToken",""); //Mws Auth Token - For third party users.
Setting::set("merchantId","");  //Seller ID
Setting::set("marketplaceId",""); //Marketplace ID 
Setting::set("keyId","");  //Key ID
Setting::set("secretKey",""); //Secret Key 
Setting::set("amazonServiceUrl","");  // Set to your relevant URL if different from default
Setting::set("muteLog","false");  //To log requests, make it true on production to stop logging.

You can then reference them within your app and run Mws API methods like this - Be sure to specify the 'storename' that you set in the 'boot' method as seen below when initialising Objects:

use Mws\Laravel\AmazonOrderList;
$amz = new AmazonOrderList(Setting::get('storeName')); //Store name matches the array key in the settings
$amz->setLimits('Modified', "- 5000 hours");
$amz->setFulfillmentChannelFilter("AFN"); //Amazon-fulfilled orders
$amz->setOrderStatusFilter(
    array("Shipped")
    ); 
$amz->setUseToken(); //Amazon sends orders 100 at a time, but we want them all
$amz->fetchOrders();
$amz->getList();

The use of the Settings facade allows you to change your settings on the fly, or in the case of multiple users, replace settings with whatever user needs to make an API call at the time. For example, the logged in user.

Good to go!

Related Packages

zaffar-saffee/laravel-5-amazon-mws-persistent

Orignall from Peron/laravel5-amazon-mws, implementation to Use Amazon's MWS web...

19 6
luigel/laravel5-amazon-mws

Use Amazon's MWS web services with Laravel. Based on creacoon/amazon-mws-laravel...

4,661 0
waimao/amazon-mws-self

Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-lar...

95 0
dfreer/zillow

Laravel 5 Zillow api wrapper. This code is a fork from vinceg/zillow

29,124 2
devs-poetadigital/laravel-api-generator

code generator

2,861 0

Version History

Version Released Laravel License
1.0.2 5.0 - 5.2 MIT
1.0.1 5.0 - 5.2 MIT
1.0.0 5.0 - 5.2 MIT