enbit / afterbuy-sdk
The AfterbuySDK provides to interact with the Afterbuy XML API
1.0.2
2020-11-16 05:29 UTC
Requires
- guzzlehttp/guzzle: ^6.0|^7.0.0
- jms/serializer: ^1.1
- monolog/monolog: ^1.12|^2.0.0
This package is auto-updated.
Last update: 2024-11-16 14:11:52 UTC
README
Jast a temp Package until the original Package add the monolog and guzzle new version dependency
Installation
Require the bundle and its dependencies with composer:
$ composer require next-sentence/afterbuy-sdk
Usage
<?php require_once __DIR__ . './../vendor/autoload.php'; $config = array( 'userId' => 'userid', 'userPass' => 'userpass', 'partnerId' => '123456', 'partnerPass' => '123', 'errorLang' => 'en', ); $factory = new Ns\Afterbuy\Factory(); $api = $factory->createRequest($config); try { $soldItems = $api->getSoldItems(); $result = $soldItems->getResult(); var_dump($result); } catch (Exception $e) { echo $e; }
The response will be an instance of Ns\Afterbuy\Model\UpdateSoldItems\UpdateSoldItemsResponse
.
Dependencies
jms/serializer
- Allows you to easily serialize, and deserialize data of any complexityguzzlehttp/guzzle
- Guzzle is a PHP HTTP client librarymonolog/monolog
- Monolog lib