PHPackages                             devrkb21/czbd-courier - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. devrkb21/czbd-courier

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

devrkb21/czbd-courier
=====================

Laravel courier fraud and delivery behavior checker for Bangladesh couriers.

v1.0.0(2mo ago)03↓100%GPL-3.0-onlyPHPPHP ^8.2

Since Apr 9Pushed 2mo agoCompare

[ Source](https://github.com/devrkb21/czbd-courier)[ Packagist](https://packagist.org/packages/devrkb21/czbd-courier)[ Docs](https://github.com/devrkb21/czbd-courier)[ RSS](/packages/devrkb21-czbd-courier/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

CZBD Courier Checker
====================

[](#czbd-courier-checker)

Laravel package for checking customer delivery behavior across major Bangladeshi courier services.

[![Latest Version on Packagist](https://camo.githubusercontent.com/20f5f71232096187719016655d60f99cd98e3e3e0d29ed40bc6a50598d0e1e9b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646576726b6232312f637a62642d636f75726965722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/devrkb21/czbd-courier)[![Total Downloads](https://camo.githubusercontent.com/af2acf94b9a99039c3db7c930e1a244c6a78a7c33cae7d629304c33cb4a2efda/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646576726b6232312f637a62642d636f75726965722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/devrkb21/czbd-courier)[![License](https://camo.githubusercontent.com/603c4f82bf1c781741453c390aa6a7110f4904b8d5c74a3f5d3794f1566a8936/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f646576726b6232312f637a62642d636f75726965722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/devrkb21/czbd-courier)

What It Does
------------

[](#what-it-does)

- Queries multiple couriers with a single phone number input.
- Returns per-courier success/cancel counts and success ratio.
- Builds an aggregate summary across all couriers.
- Supports account failover pools per courier when one account is limited or fails.
- Supports optional global or per-courier HTTP proxy routing.

Supported couriers:

- Steadfast
- Pathao
- RedX
- Paperfly
- Carrybee

Requirements
------------

[](#requirements)

- PHP: `^8.2`
- Laravel: `^8.0|^9.0|^10.0|^11.0|^12.0|^13.0`
- Guzzle: `^7.8`

Installation
------------

[](#installation)

```
composer require devrkb21/czbd-courier
```

Publish config:

```
php artisan vendor:publish --provider="Czbd\\CourierChecker\\CourierCheckerServiceProvider" --tag="courier-checker-config"
```

This creates `config/courier-checker.php`.

You can still use Laravel's default tag when needed:

```
php artisan vendor:publish --tag="config"
```

Environment Configuration
-------------------------

[](#environment-configuration)

Add credentials to `.env`.

```
# Pathao
PATHAO_USER="your_pathao_email@example.com"
PATHAO_PASSWORD="your_pathao_password"
PATHAO_USERS="fallback1@example.com,fallback2@example.com"
PATHAO_PASSWORDS="pass1,pass2"

# Steadfast
STEADFAST_USER="your_steadfast_email@example.com"
STEADFAST_PASSWORD="your_steadfast_password"
STEADFAST_USERS="fallback1@example.com,fallback2@example.com"
STEADFAST_PASSWORDS="pass1,pass2"

# RedX (local 11-digit mobile format)
REDX_PHONE="017XXXXXXXX"
REDX_PASSWORD="your_redx_password"
REDX_PHONES="017XXXXXXXX,018XXXXXXXX"
REDX_PASSWORDS="pass1,pass2"

# Paperfly
PAPERFLY_USER="your_paperfly_username"
PAPERFLY_PASSWORD="your_paperfly_password"
PAPERFLY_USERS="fallback_user_1,fallback_user_2"
PAPERFLY_PASSWORDS="pass1,pass2"

# Carrybee (local 11-digit mobile format)
CARRYBEE_PHONE="017XXXXXXXX"
CARRYBEE_PASSWORD="your_carrybee_password"
CARRYBEE_PHONES="017XXXXXXXX,018XXXXXXXX"
CARRYBEE_PASSWORDS="pass1,pass2"

# Proxy flags (strict yes/no)
COURIER_PROXY_ALL="no"
COURIER_PROXY_PATHAO="no"
COURIER_PROXY_STEADFAST="no"
COURIER_PROXY_REDX="no"
COURIER_PROXY_PAPERFLY="no"
COURIER_PROXY_CARRYBEE="no"

# Shared proxy endpoint
COURIER_PROXY_ADDRESS="http://127.0.0.1:8080"
```

Configuration rules:

- Fallback pools are optional.
- Pool values are parsed from comma-separated or newline-separated lists.
- Fallback lists must be index-aligned. Example: 2 users must have 2 passwords.
- Proxy flags accept only `yes` or `no`. Any other value throws an exception.
- `COURIER_PROXY_ALL=yes` enables proxy for all couriers.
- `COURIER_PROXY_{COURIER}=yes` enables proxy only for that courier.

Usage
-----

[](#usage)

Using the facade:

```
use CourierChecker;

$report = CourierChecker::check('01712345678');
```

Using dependency injection:

```
use Czbd\CourierChecker\CourierCheckerManager;

public function show(CourierCheckerManager $manager)
{
  return $manager->check('01712345678');
}
```

Using individual service classes:

```
use Czbd\CourierChecker\Services\PathaoService;

$result = app(PathaoService::class)->getDeliveryStats('01712345678');
```

Response Shape
--------------

[](#response-shape)

```
[
  'steadfast' => [
    'success' => 10,
    'cancel' => 2,
    'total' => 12,
    'success_ratio' => 83.33,
  ],
  'pathao' => [
    'success' => 5,
    'cancel' => 1,
    'total' => 6,
    'success_ratio' => 83.33,
    'customer_rating' => 'trusted_customer', // optional
  ],
  'redx' => [...],
  'paperfly' => [...],
  'carrybee' => [...],
  'aggregate' => [
    'total_success' => 0,
    'total_cancel' => 0,
    'total_deliveries' => 0,
    'success_ratio' => 0.0,
    'cancel_ratio' => 0.0,
  ],
]
```

Validation and Error Behavior
-----------------------------

[](#validation-and-error-behavior)

- Phone input is validated with `^01[3-9][0-9]{8}$`.
- Service-level errors are returned as arrays with an `error` key.
- Manager-level exceptions are logged and wrapped per courier.

Testing
-------

[](#testing)

From package root:

```
composer install
composer test
```

Tests use mocked HTTP responses; live courier credentials are not required.

Security Notes
--------------

[](#security-notes)

- Do not expose raw courier credentials in logs or frontend output.
- Keep `.env` out of version control.
- Prefer least-privilege accounts for courier API access.

License
-------

[](#license)

This package is licensed under GPL-3.0-only. See `LICENSE.md`.

Maintainer
----------

[](#maintainer)

- Author: Rakib Uddin
- GitHub:
- Repository:

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance88

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

61d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/16e2f5b25c5828182e78315ed084f7648a54be3566b1c464899f610274f1b823?d=identicon)[devrkb21](/maintainers/devrkb21)

---

Top Contributors

[![devrkb21](https://avatars.githubusercontent.com/u/215704528?v=4)](https://github.com/devrkb21 "devrkb21 (1 commits)")

---

Tags

api integrationfraud detectionfraud preventionOrder Statuspathaosteadfast couriere-commerce fraudcourier bangladeshredxpaperflycarrybeecourier checker

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/devrkb21-czbd-courier/health.svg)

```
[![Health](https://phpackages.com/badges/devrkb21-czbd-courier/health.svg)](https://phpackages.com/packages/devrkb21-czbd-courier)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[spatie/laravel-export

Create a static site bundle from a Laravel app

670139.5k6](/packages/spatie-laravel-export)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1348.1k1](/packages/jasara-php-amzn-selling-partner-api)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1232.2k16](/packages/fleetbase-core-api)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
