Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

Ask for a guide how to use #5

Open
wants to merge 87 commits into
base: stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
d9d6b96
Updated readme.
tomcoonen Apr 29, 2015
f47815a
Added all aliases. Updated Amazon application name.
tomcoonen May 6, 2015
385d664
Update illuminate/support to support Laravel 5
mikevrind Jun 9, 2015
66b27ba
Rename config.php to amazon-mws
mikevrind Jun 9, 2015
7a614e7
Update AmazonMwsServiceProvider.php
mikevrind Jun 9, 2015
5a8050e
Update environment.php
mikevrind Jun 9, 2015
ce63a7c
Missing php prefix for config file
przemekperon Dec 19, 2015
8a3f386
Added setDisplayableOrderComment() to AmazonFulfillmentOrderCreator c…
przemekperon Dec 19, 2015
d7d3556
Namespaced all classes
przemekperon Dec 20, 2015
063b933
Fixed path to config file in classes
przemekperon Dec 20, 2015
2c7c746
Allow setting of Amazon Service URL per store
przemekperon Dec 22, 2015
3dbcf93
Fixed typo Providence instead of Province
przemekperon Dec 22, 2015
4de2898
Hotfix for amazon service url by store
przemekperon Dec 23, 2015
b313eff
Removed reference to undefined setLogPath() method
przemekperon Dec 29, 2015
3c5af82
Fixed time parsing + AmazonReport->fetchReport() now returns raw report
przemekperon Feb 1, 2016
7b69fe2
Fixed bug in AmazonReportRequest() class
przemekperon Feb 2, 2016
3ba6341
Resolved merge conflicts
przemekperon Feb 2, 2016
06a7ef3
Changed package namespace and name
przemekperon Feb 2, 2016
27d184e
Changed namespace
przemekperon Feb 2, 2016
957c1bf
Merge branch 'master' into stable
przemekperon Feb 2, 2016
937d5e4
Small updates
przemekperon Feb 2, 2016
836f9ad
Small fixes
przemekperon Feb 2, 2016
08add20
Improvements in AmazonReport class
przemekperon Apr 12, 2016
78f1dff
Reformatted code according to PSR2
przemekperon Apr 12, 2016
23873ec
Fixed bug in AmazonProductsCore.php
przemekperon May 31, 2016
6e76882
Bugfix
przemekperon May 31, 2016
cf76ec9
Update AmazonProduct.php
jeyasithar Oct 1, 2016
e2c73d5
Update AmazonFeedList.php
mohamedziada Oct 5, 2016
091e9c2
Merge pull request #2 from mohamedziada/patch-1
przemekperon Oct 5, 2016
62b1051
Merge pull request #1 from jeyasithar/stable
przemekperon Oct 5, 2016
6a2574b
Fixed Issue: vendor/peron/laravel5-amazon-mws/src/Peron/AmazonMws/Ama…
gitmastro Nov 8, 2016
dd13f1d
Merge pull request #3 from gitmastro/fixed-amazonproduct-getproduct
przemekperon Nov 8, 2016
a792d81
Renamed package
przemekperon Jan 28, 2017
42dfe28
Partial updates of tests
przemekperon Jan 28, 2017
07b31c1
Service Provider fix
przemekperon Jan 29, 2017
6c3110a
removed typo
EliasKotlyar Feb 4, 2017
17dbbb3
Backported Financial APIs from https://github.com/CPIGroup/phpAmazonMWS
EliasKotlyar Feb 5, 2017
f4e1cae
Merge pull request #6 from EliasKotlyar/origin/typofix
przemekperon Feb 6, 2017
44d300b
The MWSAuthToken is used to make requests on behalf of other amazon u…
vaneavasco Feb 18, 2017
9b0a0f3
Update AmazonOrder.php
a349944418 May 4, 2017
873a55e
add the lost parameter PaymentMethodDetails
May 5, 2017
c3ba85e
add get shipmentServiceLevelCategory, PaymentMethodDetails, OrderType…
May 5, 2017
ffdf4ca
Updated Order / OrderItemList for additional fields
pdbreen Nov 2, 2017
31529ea
add proxy info to manage multi shop
Feb 7, 2018
c2606c7
Tighten timestamp slop from 2 to 1 minutes
pdbreen Mar 7, 2018
6e8bdbb
Further tighten timestamp slop
pdbreen Mar 8, 2018
04fa633
Merge pull request #11 from pdbreen/stable
przemekperon Jul 24, 2018
28ba905
Merge pull request #8 from vaneavasco/stable
przemekperon Jul 24, 2018
bc38256
Merge pull request #7 from EliasKotlyar/financialapis
przemekperon Jul 24, 2018
5ecca19
Updated Change log
przemekperon Jul 24, 2018
2fca783
Added setMarketplaceID method to Fulfillment order creator
przemekperon Jul 25, 2018
f5bee52
The check of the muteLog config value was after the actual log method…
forgueam Jul 26, 2018
e356bf7
Fixed timestamp format to truly follow ISO8601
ennnnny Aug 7, 2018
f3f2e91
Fix to include relationships including additional ns2 attributes
Sep 20, 2018
2367977
Merge pull request #17 from activeyossi/patch-1
przemekperon Nov 8, 2018
072f773
Merge pull request #13 from forgueam/mute-log-fix
przemekperon Nov 8, 2018
6c164f1
Merge pull request #16 from ennnnny/stable
przemekperon Nov 8, 2018
dad9793
Merge branch 'stable' into stable
przemekperon Nov 8, 2018
a6cab4b
Merge pull request #9 from a349944418/stable
przemekperon Nov 8, 2018
cdd7aa1
Updated Changelog
przemekperon Nov 8, 2018
5892a56
Added extra logging
przemekperon Nov 8, 2018
7a0674b
Hotfix
przemekperon Nov 8, 2018
afc79de
Added throttleCount tracking to AmazonCore
fromthecove Mar 21, 2019
cddd888
Update AmazonFeed.php
deniztezcan May 8, 2019
93676da
Updated for Laravel 6
fromthecove Mar 25, 2020
55856a6
Upgrade to Laravel 6 support
VladDak Jul 4, 2020
b7ac253
Merge pull request #50 from sonnenglas/upgrade_to_laravel_6
przemekperon Sep 27, 2020
7d72bc4
Added tax registration details to AmazonOrder class
przemekperon Oct 22, 2020
e401bd0
Cleaning AmazonCore
przemekperon Oct 30, 2020
ebf34c6
Merge pull request #26 from deniztezcan/patch-1
przemekperon Oct 30, 2020
15a4062
Merge branch 'stable' into throttle-logging
przemekperon Oct 30, 2020
afc0125
Merge pull request #23 from dlowhorn/throttle-logging
przemekperon Oct 30, 2020
d190a67
Updated Order / OrderItemList for additional fields
pdbreen Nov 2, 2017
7682ceb
The MWSAuthToken is used to make requests on behalf of other amazon u…
vaneavasco Feb 18, 2017
e92a0b5
Added setMarketplaceID method to Fulfillment order creator
przemekperon Jul 25, 2018
a62e3a9
Updated Changelog
przemekperon Nov 8, 2018
a7729c9
Fixed bug with getProduct() in class AmazonProduct
przemekperon Oct 30, 2020
cea196a
Add subscription manager (#22)
A-Lawrence Oct 30, 2020
f3bc465
Fix prepareCategories() (#15)
NanoNao Oct 30, 2020
bc763e2
Update AmazonProduct.php - Fix Relationships (#52)
Oct 30, 2020
8a2657d
Merge branch 'stable' of github.com:sonnenglas/amazon-mws-laravel int…
przemekperon Oct 30, 2020
8f1dc2e
Updated changelog
przemekperon Oct 30, 2020
0263d1d
Avoid 'Request signature is too far in the past and has expired' erro…
przemekperon Jan 27, 2021
fb369bd
Add support for Laravel 7 and 8
przemekperon Mar 9, 2021
f916ee8
Added support for Laravel 9
przemekperon Apr 14, 2022
f46fd23
Add BuyerRequestedCancel (#60)
fcorbi Aug 9, 2024
c2715c3
Added Laravel 10/11 support
przemekperon Nov 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
composer.phar
composer.lock
.DS_Store
.idea
amazon-config.php
test.php
log.txt
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ php:
- 5.4
- 5.5
- 5.6
- hhvm
- 7

before_script:
- travis_retry composer self-update
- travis_retry composer install --prefer-source --no-interaction --dev

script: phpunit
script: cd test-cases && phpunit --bootstrap bootstrap.php
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# CHANGELOG


### 2020-10-30 - Version 4.1.0

- [[PR #52](https://github.com/sonnenglas/amazon-mws-laravel/pull/52)] Fix Relationships in AmazonProduct class
- [[PR #26](https://github.com/sonnenglas/amazon-mws-laravel/pull/26)] Fix in AmazonFeed class
- [[PR #23](https://github.com/sonnenglas/amazon-mws-laravel/pull/23)] Added getThrottleCountForLastRequest() to AmazonCore class to track throttling
- [[PR #22](https://github.com/sonnenglas/amazon-mws-laravel/pull/22)] Added support for Subscriptions
- [[PR #15](https://github.com/sonnenglas/amazon-mws-laravel/pull/52)] Fix prepareCategories() in AmazonProductInfo class
- Fixed bug with getProduct() in class AmazonProduct

### 2020-10-22 - Version 4.0.1

- added tax registration details to AmazonOrder class

### 2020-09-27 - Version 4.0.0

- Added support for Laravel 6.x

### 2018-11-08 - Version 3.0.5.1

### 2018-11-08 - Version 3.0.5

- [[PR #17](https://github.com/sonnenglas/amazon-mws-laravel/pull/17)] Fix to include relationships including additional ns2 attributes
- [[PR #16](https://github.com/sonnenglas/amazon-mws-laravel/pull/16)] Fixed timestamp format to truly follow ISO8601
- [[PR #13](https://github.com/sonnenglas/amazon-mws-laravel/pull/13)] Fix ineffective muteLog config setting
- [[PR #9](https://github.com/sonnenglas/amazon-mws-laravel/pull/9)] added proxy support and some fixes

### 2018-07-25 - Version 3.0.4

- added `setMarketPlaceId()` to AmazonFulfillmentOrderCreator class

### 2018-07-24 - Version 3.0.3

- [[PR #11](https://github.com/sonnenglas/amazon-mws-laravel/pull/11/)] added all missing order / orderitem fields that were declared in the API spec
- [[PR #8](https://github.com/sonnenglas/amazon-mws-laravel/pull/8/)] added `authToken` to configuration file. MWSAuthToken is used to make requests on behalf of other amazon users
- [[PR #7](https://github.com/sonnenglas/amazon-mws-laravel/pull/7/)] Backported Financial APIs from https://github.com/CPIGroup/phpAmazonMWS
53 changes: 0 additions & 53 deletions INSTALL.md

This file was deleted.

41 changes: 38 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,52 @@
phpAmazonMWS
amazon-mws-laravel
============

A library to connect to Amazon's Merchant Web Services (MWS) in an object-oriented manner, with a focus on intuitive usage.
A PHP package to connect to Amazon's Merchant Web Services (MWS) in an object-oriented manner, with a focus on intuitive usage.

Currently optimizing for Laravel Framework.

This is __NOT__ for Amazon Web Services (AWS) - Cloud Computing Services.

## Installation

1. `composer require sonnenglas/laravel5-amazon-mws`

2. add the service provider to the providers array in config/app.php:
```
Sonnenglas\AmazonMws\ServiceProvider::class,
```

There's no facades to add in config/app.php

3. Copy amazon-mws.php configuration file from src/config/amazon-mws.php to Laravel's config directory.

## Usage
All of the technical details required by the API are handled behind the scenes,
so users can easily build code for sending requests to Amazon
without having to jump hurdles such as parameter URL formatting and token management.
The general work flow for using one of the objects is this:

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.

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.

## Example Usage

Here are a couple of examples of the library in use.
All of the technical details required by the API are handled behind the scenes,
so users can easily build code for sending requests to Amazon
without having to jump hurdles such as parameter URL formatting and token management.

Here is an example of a function used to get all warehouse-fulfilled orders from Amazon updated in the past 24 hours:
```php
use Sonnenglas\AmazonMws\AmazonOrderList;

function getAmazonOrders() {
$amz = new AmazonOrderList("myStore"); //store name matches the array key in the config file
$amz->setLimits('Modified', "- 24 hours");
Expand All @@ -28,8 +61,10 @@ function getAmazonOrders() {
```
This example shows a function used to send a previously-created XML feed to Amazon to update Inventory numbers:
```php
use Sonnenglas\AmazonMws\AmazonOrderList;

function sendInventoryFeed($feed) {
$amz=new AmazonFeed("myStore"); //store name matches the array key in the config file
$amz = new AmazonFeed("myStore"); //store name matches the array key in the config file
$amz->setFeedType("_POST_INVENTORY_AVAILABILITY_DATA_"); //feed types listed in documentation
$amz->setFeedContent($feed);
$amz->submitFeed();
Expand Down
38 changes: 0 additions & 38 deletions amazon-config.default.php

This file was deleted.

55 changes: 31 additions & 24 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
{
"name": "creacoon/amazon-mws",
"description": "An open-source library to connect to Amazon's MWS web services in an object-oriented manner, with a focus on intuitive usage.",
"license": "Apache-2.0",
"keywords": ["API", "Amazon", "PHP", "MWS", "Laravel"],
"authors": [
{
"name": "Tom Coonen",
"email": "tom@creacoon.nl"
}
],
"require": {
"php": ">=5.4.0",
"ext-curl": "*",
"illuminate/support": "4.2.*"
},
"require-dev": {
"phpunit/phpunit": "3.7.*"
},
"autoload": {
"psr-0": {
"Creacoon\\AmazonMws": "src/"
}
},
"minimum-stability": "stable"
"name": "sonnenglas/laravel-amazon-mws",
"description": "Use Amazon's MWS web services with Laravel ^7.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).",
"license": "Apache-2.0",
"keywords": [
"API",
"Amazon",
"PHP",
"MWS",
"Laravel"
],
"authors": [
{
"name": "Przemek Peron",
"email": "przemek@redkorn.pl"
}
],
"require": {
"php": ">=5.5.9",
"ext-curl": "*",
"ext-simplexml": "*",
"illuminate/support": "6.*|7.*|8.*|9.*|10.*|11.*"
},
"require-dev": {
"phpunit/phpunit": "5.*"
},
"autoload": {
"psr-4": {
"Sonnenglas\\AmazonMws\\": "src"
}
},
"minimum-stability": "stable"
}
6 changes: 5 additions & 1 deletion environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/

//for User-Agent header(?)
$AMAZON_APPLICATION = 'phpAmazonMWS';
$AMAZON_APPLICATION = 'LaravelAmazonMWS';
$AMAZON_APPVERSION = '1.0';

//Version numbers for cores
Expand All @@ -35,6 +35,10 @@
$AMAZON_VERSION_PRODUCTS = '2011-10-01';
$AMAZON_VERSION_REPORTS = '2009-01-01';
$AMAZON_VERSION_SELLERS = '2011-07-01';
$AMAZON_VERSION_FINANCE = '2015-05-01';
//Recommendations
$THROTTLE_LIMIT_FINANCE = 30;
$THROTTLE_TIME_FINANCE = 2;

//Amazon Throttle Values in seconds
//Fetching Orders
Expand Down
29 changes: 0 additions & 29 deletions includes/classes.php

This file was deleted.

Loading