PHP code example of buuum / tipsa
1. Go to this page and download the library: Download buuum/tipsa 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/ */
buuum / tipsa example snippets
$tipsa = new Tipsa($agent, $client, $password);
try{
$info = $tipsa->getByReference($referencia);
}catch (Exception $e){
echo $e->getMessage();
}
array (
0 =>
array (
'date' => '02/24/2017 19:58:29',
'code_type' => '1',
'code' => 'Tránsito',
),
1 =>
array (
'date' => '03/01/2017 07:29:59',
'code_type' => '2',
'code' => 'Reparto',
),
2 =>
array (
'date' => '03/01/2017 14:41:15',
'code_type' => '4',
'code' => 'Incidencia',
),
3 =>
array (
'date' => '03/02/2017 08:26:52',
'code_type' => '2',
'code' => 'Reparto',
),
4 =>
array (
'date' => '03/02/2017 13:11:18',
'code_type' => '3',
'code' => 'Entregado',
),
)
$date = '2017-02-08';
try{
$info = $tipsa->getEnviosByDate($date);
}catch (Exception $e){
echo $e->getMessage();
}
$date = '2017-02-08';
try{
$info = $tipsa->getEstadoEnviosByDate($date);
}catch (Exception $e){
echo $e->getMessage();
}
$date = '2017-02-08';
try{
$info = $tipsa->getIncidenciasByDate($date);
}catch (Exception $e){
echo $e->getMessage();
}