Coder Social home page Coder Social logo

redx-courier's Introduction

Redx Courier Banagladesh

This is a Laravel/PHP package for Redx BD Courier System. This package can be used in laravel or without laravel/php projects. You can use this package for headless/rest implementation as well as blade or regular mode development. We created this package while working for a project and thought to made it release for all so that it helps. This package is available as regular php composer package.

Features

  1. Fetch Redx delivery area list
  2. Create new store
  3. Store list
  4. Store details
  5. Create new parcel
  6. Parcel details
  7. Parcel tracking

Requirements

  • PHP >=7.2
  • Laravel >= 6

Installation

composer require codeboxr/redx-courier

vendor publish (config)

php artisan vendor:publish --provider="Codeboxr\RedxCourier\RedxCourierServiceProvider"

After publish config file setup your credential. you can see this in your config directory redx.php file

 "sandbox"      => env("REDX_SANDBOX", false),
 "access_token" => env("REDX_ACCESS_TOKEN", ""),

Set .env configuration

REDX_SANDBOX=true // for production mode use false
REDX_ACCESS_TOKEN=""

Usage

1. Get redx delivery area list

use Codeboxr\RedxCourier\Facade\RedxCourier

return RedxCourier::area()->list();

2. Create new store

use Codeboxr\RedxCourier\Facade\RedxCourier

return RedxCourier::store()
                        ->create([
                           "name"    => "", //store name
                           "phone"   => "", //store contact person 
                           "area_id" => "",
                           "address" => "",
                        ]);

3. Get Store List

use Codeboxr\RedxCourier\Facade\RedxCourier

return RedxCourier::store()->list();

4. Store Details

use Codeboxr\RedxCourier\Facade\RedxCourier

return RedxCourier::store()->storeDetails($storeId);

5. Create new parcel

use Codeboxr\RedxCourier\Facade\RedxCourier

return RedxCourier::order()
                        ->create([
                            "customer_name"          => "", 
                            "customer_phone"         => "",
                            "delivery_area"          => "", // delivery area name
                            "delivery_area_id"       => "", // area id
                            "customer_address"       => "", 
                            "merchant_invoice_id"    => "",
                            "cash_collection_amount" => "",
                            "parcel_weight"          => "", //parcel weight in gram
                            "instruction"            => "",
                            "value"                  => "", //compensation amount
                            "pickup_store_id"        => "", // store id
                            "parcel_details_json"    => ""
                        ]);

6. Get Order Details

use Codeboxr\RedxCourier\Facade\RedxCourier

return RedxCourier::order()->orderDetails($trackingId); // After successfully create order they given a tracking_id

7. Order tracking

use Codeboxr\RedxCourier\Facade\RedxCourier

return RedxCourier::order()->tracking($trackingId); // After successfully create order they given a tracking_id

Contributing

Contributions to the Redx package are welcome. Please note the following guidelines before submitting your pull request.

  • Follow PSR-4 coding standards.
  • Read Redx API documentations first

License

Redx package is licensed under the MIT License.

Copyright 2022 Codeboxr

redx-courier's People

Contributors

dipudey avatar manchumahara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.