Download the PHP package badinansoft/fib-php-sdk without Composer
On this page you can find all versions of the php package badinansoft/fib-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download badinansoft/fib-php-sdk
More information about badinansoft/fib-php-sdk
Files in badinansoft/fib-php-sdk
Package fib-php-sdk
Short Description FIB Online payments service PHP SDK
License MIT
Homepage https://github.com/badinansoft/fib-php-sdk
Informations about the package fib-php-sdk
FIB (First Iraqi Bank)'s PHP payment SDK
The PHP SDK for First Iraqi Bank's online payment is a library that allows you to integrate First Iraqi Bank's online payment system into your PHP application. The SDK provides a simple and easy-to-use API that allows you to create, status check, and cancel payments.
Features
- User Authentication: Verifying the user's identity and credentials and generating an access token for future requests.
- Payment Creation: Generating QR codes and dynamic links to direct the user to the payment screen when creating a payment.
- Payment Status Check: Checking the current status of a payment.
- Payment Cancellation: Canceling an active payment that has not yet been paid.
Installation
You can install the package via composer:
Usage
Parameter | Description |
---|---|
Client_id | Client id provided by FIB |
client_secret | Client Secret provided by FIB |
Parameter | Description |
---|---|
amount | the amount of the payment |
currency | the currency of the payment; currently only IQD is supported |
description | (Optional) Description of the payment to help your customer to identify it in the FIB app, with the maximum length of 50 characters. |
statusCallbackUrl | should be able to handle POST requests with request body that contains two properties: - id: this will be the payment id - status: this will be the status of the payment, for more information, go to Check Status endpoint section of this |
Expected Response
Property | Description |
---|---|
paymentId | A unique identifier of the payment, used later to check the status. |
qrCode | A base64-encoded data URL of the QR code image that the user can scan with the FIB mobile app. |
readableCode | A payment code that the user can enter manually in case he cannot scan the QR code. |
personalAppLink | A link that the user can tap on his mobile phone to go to the corresponding payment screen in the FIB Personal app. |
businessAppLink | A link that the user can tap on his mobile phone to go to the corresponding payment screen in the FIB Business app |
corporateAppLink | A link that the user can tap on his mobile phone to go to the corresponding payment screen in the FIB Corporate app |
validUntil | An ISO-8601-formatted date-time string, representing a moment in time when the payment expires |
Expected Response
Property | Description | ||
---|---|---|---|
paymentId | a unique identifier of the payment. | ||
status | Expected values are PAID | UNPAID | DECLINED |
validUntil | an ISO-8601-formatted date-time string, representing a moment in time when the payment expires | ||
paidAt | an ISO-8601-formatted date-time string, representing a moment in time when the payment is done. | ||
amount | a JSON object, containing two key-value pairs; the amount and currency of the payment. | ||
decliningReason | Expected Values are: -SERVER_FAILURE: Payment failure due to some internal error. -PAYMENT_EXPIRATION: Payment has expired. -PAYMENT_CANCELLATION: Payment canceled by the user. |
||
Testing
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Shahab Zebari
- All Contributors
License
The MIT License (MIT). Please see License File for more information.