PHPackages                             qwerin/mpapi-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. qwerin/mpapi-client

ActiveLibrary[API Development](/categories/api)

qwerin/mpapi-client
===================

Mall marketplace API client

3.1.0(7y ago)063MITPHPPHP ^5.5 || ^7.0

Since Aug 9Pushed 4y ago1 watchersCompare

[ Source](https://github.com/qwerin/mpapi-client-php)[ Packagist](https://packagist.org/packages/qwerin/mpapi-client)[ RSS](/packages/qwerin-mpapi-client/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (4)Versions (72)Used By (0)

Mall marketplace API Client
===========================

[](#mall-marketplace-api-client)

Description
-----------

[](#description)

MPAPI client is a tool created to help Internet Mall partners to easily connect to marketplace catalogue and order processing at Mall environment such as Mall.cz or Mall.sk.

Get MPAPI client
----------------

[](#get-mpapi-client)

We recommend to use [Composer](https://getcomposer.org/doc/00-intro.md "see https://getcomposer.org/doc/00-intro.md , if you have it not installed yet"). Once you have composer installed, you can execute the following command in your project root to get the mpapi-client library: `composer require mallgroup/mpapi-client `

To check successful installation go to the vendor folder. You should see the mallgroup folder there. Be sure you include the autoloader:

`require_once '/path/to/your-project/vendor/autoload.php';`

Implementation
--------------

[](#implementation)

To connect your shop by MPAPI client is made as easy as possible, however we expect some basic knowledge of PHP5. You will need to connect to all the services located in /vendor/mallgroup/mpapi/src/Services as shown in example files in /vendor/mallgroup/mpapi/Example. The services provide functions to receive data from Mall environment as well as send, update or delete data.

### Your client ID

[](#your-client-id)

We use two different environments in Mall: testing and production. You will get two different client IDs for each environment so that you can test work with data without a risk of bad transactions at production. You will need the client Id as a parameter for MPAPI client: `$mpapiClient = new Client('yourTestClientId');`

### Logger

[](#logger)

MPAPI client has implemented a logger interface with a simple [PSR logger](https://packagist.org/packages/psr/log "https://packagist.org/packages/psr/log") for errors and all important events. It is up to you, if you decide to implement any ready-to-use logging library e.g. \[monolog\] ( "") as shown in the example bellow or you will implement your own logging. `$logger = new Logger('yourLoggerName'); $logger->pushHandler(new StreamHandler('./elog.log', Logger::INFO)); $mpapiClient->setLogger($logger);`

See more in /path/to/your-project/vendor/mallgroup/mpapi-client/Example/LoggerExample.php.

#### Basic Example of Implementation

[](#basic-example-of-implementation)

```
