Search code examples
zend-framework2amazon-mws

How to include Amazon MWS client library in ZF2


I'm an Amazon vendor and I've also a private e-commerce using Zend Framework 2.

How can I include MWS (Amazon Marketplace Web Service) API resource in ZF2 ?

Amazon give this script (for example) to manage order in Amazon account

https://developer.amazonservices.it/doc/orders/orders/v20130901/php.html

How can I include this script in ZF2?

Thanks....


Solution

  • The AWS MWS client library for PHP seems have a quite old codebase; it doesn't utilizing an autoloader mechanism, non-namespaced classes with lot of double underscore prefixed method names everywhere. Aws also have a good PHP sdk but i'm not sure about MWS support.

    Anyway, loading a non namespaced 3rd party libraries into a ZF2 application is quite possible via composer. Check out this answer.

    You may also want to take a look Guzzle Aws library for an alternative approach.