Download the PHP package devinweb/payment without Composer
On this page you can find all versions of the php package devinweb/payment. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package payment
Very short description of the package
Payment Package provide a simple way to handle payment gateway in MENA.
Installation
This package requires Laravel 5.4 or higher. if your laravel is > 5.4 you can skip the two steps (2, 3) below (Package Auto Discovery 5.5+).
-
You can install the package via composer:
-
Open your
config/app.php
and add the following to the providers array -
In the same
config/app.php
and add the following to the aliases array: - Run the command below to publish the package config file
config/payfort-payment.php
:
-
Payfort
- Configuration (Payfort)
- Routing (Payfort)
- Required Parameters (Payfort)
-
Payfort Apple Pay
- Configuration (Payfort Apple Pay)
- Usage (Payfort Apple Pay)
- Required Parameters (Payfort Apple Pay)
-
Payfort Events
- Exemple
Payfort
To pay via payfort it's simple, but before process the payment it's requiered to setup your FrontEnd
, you can check the payment-boilerplate
Repository.
Configuration (Payfort)
Now you can add your payfort credentiels to app/config/payments/php
Routing (Payfort)
Next to use Payfort, you need three Routes:
- Used to submit data from the front end to the backend.
- The second if the payment is successfuly.
- For redirecting if payfort response with error.
you can access to Payment using Payment
facade.
Required Parameters (Payfort)
Each request should be contains amount
, email
, hold_name
Payfort Apple Pay
You can use this package to handle the apple pay transactions via Payfort.
Configuration (Payfort Apple Pay)
you should add payfort apple pay credentiels to the app/confing/payments/php
Usage (Payfort Apple Pay)
To pay via Payfort apple pay is the the same as before you can use.
Required Parameters (Payfort Apple Pay)
The parameters required to be attached in your request payload to use Apple Pay is:
Pay With ReactNative
if you want to process the payment via webView in your react native mobile app
In your php controller or route you can use
Payfort Events
As we know payfort can notify the merchant, for all events you subscribed for on an transaction. we need the first to add your callback into payfort dashboard, then you can implement this callback in your application
This webHook can invoks two events build in. There are two events available for you to listen for.
Event | Fired | Parameter |
---|---|---|
Devinweb\Payment\Events\SuccessTransaction |
when payfort response with the successful data | array success response |
Devinweb\Payment\Events\FailTransaction |
when payfort response with the Fail data | array fail_response |
exemple
check this repos payment-boilerplate
.
Success response
Fail response
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
- darbaoui imad
- All Contributors
About Devinweb
Devinweb is a web app agency in Tetouan, Morocco. our website.
License
The MIT License (MIT). Please see License File for more information.