PHPackages                             azmolla/fraud-checker-bd-courier-laravel - 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. azmolla/fraud-checker-bd-courier-laravel

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

azmolla/fraud-checker-bd-courier-laravel
========================================

A fraud detection tool for e-commerce platforms to analyze customer order behavior across Steadfast, RedX, Pathao, Paperfly, and Carrybee couriers.

v0.1.3(1mo ago)313↑1053.8%1GPL-3.0PHPPHP ^8.0

Since Mar 7Pushed 1mo agoCompare

[ Source](https://github.com/AbiruzzamanMolla/Fraud-Checker-BD-Courier-Laravel)[ Packagist](https://packagist.org/packages/azmolla/fraud-checker-bd-courier-laravel)[ Docs](https://github.com/AbiruzzamanMolla/Fraud-Checker-BD-Courier-Laravel)[ RSS](/packages/azmolla-fraud-checker-bd-courier-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (10)Used By (0)

🛡️ Fraud-Checker-BD-Courier-Laravel
===================================

[](#️-fraud-checker-bd-courier-laravel)

**A powerful Laravel package to analyze customer delivery behavior across top Bangladeshi courier services.**

[![Latest Version on Packagist](https://camo.githubusercontent.com/c29fba9f62262343404f7fee6884de4d2e1d4f1e259f06a723b831c6f2baadab/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617a6d6f6c6c612f66726175642d636865636b65722d62642d636f75726965722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/azmolla/fraud-checker-bd-courier-laravel)[![Total Downloads](https://camo.githubusercontent.com/42bb3eb23dbc33628204c026870498bb14161b1acbf24c1a884f1b45d00e5241/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f617a6d6f6c6c612f66726175642d636865636b65722d62642d636f75726965722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/azmolla/fraud-checker-bd-courier-laravel)[![License](https://camo.githubusercontent.com/14378a92c05b59a6b16c1e7caab6fb62166dfde2fa226f5c61685e2a49fc64f1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f617a6d6f6c6c612f66726175642d636865636b65722d62642d636f75726965722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/azmolla/fraud-checker-bd-courier-laravel)[![PHP Version Require](https://camo.githubusercontent.com/41668f7a6df1bd923f8033cd576b7d67216041c510a0b207484cc8a545d4a4eb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f617a6d6f6c6c612f66726175642d636865636b65722d62642d636f75726965722d6c61726176656c3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/azmolla/fraud-checker-bd-courier-laravel)

---

📌 Introduction
--------------

[](#-introduction)

E-commerce businesses in Bangladesh often face significant losses due to fraudulent orders and high return rates. **Fraud-Checker-BD-Courier-Laravel** protects your bottom line by instantly analyzing a customer's track record across major logistics providers (**Steadfast**, **Pathao**, **RedX**, **Paperfly**, and **Carrybee**).

By checking a simple phone number, you get immediate insights into a customer's success and cancellation ratios, helping you decide whether to approve, verify, or reject cash-on-delivery (COD) shipments.

🎯 Key Capabilities
------------------

[](#-key-capabilities)

- 🔍 **Multi-Courier Analytics:** Fetch delivery histories simultaneously from Steadfast, Pathao, RedX, Paperfly, and Carrybee.
- 📊 **Aggregated Statistics:** Get a unified view of total deliveries, successes, cancellations, and percentages.
- 📱 **Smart Number Validation:** Built-in strictly enforced validation for standard Bangladeshi mobile numbers (e.g., `017XXXXXXXX`).
- 📝 **Automated Error Logging:** Exceptions from any courier service are automatically logged into Laravel's default log file without breaking the main flow.
- 🏗️ **SOLID Architecture:** Highly decoupled under the hood. You can easily interact with individual couriers thanks to strict contract implementations.
- ⚡ **Developer Friendly:** Simple Facade access and effortless Laravel integration.

---

💻 Requirements
--------------

[](#-requirements)

- **PHP:** `^8.2.0`
- **Laravel:** `8.x`, `9.x`, `10.x`, `11.x`, `12.x`, or `13.x`
- **Guzzle:** `^7.8`

---

📦 Installation
--------------

[](#-installation)

**1. Install via Composer:**

```
composer require azmolla/fraud-checker-bd-courier-laravel
```

**2. Publish Configuration File:**

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

*(This will create a `config/fraud-checker-bd-courier.php` file in your application directory.)*

*(Note: Laravel Auto-Discovery is fully supported. If you are using Laravel 5.4 or older, you will need to manually register the Service Provider and Facade in `config/app.php`.)*

---

🧩 Environment Setup
-------------------

[](#-environment-setup)

To authenticate with the respective courier APIs, strictly add your credentials to your application's `.env` file:

```
# Pathao Credentials
PATHAO_USER="your_pathao_email@example.com"
PATHAO_PASSWORD="your_pathao_password"

# Steadfast Credentials
STEADFAST_USER="your_steadfast_email@example.com"
STEADFAST_PASSWORD="your_steadfast_password"

# RedX Credentials
# Use your registered phone number (without +880, e.g., 01*********)
REDX_PHONE="your_redx_login_phone_number"
REDX_PASSWORD="your_redx_password"

# Paperfly Credentials
PAPERFLY_USER="your_paperfly_username"
PAPERFLY_PASSWORD="your_paperfly_password"

# Carrybee Credentials
CARRYBEE_PHONE="your_carrybee_phone"
CARRYBEE_PASSWORD="your_carrybee_password"
```

---

🚀 Quick Start
-------------

[](#-quick-start)

Checking a customer's fraud probability is a one-liner using the provided Facade.

```
use FraudCheckerBdCourier;

// Input a standard 11-digit Bangladeshi mobile number
$report = FraudCheckerBdCourier::check('01*********');

dump($report);
```

### 🖥️ API Response GUI

[](#️-api-response-gui)

[![API Response GUI](Screenshot%202026-03-07%20122633.png)](Screenshot%202026-03-07%20122633.png)

### 📈 Structural Response Example

[](#-structural-response-example)

The package returns a highly structured array indicating individual and aggregated network metrics:

```
[
    'steadfast' => ['success' => 3, 'cancel' => 1, 'total' => 4, 'success_ratio' => 75.0],
    'pathao'    => ['success' => 5, 'cancel' => 2, 'total' => 7, 'success_ratio' => 71.43],
    'redx'      => ['success' => 20, 'cancel' => 5, 'total' => 25, 'success_ratio' => 80.0],
    'paperfly'  => ['success' => 0, 'cancel' => 0, 'total' => 1, 'success_ratio' => 0.0],
    'carrybee'  => ['success' => 10, 'cancel' => 0, 'total' => 10, 'success_ratio' => 100.0],

    // The summary across all supported couriers
    'aggregate' => [
        'total_success'    => 38,
        'total_cancel'     => 8,
        'total_deliveries' => 47,
        'success_ratio'    => 80.85,
        'cancel_ratio'     => 17.02
    ]
]
```

---

🛠️ Advanced Usage (SOLID Design)
--------------------------------

[](#️-advanced-usage-solid-design)

For granular control, the package is architected using SOLID principles. Every courier class adheres to `Azmolla\FraudCheckerBdCourier\Contracts\CourierServiceInterface`, guaranteeing a uniform `getDeliveryStats(string $phoneNumber): array` signature.

### Instantiating Individual Services

[](#instantiating-individual-services)

If you only need to run analytics against a single courier, avoid the Facade overhead and use the specific service classes directly:

```
use Azmolla\FraudCheckerBdCourier\Services\PathaoService;
use Azmolla\FraudCheckerBdCourier\Services\SteadfastService;
use Azmolla\FraudCheckerBdCourier\Services\RedxService;
use Azmolla\FraudCheckerBdCourier\Services\PaperflyService;
use Azmolla\FraudCheckerBdCourier\Services\CarrybeeService;

$steadfastData = (new SteadfastService())->getDeliveryStats('01*********');
$redxData      = (new RedxService())->getDeliveryStats('01*********');
$pathaoData    = (new PathaoService())->getDeliveryStats('01*********');
$paperflyData  = (new PaperflyService())->getDeliveryStats('01*********');
$carrybeeData  = (new CarrybeeService())->getDeliveryStats('01*********');
```

---

📱 Phone Validation Helper
-------------------------

[](#-phone-validation-helper)

Numbers are strictly validated against `^01[3-9][0-9]{8}$` to prevent unnecessary API failures.

- ✅ **Valid:** `01*********`, `01876543219`
- ❌ **Invalid:** `+8801*********`, `1234567890`, `02171234567`

You can manually trigger this validation check:

```
use Azmolla\FraudCheckerBdCourier\Helpers\CourierDataValidator;

CourierDataValidator::checkBdMobile('01*********');
// Throws InvalidArgumentException if formatting fails
```

---

🧪 Testing
---------

[](#-testing)

The package includes an extensive test suite built with `orchestra/testbench` and `phpunit`. API calls are safely mocked, meaning you do not need live `.env` credentials to confidently run tests locally.

```
composer test
# Or if you don't have scripts defined:
./vendor/bin/phpunit
```

---

🙏 Acknowledgments
-----------------

[](#-acknowledgments)

Special thanks to **[S. Ahmad](https://github.com/ShahariarAhmad)** for the initial inspiration and discovering the API endpoints of Steadfast, Pathao.

---

‍💻 Created By
-------------

[](#‍-created-by)

**Abiruzzaman Molla**

- 📧 Email:
- 🐙 GitHub Profile: [@AbiruzzamanMolla](https://github.com/AbiruzzamanMolla)
- 📦 Repository: [Fraud-Checker-BD-Courier-Laravel](https://github.com/AbiruzzamanMolla/Fraud-Checker-BD-Courier-Laravel)

 *If you find this package helpful in fighting fraudulent orders, please consider starring the repository! ⭐ I hate arguing. If you have something to contribute or improve, please fork the repository, make your edits, and then submit a pull request.*

 [ ![Buy Me A Coffee](https://camo.githubusercontent.com/0cf29a542375e1a46e84d8bf5805a4e5c0a6ee98b6547ccdc0c55eed49d99c69/68747470733a2f2f63646e2e6275796d6561636f666665652e636f6d2f627574746f6e732f76322f64656661756c742d79656c6c6f772e706e67) ](https://www.supportkori.com/abiruzzaman)

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance89

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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

Every ~2 days

Total

7

Last Release

57d ago

PHP version history (2 changes)v0.0.1PHP ^8.2.0

v0.1.1PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/b41cb18525b16c14035754555d6bb1b1a04f4684e00b72ba571e1f0e2f283b61?d=identicon)[AbiruzzamanMolla](/maintainers/AbiruzzamanMolla)

---

Top Contributors

[![AbiruzzamanMolla](https://avatars.githubusercontent.com/u/20683047?v=4)](https://github.com/AbiruzzamanMolla "AbiruzzamanMolla (15 commits)")

---

Tags

bdbd-courierecommerce-websitelaravel-frameworklaravel-packageapi integrationfraud detectionfraud preventionOrder Statusfraud checkerpathaosteadfast couriere-commerce fraudcourier bangladeshredxpaperflycarrybee

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/azmolla-fraud-checker-bd-courier-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/azmolla-fraud-checker-bd-courier-laravel/health.svg)](https://phpackages.com/packages/azmolla-fraud-checker-bd-courier-laravel)
```

###  Alternatives

[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)[aedart/athenaeum

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

255.2k](/packages/aedart-athenaeum)[ashallendesign/favicon-fetcher

A Laravel package for fetching website's favicons.

190272.4k3](/packages/ashallendesign-favicon-fetcher)[beyondcode/laravel-favicon

Create dynamic favicons based on your environment settings.

37345.5k](/packages/beyondcode-laravel-favicon)[ankurk91/laravel-ses-webhooks

Handle AWS SES webhooks in Laravel php framework

2534.2k](/packages/ankurk91-laravel-ses-webhooks)[bjuppa/laravel-blog

Add blog functionality to your Laravel project

483.3k2](/packages/bjuppa-laravel-blog)

PHPackages © 2026

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