This is an easy way to integrate with EdfaPay and get payment link correctly.
You can find EdfaPay API documentation here
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),
];
$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.
- Generate payment URL
- Handle payment notifications
- 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.
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.