1. Go to this page and download the library: Download trixpua/shipping 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/ */
trixpua / shipping example snippets
Trixpua\Shipping\Tnt\Quote\Tnt;
use Trixpua\Shipping\ShippingInfo;
$tnt = new Tnt('YOUR-ZIP-CODE', '[email protected]', 'yourPassword', 'YOUR-DIVISION-CODE', 'YOUR-TAX-SITUATION', 'YOUR-TAX-ID', 'YOUR-STATE-REGISTRATION-NUMBER');
$shippingInfo = new ShippingInfo('DESTINY-ZIP-CODE', 'WEIGHT', 'COMMODITY-VALUE', 'VOLUME');
$tnt->setData($shippingInfo);
$tnt->makeRequest();
$return = $tnt->getResult();
Trixpua\Shipping\Jamef\Quote\Jamef;
use Trixpua\Shipping\ShippingInfo;
$jamef = new Jamef('yourUser', 'YOUR-TAX-ID', 'YOUR STATE', 'YOUR CITY NAME', 'YOUR-QUOTE-BRANCH');
$shippingInfo = new ShippingInfo('DESTINY-ZIP-CODE', 'WEIGHT', 'COMMODITY-VALUE', 'VOLUME');
$jamef->setData($shippingInfo);
$jamef->makeRequest();
$return = $jamef->getResult();
Trixpua\Shipping\Correios\Quote\Correios;
use Trixpua\Shipping\ShippingInfo;
$correios = new Correios('YOUR-ZIP-CODE', 'YOUR-LOGIN', 'yourPassword');
$shippingInfo = new ShippingInfo('DESTINY-ZIP-CODE', 'WEIGHT', 'COMMODITY-VALUE', 'VOLUME');
$correios->setData($shippingInfo);
$correios->makeRequest();
$return = $correios->getResult();
Trixpua\Shipping\ShippingInfo;
use Trixpua\Shipping\TamCargo\Quote\TamCargo;
$tam = new TamCargo('YOUR-ZIP-CODE', '[email protected]', 'yourPassword');
$shippingInfo = new ShippingInfo('DESTINY-ZIP-CODE', 'WEIGHT', 'COMMODITY-VALUE', 'VOLUME');
$tam->setData($shippingInfo);
$tam->makeRequest();
$return = $tam->getResult();
Trixpua\Shipping\ExpressoSaoMiguel\Quote\ExpressoSaoMiguel;
use Trixpua\Shipping\ShippingInfo;
$expressoSaoMiguel = new ExpressoSaoMiguel('YOUR-ZIP-CODE','yourUser', 'yourPassword');
$shippingInfo = new ShippingInfo('DESTINY-ZIP-CODE', 'WEIGHT', 'COMMODITY-VALUE', 'VOLUME');
$expressoSaoMiguel->setData($shippingInfo);
$expressoSaoMiguel->makeRequest();
$return = $expressoSaoMiguel->getResult();