PHP code example of fws / tradegecko

1. Go to this page and download the library: Download fws/tradegecko 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/ */

    

fws / tradegecko example snippets


use ZfrTradeGecko\TradeGeckoClient;

$client = new TradeGeckoClient('your-access-token');

$response = $client->getPriceLists();
$response = $client->createProduct([
  'name' => 'My Product'
]);

// myconfig.php

return [
    'zfr_tradegecko' => [
        'access_token' => 'ACCESS_TOKEN'
    ],
];

$id = $tradeGeckoClient->getCurrentAccount()['account']['id'];

$id = $tradeGeckoClient->getCurrentAccount()['id'];
sh
php composer.phar