Download the PHP package azmolla/fraud-checker-bd-courier-laravel without Composer
On this page you can find all versions of the php package azmolla/fraud-checker-bd-courier-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download azmolla/fraud-checker-bd-courier-laravel
More information about azmolla/fraud-checker-bd-courier-laravel
Files in azmolla/fraud-checker-bd-courier-laravel
Package fraud-checker-bd-courier-laravel
Short Description A fraud detection tool for e-commerce platforms to analyze customer order behavior across Steadfast, RedX, Pathao, Paperfly, and Carrybee couriers.
License GPL-3.0
Homepage https://github.com/AbiruzzamanMolla/Fraud-Checker-BD-Courier-Laravel
Informations about the package fraud-checker-bd-courier-laravel
๐ก๏ธ Fraud-Checker-BD-Courier-Laravel
A powerful Laravel package to analyze customer delivery behavior across top Bangladeshi courier services.
[](https://packagist.org/packages/azmolla/fraud-checker-bd-courier-laravel) [](https://packagist.org/packages/azmolla/fraud-checker-bd-courier-laravel) [](https://packagist.org/packages/azmolla/fraud-checker-bd-courier-laravel) [](https://packagist.org/packages/azmolla/fraud-checker-bd-courier-laravel)๐ 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
- ๐ 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
- PHP:
^8.2.0 - Laravel:
8.x,9.x,10.x,11.x,12.x, or13.x - Guzzle:
^7.8
๐ฆ Installation
1. Install via Composer:
2. Publish Configuration File:
(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
To authenticate with the respective courier APIs, strictly add your credentials to your application's .env file:
๐ Quick Start
Checking a customer's fraud probability is a one-liner using the provided Facade.
๐ฅ๏ธ API Response GUI
๐ Structural Response Example
The package returns a highly structured array indicating individual and aggregated network metrics:
๐ ๏ธ 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
If you only need to run analytics against a single courier, avoid the Facade overhead and use the specific service classes directly:
๐ฑ 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:
๐งช 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.
๐ Acknowledgments
Special thanks to S. Ahmad for the initial inspiration and discovering the API endpoints of Steadfast, Pathao.
โ๐ป Created By
Abiruzzaman Molla
- ๐ง Email: [email protected]
- ๐ GitHub Profile: @AbiruzzamanMolla
- ๐ฆ Repository: Fraud-Checker-BD-Courier-Laravel
All versions of fraud-checker-bd-courier-laravel with dependencies
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
guzzlehttp/guzzle Version ^7.8