wndr / logic4
Logic4 PHP-SDK
1.1.0
2024-06-12 08:41 UTC
Requires
- saloonphp/saloon: ^3.0
README
This package is slim wrapper around the Logic4 API. It's an opinionated integration that uses Saloon as a client/wrapper and handles general tasks like authentication.
How to use
// Set configuration $connector = new \Wndr\Logic4\Connectors\Logic4Connector(); $connector->setAdministrationId('xx') ->setCompanyKey('xx') ->setPrivateKey('xx') ->setPublicKey('xx') ->setUsername('xx') ->setPassword('xx') ->authenticate($connector->getAccessToken()) // Create request $request = new \Wndr\Logic4\Requests\Orders\GetOrders([ 'Id' => 'xx', 'TakeRecords' => 1 ]); // Get results $response = $connector->send($request)->json();
Install
composer require wndr/logic4