PHPackages                             maree/paymob - 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. maree/paymob

ActiveLibrary[Payment Processing](/categories/payments)

maree/paymob
============

package to pay with paymob payment services

4131[1 issues](https://github.com/mohamedmaree/aait-paymob/issues)PHP

Since Apr 30Pushed 2y ago2 watchersCompare

[ Source](https://github.com/mohamedmaree/aait-paymob)[ Packagist](https://packagist.org/packages/maree/paymob)[ RSS](/packages/maree-paymob/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Paymob
======

[](#paymob)

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

[](#installation)

You can install the package via [Composer](https://getcomposer.org).

```
composer require maree/paymob
```

Publish your paymob config file with

```
php artisan vendor:publish --provider="maree\Paymob\PaymobServiceProvider" --tag="paymob"
```

then change your paymob config from config/paymob.php file

```
    "mode"                => "test",//live
    "API_KEY"             => "" ,
    "IFRAME_ID"           => "" ,
    "INTEGRATION_ID_TEST" => "",
    "INTEGRATION_ID_LIVE" => "",
```

Usage
-----

[](#usage)

- with \[ visa - master - mada \]

```
use Maree\Paymob\Paymob;
    $items = [
          [
            'name'         => 'pen',
            'amount_cents' => 10,
            'description'  => "Pen Invoice",
            'quantity'     => 1,
          ],
        ];

    $billing_data  = [
                "first_name"      => 'mohamed',
                "phone_number"    => '01002700084',
                "email"           => 'm7mdmaree26@gmail.com',
                "last_name"       => 'maree',
                "apartment"       => "10",
                "floor"           => "2",
                "street"          => "25 elrahman",
                "building"        => "40",
                "shipping_method" => "NA",
                "postal_code"     => "21532",
                "city"            => "Alexandria",
                "country"         => "EG",
                "state"           => "elnzha",
            ] ;
$response = Paymob::checkout($amount_cents = 100 , $items,$billing_data ,$delivery_needed = false);
//save $response['checkout_id'] in transactions history table
return redirect()->to($response['redirect_url'])->send();
```

note
----

[](#note)

- define (callback) the checkout return response url in your paymob account route EX :
- create route for response url 'payment-response' EX: Route::get('payment-response', 'PaymentsController@paymentResponse')-&gt;name('payment-response');
- create function for checkout response 'paymentResponse'
- use that function to check if payment failed or success

inside 'paymentresponse' function use:
--------------------------------------

[](#inside-paymentresponse-function-use)

```
use Maree\Paymob\Paymob;
$response = Paymob::checkoutResponseStatus();
$result = $response['result'];
//get checkout_id to update transaction history or order status to paid
$checkout_id = $result['order'];
```

return response like:

```
 ['key' => 'success' ,'msg' => 'checkout success' ,'result' => $payment_data ]
```

or

```
 ['key' => 'fail' , 'msg' => 'checkout failed','result' => $payment_data]
```

note: you can use response from data to save transactions in database - 'data' key contain params like 'amount' and transaction id

- Test Card Details
- Card Number: 2223000000000007
- CVV: 100
- Expiry Date: 01/39
- Card Name: Test Family
- Custom ECI: Leave Blank
- Custom CAVV: Leave Blank

documentaion files.
-------------------

[](#documentaion-files)

-
-

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e88e6da55b1e4b359544c3e94fab80c6f73b3ce7ac82afd1d872a41aeb349fa?d=identicon)[mohamedmaree](/maintainers/mohamedmaree)

---

Top Contributors

[![mohamedmaree](https://avatars.githubusercontent.com/u/12659069?v=4)](https://github.com/mohamedmaree "mohamedmaree (12 commits)")

### Embed Badge

![Health badge](/badges/maree-paymob/health.svg)

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

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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