PHP code example of adly / easyparcel

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

    

adly / easyparcel example snippets

bash
php artisan vendor:publish --provider="Adly\EasyParcel\EasyParcelServiceProvider"
bash
$array = [
    [
        'pick_code'    => '55100',
        'pick_state'    => 'kul',
        'pick_country'    => 'MY',
        'send_code'    => '22200',
        'send_state'    => 'trg',
        'send_country'    => 'MY',
        'weight'    => '5',
        'date_coll'    => '2017-11-08',
    ]
];

$exclude = '';

return EasyParcel::priceCheck($array, $exculde);
bash
$array = [
    [
        // refer EasyParcel API Documentation
    ]
];

return EasyParcel::makingOrder($array);
bash
$array = [
    [
        // refer EasyParcel API Documentation
    ]
];

return EasyParcel::orderPayment($array);
bash
$array = [
    [
        // refer EasyParcel API Documentation
    ]
];

return EasyParcel::orderStatus($array);
bash
$array = [
    [
        // refer EasyParcel API Documentation
    ]
];

return EasyParcel::parcelStatus($array);
bash
$array = [
    [
        // refer EasyParcel API Documentation
    ]
];

return EasyParcel::trackingParcel($array);
bash
$array = [
    [
        // refer EasyParcel API Documentation
    ]
];

$courier = 'DHL eCommerce, Poslaju'; // Must has one courier at least

$dropoff = false;

return EasyParcel::domesticOrder($array, $courier, $dropoff);