2017 © Pedro Peláez
 

library cargonizer

Package Laravel for Logistra Cargonizer API

image

quicktech-as/cargonizer

Package Laravel for Logistra Cargonizer API

  • Monday, November 6, 2017
  • by gilberto-bueno
  • Repository
  • 2 Watchers
  • 1 Stars
  • 320 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 29 % Grown

The README.md

Quicktech\Cargonizer (Laravel 5 Package)

Quicktech\Cargonizer is a succinct and flexible way to use Cargonizer services in Laravel 5 applications., (*1)

Contents

Installation

1) In order to install Laravel 5, just add the following to your composer.json. Then run composer update:, (*2)

"quicktech/cargonizer": "^1.0"

2) Open your config/app.php and add the following to the providers array:, (*3)

Quicktech\Cargonizer\CargonizerServiceProvider::class,

3) In the same config/app.php and add the following to the aliases array:, (*4)

'Cargonizer'   => Quicktech\Cargonizer\Facades\Cargonizer::class,

4) Run the command below to publish the package config file config/cargonizer.php:, (*5)

php artisan vendor:publish

5) Open your .env file setup your Cargonizer credentials:, (*6)

CARGONIZER_ENDPOINT = 'http://sandbox.cargonizer.no'
CARGONIZER_SENDER = 'your send id'
CARGONIZER_SECRET_KEY = 'your secret key'

Configuration

Set the other properties necessaries in the config/cargonizer.php. These values will be used by Cargonizer to get other resouces., (*7)

Usage

Shipping Cost Estimation

To estimate the cost of shipping, you can use this resource:, (*8)

$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:, (*9)

[
    'estimated_cost' => 495,
    'gross_mount'    => 495,
    'net_amount'     => 495
]

You can see more option to consignment parameters here., (*10)

License

Quicktech\Cargonizer is free software distributed under the terms of the MIT license., (*11)

Contribution guidelines

Please report any issue you find in the issues page.
Pull requests are welcome., (*12)

The Versions

06/11 2017

dev-master

9999999-dev

Package Laravel for Logistra Cargonizer API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Gilberto

laravel illuminate cargonizer

06/11 2017

1.0.6

1.0.6.0

Package Laravel for Logistra Cargonizer API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Gilberto

laravel illuminate cargonizer

06/11 2017

1.0.5

1.0.5.0

Package Laravel for Logistra Cargonizer API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Gilberto

laravel illuminate cargonizer

06/05 2017

1.0.4

1.0.4.0

Package Laravel for Logistra Cargonizer API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Gilberto

laravel illuminate cargonizer

27/04 2017

1.0.3

1.0.3.0

Package Laravel for Logistra Cargonizer API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Gilberto

laravel illuminate cargonizer