Download the PHP package azreqat/laravel-payfort without Composer
On this page you can find all versions of the php package azreqat/laravel-payfort. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download azreqat/laravel-payfort
More information about azreqat/laravel-payfort
Files in azreqat/laravel-payfort
Package laravel-payfort
Short Description Laravel-payfort is a simple package to process payments throught Payfort payment gateway.
License MIT
Informations about the package laravel-payfort
Laravel Payfort Package
Laravel Payfort
provides a simple and rich way to perform and handle operations for
Payfort
(MEA based online payment gateway) check here to read more Payfort.
This package supports a set of Payfort
operations as listed below, other operations are open for future work and
contribution.
- AUTHORIZATION/PURCHASE
- TOKENIZATION
- SDK_TOKEN
- CHECK_STATUS
You have to read the Payfort
documentation very well before proceeding in using any package, the package author
will not write about Payfort
operations, what and how to use.
Installation
You can install the package via composer:
You can publish the config file with:
This is the contents of the file that will be published at config/payfort.php
:
Then you have to add the following constants in the .env
file:
You can find most of these values in your Payfort
account
Usage
Once all configuration steps are done, you are ready to use payfort operations in your app. Here is some examples on how to use this package:
Authorization/Purchase request (Redirection)
To display payfort authorization or purchase page, in your controller's method add the following code snippet:
Other optional parameters that can be passed to displayRedirectionPage
method as follows:
token_name
payment_option
sadad_olp
eci
order_description
customer_ip
customer_name
merchant_extra
merchant_extra1
merchant_extra2
merchant_extra3
Payfort
page will be displayed and once user submits the payment form, the return url defined in the environment configurations will be called.
See Payfort
documentation for more info.
Tokenization request
To display payfort tokenization page, in your controller's method add the following code snippet:
Payfort
page will be displayed and once user submits the payment form, the return url defined in the config file
will be called.
See Payfort
documentation for more info.
Handling Payfort Authorization/Purchase response
Handling callback (return)
In your handling controller that handle the return url, you can simply use the PayfortResponse
trait as follows:
See Payfort
documentation for more info.
Handling Direct Transaction Feedback
Same as handling payfort response except that you have to call handlePayfortFeedback
instead of handlePayfortCallback
Localization
The redirect page can be translated by simply using the json file of the language wihtin the lang
directory of your app.
For example, ar.json
file:
Contribution
Want to improve this package or found a bug ?. Open an issue or do this contribution by yourself and get this honor.
Simply, fork => do you work => make pull request.
Write clear comments and description ;-).
License
Laravel Payfort
is open-sourced software licensed under the MIT license
All versions of laravel-payfort with dependencies
illuminate/support Version ^8.50|^9.0
nesbot/carbon Version ^2.0
guzzlehttp/guzzle Version ^7.2