maherelgamil/laravel-fawry
Integration package for Fawry Payment Gateway
1,356
21
| Install | |
|---|---|
composer require maherelgamil/laravel-fawry |
|
| Latest Version: | v0.1.1 |
| PHP: | ^7.2 |
| License: | MIT |
| Last Updated: | Apr 3, 2020 |
| Links: | GitHub · Packagist |
Maintainer: maherbusnes
Laravel Fawry
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!
Related Packages
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
634,760,849
9,707
laravel/serializable-closure
Laravel Serializable Closure provides an easy and secure way to serialize closur...
408,553,772
609
nunomaduro/collision
Cli error handling for console/command-line PHP applications.
387,976,821
4,658