Package Data | |
---|---|
Maintainer Username: | gilberto-bueno |
Maintainer Contact: | gilberto@quicktech.no (Gilberto) |
Package Create Date: | 2017-04-26 |
Package Last Update: | 2018-09-24 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-23 03:15:42 |
Package Statistics | |
---|---|
Total Downloads: | 541 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 1 |
Total Open Issues: | 0 |
Quicktech\Cargonizer is a succinct and flexible way to use Cargonizer services in Laravel 5 applications.
composer update
:"quicktech/cargonizer": "^1.0"
config/app.php
and add the following to the providers
array:Quicktech\Cargonizer\CargonizerServiceProvider::class,
config/app.php
and add the following to the aliases
array:'Cargonizer' => Quicktech\Cargonizer\Facades\Cargonizer::class,
config/cargonizer.php
:php artisan vendor:publish
.env
file setup your Cargonizer credentials:CARGONIZER_ENDPOINT = 'http://sandbox.cargonizer.no'
CARGONIZER_SENDER = 'your send id'
CARGONIZER_SECRET_KEY = 'your secret key'
Set the other properties necessaries in the config/cargonizer.php
.
These values will be used by Cargonizer to get other resouces.
To estimate the cost of shipping, you can use this resource:
$params = [
'consignment' => [
'@attributes' => [
'transport_agreement' => '1'
],
'product' => 'tg_dpd_innland',
'parts' => [
'consignee' => [
'country' => 'NO',
'postcode' => '1337'
]
],
'itens' => [
'item' => [
'@attributes' => [
'type' => 'package',
'amount' => '1',
'weight' => '12'
]
]
]
]
];
$consignmentCosts = Cargonizer::consignmentCosts($params);
The method above will return the following response:
[
'estimated_cost' => 495,
'gross_mount' => 495,
'net_amount' => 495
]
You can see more option to consignment parameters here.
Quicktech\Cargonizer is free software distributed under the terms of the MIT license.
Please report any issue you find in the issues page.
Pull requests are welcome.