PHP code example of zfr / zfr-tradegecko

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

    

zfr / zfr-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