maherelgamil / laravel-fawry
Integration package for Fawry Payment Gateway
Installs: 1 309
Dependents: 0
Suggesters: 0
Security: 0
Stars: 21
Watchers: 4
Forks: 11
Open Issues: 1
Requires
- php: ^7.2
- laravel/framework: ~6.0|~7.0
This package is auto-updated.
Last update: 2024-12-04 09:04:40 UTC
README
Laravel interface for AtFawry
Table Of Contect
Installation
Install via composer
composer require maherelgamil/laravel-fawry
And then publish config
php artisan vendor:publish --tag="fawry-config"
Add merchant_code
, security_key
that's provided from Atfawry account
Now, Run migration
php artisan migrate
Usage
Create Card Token:
// Get user $user = App\User::find(1); $tokenResponse = Fawry::createCardToken($cardNumber, $expiryYear, $expiryMonth, $cvv, $user);
Get List Of Customer Tokens:
// Get user $user = App\User::find(1); Fawry::listCustomerTokens($user);
Delete Customer Token
// Get user $user = App\User::find(1); Fawry::deleteCardToken($user);
Charge:
Charge Via Card:
// Get user $user = App\User::find(1); Fawry::chargeViaCard($merchantRefNum, $user, $amount, $chargeItems = [], $description = null )
Charge Via Fawry
// Get user $user = App\User::find(1); Fawry::chargeViaFawry($merchantRefNum, $user, $paymentExpiry, $amount, $chargeItems = [], $description = null )
Refund
Fawry::refund($fawryRefNumber, $refundAmount, $reason = null)
License
Laravel Fawry is an open-sourced laravel package licensed under the MIT license
Enjoy!