fathallah/paymob-bagisto-package

Paymob Payment Method for Bagisto 2.x - Extended with Automated Refund Support

Maintainers

Package info

github.com/fathallah7/paymob-bagisto-package

pkg:composer/fathallah/paymob-bagisto-package

Transparency log

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-07-31 21:45 UTC

This package is not auto-updated.

Last update: 2026-08-01 20:19:16 UTC


README

An extended and improved version of the official Paymob Payment module for Bagisto 2.x.

In addition to the standard checkout functionality, this package introduces automatic refund synchronization with Paymob.

Features

  • Paymob payment gateway integration for Bagisto 2.x
  • Secure checkout using Paymob Checkout
  • Automatic Refund synchronization with Paymob
  • Queue-based refund processing for better performance

Installation

Install the package via Composer:

composer require fathallah/paymob-bagisto-package

Publish the package assets and run the migrations:

php artisan vendor:publish --force --tag=paymob
php artisan migrate
php artisan optimize

CSRF Configuration

Open:

app/Http/Middleware/VerifyCsrfToken.php

Add the Paymob callback endpoint to the $except array:

protected $except = [
    'paymob/callback',
];

This allows Paymob to send secure callback requests without CSRF verification.

Cache Configuration

Run:

php artisan config:cache

Step 1 — Obtain Your Paymob Credentials

Login to your Paymob Dashboard.

Navigate to:

Settings

Collect the following values:

  • Secret Key
  • Public Key
  • HMAC
  • Integration IDs (Payment Method IDs)

Step 2 — Configure Bagisto

Open the Bagisto Admin Panel.

Navigate to:

Configure
    → Sales
        → Payment Methods
            → Paymob

Fill in:

  • Secret Key
  • Public Key
  • HMAC
  • Integration IDs

If you have multiple payment methods, separate the Integration IDs using commas.

Example:

123456,789654,456123

These Integration IDs determine which payment methods appear during checkout.

Step 3 — Queue

Start a queue worker:

php artisan queue:work