Download the PHP package rawahamid/laravel-fib-integration without Composer
On this page you can find all versions of the php package rawahamid/laravel-fib-integration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rawahamid/laravel-fib-integration
More information about rawahamid/laravel-fib-integration
Files in rawahamid/laravel-fib-integration
Package laravel-fib-integration
Short Description Laravel FIB Integration
License MIT
Informations about the package laravel-fib-integration
Laravel FIB Integration
Laravel integration for first iraqi bank payment
Features
- Authentication
- Payment Creation
- Checking payment status
- Payment Cancellation
Installation
You can install the package through Composer
Then publish the config file of the package using the vendor publish command
Configuration variables
All that is left to do is to define four env configuration variables inside .env
file
FIB_ENVIRONMENT
This value is the environment that you want to choose for FIB integration to your applicationFIB_CALLBACK_URL
The callback url that FIB will send a POST request to when status of the created payment changesFIB_CLIENT_ID
The account client id you use to authenticate the request determines whether the request is live mode or test modeFIB_CLIENT_SECRET
The account client secret you use to authenticate the request determines whether the request is live mode or test mode
Usage
Payment Creation
Response structure
paymentId
A unique identifier of the payment, used later to check the status.readableCode
A payment code that the user can enter manually in case he cannot scan the QR code.qrCode
A base64-encoded data URL of the QR code image that the user can scan with the FIB mobile app.validUntil
an ISO-8601-formatted date-time string, representing a moment in time when the payment expirespersonalAppLink
A link that the user can tap on his mobile phone to go to the corresponding payment screen in the FIB Personal appbusinessAppLink
A link that the user can tap on his mobile phone to go to the corresponding payment screen in the FIB Business appcorporateAppLink
A link that the user can tap on his mobile phone to go to the corresponding payment screen in the FIB Corporate app
Payment Status
Response structure will be:
paymentId
A unique identifier of the payment, used later to check the status.status
one of these values:PAID
|UNPAID
|DECLINED
validUntil
an ISO-8601-formatted date-time string, representing a moment in time when the payment expiresamount
contains payment amount and its currencydecliningReason
can be nullable or one of these valuesSERVER_FAILURE
|PAYMENT_EXPIRATION
|PAYMENT_CANCELLATION
declinedAt
datetime that represents the time of payment declinepaidBy
is nullable object if the payment is still not paid but if paid will contain the name and iban of the user
Payment Cancel
response will be empty if success
IMPORTANT NOTE**
In every request of these if the response is 500 mean the creation, status or cancellation request something wrong happened
License
The FIB Integration package is open source software licensed under the License MIT
Contributing
Contributions are always welcome!
Report & Feedback
If you face any problem feel free to contact me :) rawahamid