WP Manifestindependent plugin directory
manifest / ecommerce / fraud-checker-bd

Fraud Checker BD

Analyze customer delivery history across Steadfast, Pathao, RedX, Paperfly, and CarryBee couriers. WooCommerce order fraud checking for Bangladesh.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/coderjahidul/fraud-checker-bd/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

WooCommerce plugin that checks a customer’s parcel delivery history across major Bangladeshi couriers. Use it to spot high-risk COD buyers before you ship.

Supported couriers: Steadfast, Pathao, RedX, Paperfly, CarryBee


Requirements

Item Version
WordPress 5.8+
PHP 7.4+
WooCommerce 5.0+

Compatible with WooCommerce HPOS (High-Performance Order Storage).


Installation

  1. Upload the fraud-checker-bd folder to wp-content/plugins/.
  2. Activate Fraud Checker BD under Plugins.
  3. Open Fraud Checker BD in the admin menu and enter courier credentials.
  4. Save settings.

Optional (Composer):

cd wp-content/plugins/fraud-checker-bd
composer install --no-dev

A PSR-4 fallback autoloader is included if Composer vendor files are missing.


Configuration

Go to Fraud Checker BD in the WordPress admin.

General

Setting Description Default
Cache Duration How long (seconds) a phone check is cached 3600
REST API Enable /wp-json/fraud-checker/v1/check On

Couriers

Enable each courier and add its merchant login:

Courier Credentials
Steadfast Username + password
Pathao Username + password
RedX Phone + password
Paperfly Username + password
CarryBee Phone + password

Couriers without credentials (or disabled) show as Courier not configured in results.


Features

1. Order meta box

On any WooCommerce order edit screen (classic or HPOS):

  1. Open the order.
  2. Find the Fraud Checker BD sidebar box.
  3. Confirm or edit the customer phone (01XXXXXXXXX).
  4. Click Check History.
  5. Use Refresh History to bypass cache and fetch again.

2. Parcel Ratio column (orders list)

On WooCommerce → Orders (admin.php?page=wc-orders):

  1. Find the Parcel Ratio column.
  2. Click the orange Ratio button.
  3. A popup shows:
    • Order number, customer name, phone
    • Summary cards: Success Ratio, Cancel Ratio, Delivered, Canceled
    • Per-courier table: Success / Cancel / Total / Success Ratio
  4. After a successful check, a color badge (green / yellow / red) appears in the list for cached results.

Works on both classic post-based orders and HPOS.

3. REST API

Endpoint

GET /wp-json/fraud-checker/v1/check?phone=01XXXXXXXXX

Query params

Param Required Description
phone Yes BD mobile (01XXXXXXXXX, +8801… also accepted)
refresh No true to skip cache

Auth: must be logged in with manage_woocommerce or edit_shop_orders.

Example

curl -u 'admin:PASSWORD' \
  'https://example.com/wp-json/fraud-checker/v1/check?phone=01712345678'

Example success payload (shape)

{
  "phone": "01712345678",
  "from_cache": false,
  "aggregate": {
    "total_success": 144,
    "total_cancel": 2,
    "total_deliveries": 146,
    "success_ratio": 98.63,
    "cancel_ratio": 1.37
  },
  "steadfast": { "success": 9, "cancel": 0, "total": 9, "success_ratio": 100 },
  "pathao": { "success": 0, "cancel": 0, "total": 0, "success_ratio": 0 },
  "redx": { "success": 135, "cancel": 2, "total": 137, "success_ratio": 98.54 },
  "paperfly": { "skipped": true, "message": "…" },
  "carrybee": { "skipped": true, "message": "…" }
}

Phone numbers

Numbers are normalized to local BD format: 01XXXXXXXXX.

Accepted inputs include:

  • 01712345678
  • 8801712345678
  • +8801712345678

Invalid numbers are rejected before any courier call.


Permissions

Action Capability
Plugin settings manage_options
Check history (AJAX / REST / order UI) manage_woocommerce or edit_shop_orders

File structure

fraud-checker-bd/
├── fraud-checker-bd.php          # Bootstrap
├── includes/
│   ├── Admin/SettingsPage.php
│   ├── Ajax/FraudCheckHandler.php
│   ├── Api/RestController.php
│   ├── Core/Plugin.php
│   ├── Helpers/                  # Settings, phone, HTTP, helpers
│   ├── Services/                 # Couriers + FraudCheckerManager + cache
│   └── WooCommerce/
│       ├── OrderMetaBox.php      # Order edit sidebar
│       └── OrderListColumn.php   # Parcel Ratio column + popup
├── assets/css/admin.css
├── assets/js/admin.js
├── templates/
│   ├── admin-settings.php
│   └── order-metabox.php
└── languages/

Troubleshooting

Issue What to check
Ratio button disabled Order has no valid BD billing/shipping phone
“Courier not configured” Enable courier and save credentials
Empty / error results Merchant login valid? Courier portal reachable?
REST returns 403 REST API enabled in settings? User capability OK?
Column missing Hard-refresh admin; confirm plugin is active and WooCommerce is active

License

GPL-2.0-or-later

Author

Grocoder

fraud-checker-bd