PHP code example of drunomics / xtrf-rest-client

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

    

drunomics / xtrf-rest-client example snippets


$config = [
  'base_uri' => 'http://example.com',
  'username' => 'test',
  'password' => 'test',
];
$client = \drunomics\XtrfClient\XtrfClient::create($config);
$quote = $client->getQuote($quote_id);
//...
// More examples like quote creation can be found at the tests, see https://github.com/drunomics/xtrf-rest-client/blob/master/tests/XtrfApiIntegrationTest.php#L145.