Download the PHP package thejano/areeba-payment-laravel without Composer
On this page you can find all versions of the php package thejano/areeba-payment-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download thejano/areeba-payment-laravel
More information about thejano/areeba-payment-laravel
Files in thejano/areeba-payment-laravel
Package areeba-payment-laravel
Short Description A Laravel package for Areeba payment gateway integration.
License MIT
Informations about the package areeba-payment-laravel
Areeba Payment Laravel Package
A Laravel package for integrating with Areeba Payment Gateway.
Payment Flow
This flow requires you to redirect the end-user to the payment page as advised in the redirectUrl
response.
- Initiate the payment with the appropriate API call.
- Upon success, the Gateway responds with a result containing
returnType
asREDIRECT
and the URL inredirectUrl
. - You redirect the user to the given URL (usually via a
Location
header). - The user completes the payment process on the payment page.
- The Gateway sends an asynchronous status notification to the URL provided in the initial API call.
- The user will be redirected to the
successUrl
,errorUrl
, orcancelUrl
based on the transaction status. The URL will contain thetransactionId
as a query parameter:url?transactionId={{$transactionId}}
.
Installation
You can install the package via Composer:
Configuration
Publish the configuration file:
This will create a config/areeba.php
file.
Set your environment variables in .env
:
Usage
Using the Service Class for Payment Initiation
Using the Facade
Request Response Data Properties
The AreebaPaymentRequestData
contains the following properties:
success
(bool) - Indicates if the request was successful.uuid
(string|null) - Unique identifier for the transaction.purchaseId
(string|null) - The purchase reference ID.returnType
(string|null) - Type of return response (e.g.,REDIRECT
).redirectUrl
(string|null) - URL where the user should be redirected to complete payment.paymentMethod
(string|null) - Payment method used by the user.errorMessage
(string|null) - Error message in case of failure.errorCode
(int|null) - Error code if the transaction failed.
Based on the transaction status, the user will be redirected to the appropriate URL with ?transactionId={{$transactionId}}
appended.
Checking Payment Status
This will return a JSON response including transactionStatus
with possible values:
SUCCESS
- Transaction was successful.REDIRECT
- Transaction has not been processed yet.ERROR
- Transaction failed.
License
This package is open-source and licensed under the MIT License.
API Documentation
For more details, visit the official API documentation: