PHP code example of wndr / logic4

1. Go to this page and download the library: Download wndr/logic4 library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wndr / logic4 example snippets


// 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();