PHPackages                             xahmedtaha/paybridge - 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. [Payment Processing](/categories/payments)
4. /
5. xahmedtaha/paybridge

ActiveLibrary[Payment Processing](/categories/payments)

xahmedtaha/paybridge
====================

A versatile laravel package providing a consistent and easy-to-use interface for integrating with multiple payment gateways.

v0.1.3(1y ago)02[3 PRs](https://github.com/xahmedtaha/paybridge/pulls)MITPHPPHP ^8.1CI passing

Since Sep 14Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/xahmedtaha/paybridge)[ Packagist](https://packagist.org/packages/xahmedtaha/paybridge)[ Docs](https://github.com/xahmedtaha/paybridge)[ GitHub Sponsors]()[ RSS](/packages/xahmedtaha-paybridge/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (11)Versions (9)Used By (0)

PayBridge
=========

[](#paybridge)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a0a5cf6b9eff2223ec8c3a949b93421c144bf1ce0ee25e0edfc72a2538f3b604/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7861686d6564746168612f7061796272696467652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/xahmedtaha/paybridge)[![GitHub Tests Action Status](https://camo.githubusercontent.com/c69bab0edbee699c9d7d074f40ced782ff2a864e4701755e4b28c9e4583ddd81/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7861686d6564746168612f7061796272696467652f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/xahmedtaha/paybridge/actions?query=workflow%3Arun-tests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/b814bcb27e7e902ff1d6c30dab1a7b902f09fbd315a4629e795dab6ecba1d528/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7861686d6564746168612f7061796272696467652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/xahmedtaha/paybridge)

A versatile laravel package providing a consistent and easy-to-use interface for integrating with multiple payment gateways.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require xahmedtaha/paybridge
```

You can publish the config file with:

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

Usage
-----

[](#usage)

You should typically use the package as follows:

```
use AhmedTaha\PayBridge\Data\ChargeData;
use AhmedTaha\PayBridge\Data\CustomerData;
use AhmedTaha\PayBridge\Data\Payment\CreditCardData;
use AhmedTaha\PayBridge\Enums\PaymentEnvironment;
use AhmedTaha\PayBridge\Enums\PaymentGateway;

$charge = new ChargeData('charge ID', 200, 'USD');
$customer = new CustomerData('customer ID', 'Ahmed', 'phone', 'email@test.com');
$paymentData = new CreditCardData('1234 1234 1234 1234', '24', '05', '123');

$result = PayBridge::setEnvironment(PaymentEnvironment::TESTING)
    ->gateway(PaymentGateway::FawryPay)
    ->pay($charge, $customer, $paymentData);

// $result = [
//  'success' => true,
//  'status' => PaymentStatus::PENDING,
//  'shouldRedirect' => true,
//  'redirectUrl' => 'fawry gateway url...',
//];
```

A callback url should be defined in the config files. Here is how the code for this route should typically be:

```
use PayBridge;
use AhmedTaha\PayBridge\Enums\PaymentGateway;
use AhmedTaha\PayBridge\Enums\PaymentEnvironment;
use Illuminate\Http\Request;

public function callbackRouteHandler(Request $request) {
    $result = PayBridge::setEnvironment(PaymentEnvironment::TESTING)
    ->gateway(PaymentGateway::FawryPay)
    ->callback($request);
    // Your additional app logic...
}

// $result = [
//  'success' => true,
//  'status' => PaymentStatus::PAID,
//  'charge' => ChargeData object,
//  'customer' => CustomerData object,
//  'referenceNumber' => 'fawry ref no',
//];
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Ahmed Taha](https://github.com/xahmedtaha)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance66

Regular maintenance activity

Popularity2

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80.6% 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 ~0 days

Total

4

Last Release

609d ago

PHP version history (2 changes)v0.1.0PHP ^8.2

v0.1.3PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/0832760153cf72aa8b358edf12c0e8fae15363d9e1e9ad62729e92003215ae57?d=identicon)[xahmedtaha](/maintainers/xahmedtaha)

---

Top Contributors

[![xahmedtaha](https://avatars.githubusercontent.com/u/26720111?v=4)](https://github.com/xahmedtaha "xahmedtaha (25 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")

---

Tags

laravelAhmed Tahapaybridge

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/xahmedtaha-paybridge/health.svg)

```
[![Health](https://phpackages.com/badges/xahmedtaha-paybridge/health.svg)](https://phpackages.com/packages/xahmedtaha-paybridge)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[muhammadhuzaifa/telescope-guzzle-watcher

Telescope Guzzle Watcher provide a custom watcher for intercepting http requests made via guzzlehttp/guzzle php library. The package uses the on\_stats request option for extracting the request/response data. The watcher intercept and log the request into the Laravel Telescope HTTP Client Watcher.

98239.8k1](/packages/muhammadhuzaifa-telescope-guzzle-watcher)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[danestves/laravel-polar

A package to easily integrate your Laravel application with Polar.sh

7812.3k](/packages/danestves-laravel-polar)[spatie/laravel-mailcoach-sdk

An SDK to easily work with the Mailcoach API in Laravel apps

41290.2k1](/packages/spatie-laravel-mailcoach-sdk)

PHPackages © 2026

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