bdourado / loggi
Loggi service package
0.0.1
2019-01-18 12:29 UTC
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2025-03-14 05:20:17 UTC
README
Loggi services API package
Available services:
- Estimate order
- Cities available
Installation
composer require bdourado/loggi
How to use
//your Loggi's account email $email = 'youremail@yourdomain.com'; //your Loggi's account password $password = 'yourPassword'; //your environment 'dev' or 'prod' $env = 'dev'; //full address to withdraw $fullAddressWithDraw = array( 'street_number' => '1757', 'route' => 'Avenida Angélica', 'neighborhood' => 'Higienopolis', 'city' => 'São Paulo', 'state' => 'São Paulo', 'state_code' => 'SP', 'country' => 'Brasil', 'country_code' => 'BR', 'postal_code' => '01227-200' ); //full address to delivery $fullAddressDelivery = array( 'street_number' => '260', 'route' => 'Rua Avanhandava', 'neighborhood' => 'Bela Vista', 'city' => 'São Paulo', 'state' => 'São Paulo', 'state_code' => 'SP', 'country' => 'Brasil', 'country_code' => 'BR', 'postal_code' => '01306-000' ); $loggi = new Loggi($env,$email,$password); //get estimated order $estimatedOrder = $loggi->getEstimatedOrder($fullAddressWithDraw['postal_code'],$fullAddressDelivery['postal_code']); //create a order $createOrder = $loggi->createOrder($fullAddressWithDraw,$fullAddressDelivery); //confirm a created order $confirmOrder = $loggi->confirmOrder($createOrder);