PHP code example of seniorprogramming / fancourier

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

    

seniorprogramming / fancourier example snippets


FanCourier::city()

FanCourier::streets()

FanCourier::price()

FanCourier::trackAwb()

FanCourier::generateAwb()

FanCourier::order()

FanCourier::exportAwbErrors()

FanCourier::deleteAwb()

FanCourier::getAwb()

FanCourier::downloadAwb()

FanCourier::exportOrders()

FanCourier::exportBorderou()

FanCourier::exportReports()

FanCourier::exportObservations()

FanCourier::endBorderou()

FanCourier::city(['judet'=>'Constanta', 'language'=>'RO'])

FanCourier::city()

FanCourier::streets(['judet'=>'Bucuresti', 'localitate'=>'Bucuresti', 'language'=>'RO'])

FanCourier::streets()

FanCourier::price([
    'serviciu' => 'standard',
    'localitate_dest' => 'Targu Mures',
    'judet_dest' => 'Mures',
    'plicuri' => 1,
    'colete' => 2,
    'greutate' => 5,
    'lungime' => 10,
    'latime' => 10,
    'inaltime' => 10,
    'val_decl' => 600,
    'plata_ramburs' => 'destinatar',
    'plata_la' => 'destinatar',
])

FanCourier::price([
    'serviciu' => 'export',
    'modtrim' => 'rutier', //aerian
    'greutate' => 10.22,
    'pliccolet' => 3,
    's_inaltime' => 50,
    's_latime' => 67,
    's_lungime' => 48,
    'volum' => 400,
    'dest_tara' => 'Bulgaria',
    'tipcontinut' => 1,
    'km_ext' => 400,
    'plata_la' => 'destinatar',
])

FanCourier::generateAwb(['fisier' => [
    [
        'tip_serviciu' => 'standard', 
        'banca' => '',
        'iban' =>  '',
        'nr_plicuri' => 1,
        'nr_colete' => 0,
        'greutate' => 1,
        'plata_expeditie' => 'ramburs',
        'ramburs_bani' => 100,
        'plata_ramburs_la' => 'destinatar',
        'valoare_declarata' => 400,
        'persoana_contact_expeditor' => 'Test User',
        'observatii' => 'Lorem ipsum',
        'continut' => '',
        'nume_destinar' => 'Test',
        'persoana_contact' => 'Test',
        'telefon' => '123456789',
        'fax' => '123456789',
        'email' => '[email protected]',
        'judet' => 'Galati',
        'localitate' => 'Tecuci',
        'strada' => 'Lorem',
        'nr' => '2',
        'cod_postal' => '123456',
        'bl' => '',
        'scara' => '',
        'etaj'  => '',
        'apartament' => '',
        'inaltime_pachet' => '',
        'lungime_pachet' => '',
        'restituire' => '',
        'centru_cost' => '',
        'optiuni' => '',
        'packing' => '',
        'date_personale' => ''
    ],
    [
        'tip_serviciu' => 'Cont colector',
        'banca' => 'Test',
        'iban' =>  'XXXXXX',
        'nr_plicuri' => 0,
        'nr_colete' => 1,
        'greutate' => 1,
        'plata_expeditie' => 'ramburs',
        'ramburs_bani' => 400,
        'plata_ramburs_la' => 'destinatar',
        'valoare_declarata' => 400,
        'persoana_contact_expeditor' => 'Test User',
        'observatii' => 'Lorem ipsum',
        'continut' => 'Fragil',
        'nume_destinar' => 'Test',
        'persoana_contact' => 'Test',
        'telefon' => '123456789',
        'fax' => '123456789',
        'email' => '[email protected]',
        'judet' => 'Galati',
        'localitate' => 'Tecuci',
        'strada' => 'Lorem',
        'nr' => '2',
        'cod_postal' => '123456',
        'bl' => '',
        'scara' => '',
        'etaj'  => '',
        'apartament' => '',
        'inaltime_pachet' => '',
        'lungime_pachet' => '',
        'restituire' => '',
        'centru_cost' => '',
        'optiuni' => '',
        'packing' => '',
        'date_personale' => ''
    ]
]])

FanCourier::trackAwb([
    'AWB'=>'2337600120003', 
    'display_mode' => 3 //1 – last status, 2 – last record from history route, 3 – all history of the expedition
])

FanCourier::order([
    'nr_colete' => 1, // or 'nr_plicuri' => 1
    'pers_contact' => 'Test',
    'tel' => 123456789,
    'email' => '[email protected]',
    'greutate' => 1,
    'inaltime' => 10,
    'lungime' => 10,
    'latime' => 10,
    'ora_ridicare' => '18:00',
    'observatii' => '',
    'client_exp' => 'Test',
    'strada' => 'Test',
    'nr' => 1,
    'bloc' => 2,
    'scara' => 3,
    'etaj' => 7,
    'ap' => 78,
    'localitate' => 'Constanta',
    'judet' => 'Constanta',
])

FanCourier::exportServices()

FanCourier::exportAwbErrors()

FanCourier::getAwb([
    'nr'=>'2337600120003', //AWB
])

FanCourier::downloadAwb([
    'AWB'=>'2337600120003',
])

FanCourier::exportOrders(['data'=>'09.12.2016'])

FanCourier::exportBorderou(['data'=>'09.12.2016', 'mode'=> 0])

FanCourier::exportReports(['data'=>'09.12.2016'])

FanCourier::exportObservations()

FanCourier::endBorderou()