kruegge82 / afterbuy-sdk
The AfterbuySDK provides to interact with the Afterbuy XML API
0.1.2
2024-08-29 15:23 UTC
Requires
- php: >=7.4.0
- guzzlehttp/guzzle: ^7.9
- jms/serializer: ^3.30
README
Require the bundle and its dependencies with composer:
$ composer require kruegge82/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