PHPackages                             mohzubiri/laravel-esadad - 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. mohzubiri/laravel-esadad

ActiveLibrary[Payment Processing](/categories/payments)

mohzubiri/laravel-esadad
========================

Laravel package for e-SADAD payment gateway integration

1.0.13(10mo ago)010MITPHPPHP ^8.1|^8.2|^8.3

Since Jun 21Pushed 10mo agoCompare

[ Source](https://github.com/MohZubiri/E-sadadSoapPackage)[ Packagist](https://packagist.org/packages/mohzubiri/laravel-esadad)[ RSS](/packages/mohzubiri-laravel-esadad/feed)WikiDiscussions master Synced 1mo ago

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

Laravel e-SADAD Payment Gateway
===============================

[](#laravel-e-sadad-payment-gateway)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1eebfe0248410b3358cb6942ddd647f69894846cb0b5b226810ff9089b1dc0b8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f687a75626972692f6c61726176656c2d6573616461642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mohzubiri/laravel-esadad)[![Total Downloads](https://camo.githubusercontent.com/3e9bdbeae1ab5fa3ddcb4d55773f3630a0066e249f501b99cea39cb3dc69fe76/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6f687a75626972692f6c61726176656c2d6573616461642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mohzubiri/laravel-esadad)[![License](https://camo.githubusercontent.com/4f1776c59ab3fe25bd34cf7ffa1077a6b9f7b965e25f78104b400d1ba453265e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d6f687a75626972692f6c61726176656c2d6573616461642e7376673f7374796c653d666c61742d737175617265)](https://github.com/MohZubiri/E-sadadSoapPackage/blob/main/LICENSE)[![PHP Version](https://camo.githubusercontent.com/b4c9ed8546d52e4aedf05c439d81d663c67309e0038fc95d089620115add8dbe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6d6f687a75626972692f6c61726176656c2d6573616461642e7376673f7374796c653d666c61742d737175617265)](https://php.net/)[![Laravel Version](https://camo.githubusercontent.com/186622ede07aaa9554895785cca82aff068b161ab2e816f96688209b040504f8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31302e7825374331312e7825374331322e782d4646324432303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c)](https://laravel.com)

A Laravel package for integrating with the e-SADAD payment gateway. This package provides a simple and clean API to process payments through the e-SADAD payment system. The package is now more stable and includes several improvements for better integration with Laravel applications, including full support for Laravel 12.

Features
--------

[](#features)

- Easy integration with Laravel applications
- Support for all e-SADAD payment operations
- Clean and modern UI for payment forms
- Configurable routes and views
- Comprehensive error handling and logging
- Support for multiple currencies
- Secure transaction processing

Requirements
------------

[](#requirements)

- PHP 8.1 or higher (PHP 8.3 supported)
- Laravel 10.0 or higher
- Required PHP Extensions:
    - OpenSSL
    - cURL
    - JSON
    - XML
    - SOAP
    - Mbstring
    - Fileinfo
- Java (for signature generation)
- Composer for dependency management

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

[](#installation)

### For Laravel Applications

[](#for-laravel-applications)

1. Install the package via Composer:

```
composer require mohzubiri/laravel-esadad:^1.0.14
```

2. Publish the configuration file:

```
php artisan vendor:publish --provider="MohZubiri\\ESadad\\Providers\\ESadadServiceProvider" --tag="esadad-config"
```

3. Publish the views (optional, only if you want to customize them):

```
php artisan vendor:publish --provider="MohZubiri\\ESadad\\Providers\\ESadadServiceProvider" --tag="esadad-views"
```

4. Publish the assets (CSS, JS, images):

```
php artisan vendor:publish --provider="MohZubiri\\ESadad\\Providers\\ESadadServiceProvider" --tag="esadad-assets"
```

5. Run the migrations:

```
php artisan migrate
```

Or use the install command for a guided installation:

```
php artisan esadad:install
```

Changelog
---------

[](#changelog)

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

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Mohammed Zubiri](https://github.com/MohZubiri)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

### Manual Installation (For Package Development)

[](#manual-installation-for-package-development)

1. Clone the repository:

```
git clone https://github.com/MohZubiri/E-sadadSoapPack.git
```

2. Add the repository to your Laravel application's `composer.json`:

```
{
    "repositories": [
        {
            "type": "path",
            "url": "/path/to/laravel-esadad"
        }
    ]
}
```

3. Require the package:

```
composer require mohzubiri/laravel-esadad:@dev
```

Configuration
-------------

[](#configuration)

### Environment Variables

[](#environment-variables)

Add the following to your `.env` file:

```
ESADAD_MERCHANT_CODE=your_merchant_code
ESADAD_MERCHANT_PASSWORD=your_merchant_password
ESADAD_KEY_PASSWORD=your_keystore_password
ESADAD_KEY_ALIAS=your_key_alias
ESADAD_VERIFIER_ALIAS=your_verifier_alias
ESADAD_ENCRYPT_ALIAS=your_encrypt_alias
ESADAD_CURRENCY_CODE=your_currency_code  # Default: 886 (Yemeni Riyal)
```

### Configuration File

[](#configuration-file)

After publishing the configuration file, you can find it at `config/esadad.php`. Here's a quick overview of the available options:

```
return [
    'key_file_path' => storage_path('app/keys/education.jks'),
    'key_file_password' => env('ESADAD_KEY_PASSWORD', 'password'),
    'key_file_alias' => env('ESADAD_KEY_ALIAS', 'server'),
    'key_Verifier_Alias' => env('ESADAD_VERIFIER_ALIAS', 'server2'),
    'key_encrypt_Alias' => env('ESADAD_ENCRYPT_ALIAS', 'merchant_mr000461'),

    'merchant_code' => env('ESADAD_MERCHANT_CODE', 'MR000461'),
    'merchant_password' => env('ESADAD_MERCHANT_PASSWORD', ''),

    'wsdl_url' => [
        'AUTHENTICATION' => 'https://195.94.15.100:8002/EBPP_ONLINE-MERC_ONLINE_AUTHENTICATION-context-root/MERC_ONLINE_AUTHENTICATIONPort?WSDL',
        'PAYMENT_INITIATION' => 'https://195.94.15.100:8002/EBPP_ONLINE-MERC_ONLINE_PAYMENT_INITIATION-context-root/MERC_ONLINE_PAYMENT_INITIATIONPort?WSDL',
        'PAYMENT_REQUEST' => 'https://195.94.15.100:8002/EBPP_ONLINE-MERC_ONLINE_PAYMENT_REQUEST-context-root/MERC_ONLINE_PAYMENT_REQUESTPort?WSDL',
        'PAYMENT_CONFIRM' => 'https://195.94.15.100:8002/EBPP_ONLINE-MERC_ONLINE_PAYMENT_CONFIRM-context-root/MERC_ONLINE_PAYMENT_CONFIRMPort?WSSL',
    ],

    'currency_code' => env('ESADAD_CURRENCY_CODE', '886'), // Yemeni Riyal

    'route' => [
        'prefix' => 'esadad',
        'middleware' => ['web'],
    ],
];
```

Environment Variables
---------------------

[](#environment-variables-1)

Add the following to your `.env` file:

```
ESADAD_MERCHANT_CODE=your_merchant_code
ESADAD_MERCHANT_PASSWORD=your_merchant_password
ESADAD_KEY_PASSWORD=your_keystore_password
ESADAD_KEY_ALIAS=your_key_alias
ESADAD_VERIFIER_ALIAS=your_verifier_alias
ESADAD_ENCRYPT_ALIAS=your_encrypt_alias
ESADAD_CURRENCY_CODE=886
```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

1. Add the route to your `routes/web.php`:

```
Route::esadad();
```

This will register the following routes:

- `GET /esadad/form` - Show payment form
- `POST /esadad/process` - Process payment
- `GET /esadad/otp` - Show OTP form
- `POST /esadad/verify-otp` - Verify OTP
- `GET /esadad/success` - Payment success page
- `GET /esadad/failure` - Payment failure page

### Customizing Routes

[](#customizing-routes)

You can customize the routes by passing an options array to the `Route::esadad()` method:

```
Route::esadad([
    'prefix' => 'payments/esadad',
    'middleware' => ['web', 'auth'],
]);
```

### Programmatic Usage

[](#programmatic-usage)

You can also use the package programmatically:

```
use YourVendor\ESadad\Facades\ESadad;

// Process a payment
$result = ESadad::processPayment([
    'customer_id' => 'CUST123',
    'customer_password' => 'password123',
    'amount' => 100.00,
    'invoice_id' => 'INV-' . time(),
]);

// Verify OTP
$verification = ESadad::verifyOtp('123456');
```

### Events

[](#events)

The package dispatches the following events:

- `YourVendor\ESadad\Events\PaymentProcessed` - When a payment is successfully processed
- `YourVendor\ESadad\Events\PaymentFailed` - When a payment fails
- `YourVendor\ESadad\Events\OtpVerified` - When an OTP is successfully verified
- `YourVendor\ESadad\Events\OtpVerificationFailed` - When OTP verification fails

You can listen for these events in your application:

```
// In your EventServiceProvider
protected $listen = [
    'YourVendor\\ESadad\\Events\\PaymentProcessed' => [
        'App\\Listeners\\LogSuccessfulPayment',
    ],
];
```

Security
--------

[](#security-1)

- All sensitive data is encrypted
- Secure SOAP communication with e-SADAD servers
- CSRF protection on all forms
- Input validation on all requests
- Secure session handling
- Comprehensive error logging

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog-1)

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

Contributing
------------

[](#contributing-1)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

License
-------

[](#license-1)

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

Credits
-------

[](#credits-1)

- [Your Name](https://github.com/yourusername)
- [All Contributors](../../contributors)

Support
-------

[](#support)

For support, please email  or open an issue on our GitHub repository.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance53

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

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

Every ~0 days

Total

13

Last Release

325d ago

PHP version history (2 changes)v1.0.0PHP ^8.1

1.0.1PHP ^8.1|^8.2|^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/f2f20061bb6cd1bb209906521f4adeb1a6927376fa463ee2f6c719cd13491bd7?d=identicon)[alzubairi](/maintainers/alzubairi)

---

Top Contributors

[![MohZubiri](https://avatars.githubusercontent.com/u/95330734?v=4)](https://github.com/MohZubiri "MohZubiri (25 commits)")

---

Tags

laravelsoappaymentgatewayknetsaudiesadad

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mohzubiri-laravel-esadad/health.svg)

```
[![Health](https://phpackages.com/badges/mohzubiri-laravel-esadad/health.svg)](https://phpackages.com/packages/mohzubiri-laravel-esadad)
```

###  Alternatives

[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[laravel/cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

264778.4k3](/packages/laravel-cashier-paddle)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)

PHPackages © 2026

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