alalm3i/edfapay-laravel

Laravel's integration with EdfaPay payment gateway
1,138
Install
composer require alalm3i/edfapay-laravel
Latest Version:v1.4
PHP:^8.1|^8.2
Laravel:10 · 11
License:MIT
Last Updated:Apr 20, 2026
Links: GitHub  ·  Packagist
Maintainer: nabeel-alalmai

Laravel's integration with EdfaPay payment gateway

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This is an easy way to integrate with EdfaPay and get payment link correctly.

You can find EdfaPay API documentation here

Installation

You can install the package via composer:

composer require alalm3i/edfapay-laravel

You can publish the config file with:

php artisan vendor:publish --tag="edfapay-laravel-config"

This is the contents of the published config file:

return [
    'merchant_key' => env('EDFA_PAY_MERCHANT_KEY', null),
    'merchant_password' => env('EDFA_PAY_PASSWORD', null),
    'return_url' => env('EDFA_PAY_RETURN_URL', null),
];

Usage

 $response = \alalm3i\EdfaPay\Facades\EdfaPay::paymentURL([
        'order_id' => 'a001',
        'order_amount' => '10',
        'order_description' => 'description',
        'payer_first_name' => 'customer',
        'payer_last_name' => 'name',
        'payer_email' => 'nab@eee.com',
        'payer_mobile' => '966565555555',
        'payer_ip_address' => '176.44.76.222',
    ])->generate();
    
//$response = https://pay.edfapay.com/merchant/checkout/.....

This package cover generating the payment link only.

ToDo

  1. Generate payment URL
  2. Handle payment notifications
  3. Handle route for notification webhook

You can extend alalm3i\EdfaPay\EdfaPayNotification class to utilize it as a wrapper with some useful getters for notification callback payload. Just initialize it with the response object received from EdfaPay.

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.

Credits

License

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

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

641,106,524 9,700
laravel/framework

The Laravel Framework.

593,882,149 34,959
laravel/tinker

Powerful REPL for the Laravel framework.

502,645,077 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

418,291,778 609
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

394,964,158 4,660

Version History

Version Released PHP Laravel License
v1.4 ^8.1|^8.2 ^10.0|^11.0 MIT
v1.3 ^8.1|^8.2 ^10.0|^11.0 MIT
v1.2 ^8.1|^8.2 ^10.0|^11.0 MIT
v1.1 ^8.1|^8.2 ^10.0|^11.0 MIT
v1.0 ^8.1|^8.2 ^10.0|^11.0 MIT