承接 mohzubiri/laravel-esadad 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mohzubiri/laravel-esadad

Composer 安装命令:

composer require mohzubiri/laravel-esadad

包简介

Laravel package for e-SADAD payment gateway integration

README 文档

README

Latest Version on Packagist Total Downloads License PHP Version Laravel Version

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

  • 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

  • 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

For Laravel Applications

  1. Install the package via Composer:
composer require mohzubiri/laravel-esadad:^1.0.14
  1. Publish the configuration file:
php artisan vendor:publish --provider="MohZubiri\\ESadad\\Providers\\ESadadServiceProvider" --tag="esadad-config"
  1. Publish the views (optional, only if you want to customize them):
php artisan vendor:publish --provider="MohZubiri\\ESadad\\Providers\\ESadadServiceProvider" --tag="esadad-views"
  1. Publish the assets (CSS, JS, images):
php artisan vendor:publish --provider="MohZubiri\\ESadad\\Providers\\ESadadServiceProvider" --tag="esadad-assets"
  1. Run the migrations:
php artisan migrate

Or use the install command for a guided installation:

php artisan esadad:install

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

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

Credits

License

The MIT License (MIT). Please see License File for more information.

Manual Installation (For Package Development)

  1. Clone the repository:
git clone https://github.com/MohZubiri/E-sadadSoapPack.git
  1. Add the repository to your Laravel application's composer.json:
{
    "repositories": [
        {
            "type": "path",
            "url": "/path/to/laravel-esadad"
        }
    ]
}
  1. Require the package:
composer require mohzubiri/laravel-esadad:@dev

Configuration

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

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

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

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

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

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

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

  • 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

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

License

The MIT License (MIT). Please see License File for more information.

Credits

Support

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

mohzubiri/laravel-esadad 适用场景与选型建议

mohzubiri/laravel-esadad 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 06 月 21 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「soap」 「payment」 「gateway」 「laravel」 「knet」 「saudi」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 mohzubiri/laravel-esadad 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 mohzubiri/laravel-esadad 我们能提供哪些服务?
定制开发 / 二次开发

基于 mohzubiri/laravel-esadad 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 10
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 25
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-21