PHPackages                             2hmad/paytabs-with-laravel - 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. 2hmad/paytabs-with-laravel

ActiveLibrary[Payment Processing](/categories/payments)

2hmad/paytabs-with-laravel
==========================

Paytabs with Laravel

1.0.0.0(4y ago)662LGPL-3.0PHP

Since Feb 21Pushed 4y ago1 watchersCompare

[ Source](https://github.com/2hmad/paytabs-with-laravel)[ Packagist](https://packagist.org/packages/2hmad/paytabs-with-laravel)[ RSS](/packages/2hmad-paytabs-with-laravel/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Paytabs Laravel
===============

[](#paytabs-laravel)

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

[](#installation)

Begin by installing this package through Composer. Just run following command to terminal-

```
composer require ahmed-ibrahimm/paytabs-with-laravel
```

Once this operation completes the package will automatically be discovered for **Laravel 5.6 and above**, otherwise, the final step is to add the service provider. Open `config/app.php`, and add a new item to the providers array.

```
'providers' => [
	...
	Paytabs\PaytabsServiceProvider::class,
],
```

Now add the alias.

```
'aliases' => [
	...
	'Paytabs' => Paytabs\Facades\PaytabsFacade::class,
],
```

Example:
--------

[](#example)

### Create Payment Page:

[](#create-payment-page)

```
Route::get('/paytabs_payment', function () {
    $pt = Paytabs::getInstance("MERCHANT_EMAIL", "SECRET_KEY");
	$result = $pt->create_pay_page(array(
		"merchant_email" => "MERCHANT_EMAIL",
		'secret_key' => "SECRET_KEY",
		'title' => "John Doe",
		'cc_first_name' => "John",
		'cc_last_name' => "Doe",
		'email' => "customer@email.com",
		'cc_phone_number' => "973",
		'phone_number' => "33333333",
		'billing_address' => "Juffair, Manama, Bahrain",
		'city' => "Manama",
		'state' => "Capital",
		'postal_code' => "97300",
		'country' => "BHR",
		'address_shipping' => "Juffair, Manama, Bahrain",
		'city_shipping' => "Manama",
		'state_shipping' => "Capital",
		'postal_code_shipping' => "97300",
		'country_shipping' => "BHR",
		"products_per_title"=> "Mobile Phone",
		'currency' => "BHD",
		"unit_price"=> "10",
		'quantity' => "1",
		'other_charges' => "0",
		'amount' => "10.00",
		'discount'=>"0",
		"msg_lang" => "english",
		"reference_no" => "1231231",
		"site_url" => "https://your-site.com",
		'return_url' => "https://www.mystore.com/paytabs_api/result.php",
		"cms_with_version" => "API USING PHP"
	));

    	if($result->response_code == 4012){
	    return redirect($result->payment_url);
        }
        return $result->result;
});
```

### Verify Payment:

[](#verify-payment)

```
Route::post('/paytabs_response', function(Request $request){
    $pt = Paytabs::getInstance("MERCHANT_EMAIL", "SECRET_KEY");
    $result = $pt->verify_payment($request->payment_reference);
    if($result->response_code == 100){
        // Payment Success
    }
    return $result->result;
});

you will need to exclude your paytabs_response route from CSRF protection
```

###  Health Score

25

—

LowBetter than 40% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1489d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ceddeaee905794ace309aff20cf8d35ab0cc60de9cd0ef4623b4b1fef6c71f7?d=identicon)[2hmad](/maintainers/2hmad)

---

Top Contributors

[![2hmad](https://avatars.githubusercontent.com/u/32125808?v=4)](https://github.com/2hmad "2hmad (6 commits)")

---

Tags

laravellaravel-package

### Embed Badge

![Health badge](/badges/2hmad-paytabs-with-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/2hmad-paytabs-with-laravel/health.svg)](https://phpackages.com/packages/2hmad-paytabs-with-laravel)
```

###  Alternatives

[pishran/zarinpal

Zarinpal library for Laravel.

4628.2k](/packages/pishran-zarinpal)[gilbitron/spark-create-stripe-plans

A simple Laravel artisan command to create Spark plans in Stripe

1810.7k](/packages/gilbitron-spark-create-stripe-plans)[maksa988/laravel-freekassa

FreeKassa payments for Laravel

142.7k](/packages/maksa988-laravel-freekassa)[devinweb/laravel-youcan-pay

YouCanPay packages for Laravel that provides an easy way to reach the best experience.

111.1k](/packages/devinweb-laravel-youcan-pay)

PHPackages © 2026

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