Download the PHP package xenon/multicourier without Composer

On this page you can find all versions of the php package xenon/multicourier. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package multicourier

This is a courier api endpoints library for interacting such as e-courier, pathao etc

Installation

Step 1:

Step 2:

Then, publish the package

Step 3:

Set .env configuration for individual couriers

Otherwise, if you want more control, you can use the underlying sender object. This will not touch any laravel facade or service provider.

Sample Code Requesting to E-courier

use Xenon\MultiCourier\Provider\ECourier;
use Xenon\MultiCourier\Courier;

$courier = Courier::getInstance();
$courier->setProvider(ECourier::class, 'local'); /* local/production */
$courier->setConfig([
    'API-KEY' => 'xxx',
    'API-SECRET' => 'xxxx',
    'USER-ID' => 'xxxx',
]);
$courier->setParams(['city'=>'Dhaka']);
$thanas = $courier->getThanas(); //get thana
$cities = $courier->getCities(); //get city
//place order
use Xenon\MultiCourier\Provider\ECourier;
use Xenon\MultiCourier\Courier;

$courier = Courier::getInstance();
$courier->setProvider(ECourier::class, 'local'); /* local/production */
$courier->setConfig([
    'API-KEY' => 'xxx',
    'API-SECRET' => 'xxx',
    'USER-ID' => 'xxx',
]);
$orderData = array(
    'recipient_name' => 'XXXXX',
    'recipient_mobile' => '017XXXXX',
    'recipient_city' => 'Dhaka',
    'recipient_area' => 'Badda',
    'recipient_thana' => 'Badda',
    'recipient_address' => 'Full Address',
    'package_code' => '#XXXX',
    'product_price' => '1500',
    'payment_method' => 'COD',
    'recipient_landmark' => 'DBBL ATM',
    'parcel_type' => 'BOX',
    'requested_delivery_time' => '2019-07-05',
    'delivery_hour' => 'any',
    'recipient_zip' => '1212',
    'pick_hub' => '18490',
    'product_id' => 'DAFS',
    'pick_address' => 'Gudaraghat new mobile',
    'comments' => 'Please handle carefully',
    'number_of_item' => '3',
    'actual_product_price' => '1200',
    'pgwid' => 'XXX',
    'pgwtxn_id' => 'XXXXXX'
);

$courier->setParams($orderData);
$response = $courier->placeOrder();

Sample Code Requesting to Pathao

use Xenon\MultiCourier\Courier;
use Xenon\MultiCourier\Provider\Pathao;

$courier = Courier::getInstance();
$courier->setProvider(Pathao::class, 'local'); /* local/production */
$courier->setMethod('get');
$courier->setRequestEndpoint('cities/1/zone-list', []); //second param should be array. its optional. you should form params here
$response = $courier->send();

Available Methods to Interact with Provider's Api

getInstance()

getConfig()

setConfig()

getParams()

setParams()

getProvider()

setProvider()

getCities()

getThanas()

trackOrder()

trackChildOrder()

getPackages()

placeOrder()

cancelOrder()

cancelChildOrder()

fraudStatusCheck()

getAreas()

getPostCodes()

getBranches()

printLabel()

boostSms()

topupSms()

topTransactionStatus()

topupOtp()

Currently Supported Courier Gateways

We are continuously working in this open source library for adding more Bangladeshi courier companies. If you feel something is missing then make a issue regarding that. Your can pull request to dev branch. If you want to contribute in this library, then you are highly welcome to do that.... read blog from here
https://dev.to/arif98741/bangladeshi-courier-company-api-integration-in-laravel-using-xenon-multicourier-package-4m12


All versions of multicourier with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^6.3|^7.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xenon/multicourier contains the following files

Loading the files please wait ....