channelengine / merchant-api-client-php
ChannelEngine API for merchants
2.13.0
2022-09-09 09:46 UTC
Requires
- php: ^7.3 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.12
- phpunit/phpunit: ^8.0 || ^9.0
This package is auto-updated.
Last update: 2024-12-10 10:38:03 UTC
README
Deprecation of the Merchant API client libraries
This library is no longer supported by ChannelEngine. To build your own library via OpenAPI Generator, using your programming language of choice, check out the Merchant API: API clients article in our Help Center.
ChannelEngine’s APIs follow the OpenAPI/Swagger specifications, which you can find in our API reference.
Additional information for developers
For detailed information on ChannelEngine’s APIs, go to the REST APIs category in our Help Center.
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:
{
"require": {
"channelengine/merchant-api-client-php": "*"
}
}
Then run composer install
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); use ChannelEngine\Merchant\ApiClient\Configuration; use ChannelEngine\Merchant\ApiClient\ApiException; use ChannelEngine\Merchant\ApiClient\Api\OrderApi; $apiConfig = Configuration::getDefaultConfiguration(); $apiConfig->setHost('https://demo.channelengine.net/api'); $apiConfig->setApiKey('apikey', 'xxxxxxxxxxxx'); $orderApi = new OrderApi(null, $apiConfig); try { $response = $orderApi->orderGetNew(); dd($response); } catch (ApiException $e) { // In case of a non-2xx status an exception will be trown. // However, we can check getResponseBody() to get the deserialized response. echo($e->getMessage()); dd($e->getResponseBody()); } function dd($var) { echo("<pre>"); print_r($var); echo("</pre>"); }