PHP SDK to interact with the Correios webservice.
Via Composer
$ composer require flyingluscas/correios-php
use FlyingLuscas\Correios\Format;
use FlyingLuscas\Correios\Freight;
use FlyingLuscas\Correios\Service;
$freight = new Freight;
$freight->setServices(Service::SEDEX, Service::PAC);
$freight->setZipCodes('01001-000', '87047-230');
$freight->setFormat(Format::BOX);
$freight->cart->fill([
[
'width' => 16,
'height' => 16,
'length' => 16,
'weight' => 0.3,
'quantity' => 1,
],
[
'width' => 16,
'height' => 16,
'length' => 16,
'weight' => 0.3,
'quantity' => 3,
],
]);
$results = $freight->calculate();
Please see CHANGELOG for more information what has changed recently.
$ composer test
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email lucas.pires.mattos@gmail.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.