refatbd / bd-courier-fraud-checker
Check for fraudulent customers using Bangladeshi courier data.
Package info
github.com/refatbd/bd-courier-fraud-checker
pkg:composer/refatbd/bd-courier-fraud-checker
1.1.2
2026-05-05 11:01 UTC
Requires
- php: ^7.4|^8.0|^8.1|^8.2|^8.3
- ext-openssl: *
README
A Laravel package to detect fraudulent customers using Bangladeshi courier data (Steadfast, Pathao, Redx).
Maintained by refatbd
Installation
composer require refatbd/bd-courier-fraud-checker
Publish Config
php artisan vendor:publish --tag=bdcourierfraudchecker-config
Environment Variables
Add these to your .env file:
# Steadfast STEADFAST_USER=your_email@example.com STEADFAST_PASSWORD=your_password # Pathao PATHAO_USER=your_email@example.com PATHAO_PASSWORD=your_password # Redx REDX_PHONE=01XXXXXXXXX REDX_PASSWORD=your_password
Usage
use Refatbd\BdCourierFraudChecker\Facade\BdCourierFraudChecker; $result = BdCourierFraudChecker::check('01XXXXXXXXX');
Response Format
[
'steadfast' => [
'status' => true,
'message' => 'Successful.',
'data' => [
'success' => 45,
'cancel' => 5,
'total' => 50,
'deliveredPercentage' => 90.0,
'returnPercentage' => 10.0,
],
],
'pathao' => [ ... ],
'redx' => [ ... ],
]
Supported Couriers
| Courier | Status |
|---|---|
| Steadfast | ✅ |
| Pathao | ✅ |
| Redx | ✅ |
More couriers can be added easily — see Adding a New Courier.
Adding a New Courier
- Create a new class in
src/Courier/YourCourier.php:
<?php namespace Refatbd\BdCourierFraudChecker\Courier; use Refatbd\BdCourierFraudChecker\Traits\Helpers; class YourCourier { use Helpers; public function __construct() { $this->checkRequiredConfig(['your_courier_user', 'your_courier_password']); } public function check($phoneNumber) { $phoneNumber = $this->validateBDPhoneNumber($phoneNumber); // Add your API logic here return [ 'status' => true, 'message' => 'Successful.', 'data' => [], ]; } }
- Add credentials to
config/bdcourierfraudchecker.php:
"your_courier_user" => env("YOUR_COURIER_USER", ""), "your_courier_password" => env("YOUR_COURIER_PASSWORD", ""),
-
Inject it into
CourierCheckerServiceand add to thecheck()return array. -
Bind it in
BdCourierFraudCheckerServiceProvider.
License
MIT