PHP code example of multiplier / jad-log

1. Go to this page and download the library: Download multiplier/jad-log 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/ */

    

multiplier / jad-log example snippets



return [
	'gmkey' => env('GMKEY', 'GMKEY'),
	'gmtoken' => env('GMTOKEN', 'GMTOKEN'),
	'cep_source' => ''
];


use JadLog\Services;

...

$items = [
  [
    'price' => 10.00,
    'height' => 5,
    'width' => 5,
    'length' => 5,
    'weigth' => 0.5,
    'amount' => 1,
    'sku' => 'ABC',
  ]
];

$jadLog = new Services;

$result = [];

$responseJadLog = $jadLog->setCepDestiny('12345-678')
                ->setItems($items)
                ->get();

foreach($responseJadLog as $item) {
  $result[] = [
      'prazo' => $v->getTime(),
      'preco' => $v->getPrice(),
      'servico' => $v->getServiceName()
  ];
}


 php artisan vendor:publish