Magento Documentation
Do you happen to use the Magento Commerce suite to engage your customers? Learn how you can use FIB to offer a simple payment solution when your customers check out from your portal.
Installation
You have two ways to go about installing the plugin:
Composer
Use the popular PHP dependency manager to download the required files:
Code Example
composer require lawrencespring/module-paywithfib
Manually download them from our Github repo
- Go to lawrencespring/fib-pay-magento2-payment and download the latest version to app/code/Lawrencespring/PayWithFIB
- Go to lawrencespring/fib-pay-php-sdk and download the latest version to app/code/Lawrencespring/FIBPaySDK
Configuration
In the following section you will find steps to configure Magento.
Setup Magento
- Enable module by running:
Code Example
$ bin/magento module:enable Lawrencespring_PayWithFIB
- Install DB schema:
Code Example
$ bin/magento setup:upgrade
- Generate classes:
Code Example
$ bin/magento setup:di:compile
- Generate static content
Code Example
$ bin/magento setup:static-content:deploy
Steps to configure Magento
Login to magento backend and open Stores \ Configuration and Sales \ Payment Methods
![magento system configuration](/images/docs/magento/magento-system-configuration.png)
Find Pay with FIB section and configure it with your credentials. You need to fill Account ID, Client ID, Client Secret fields.
![magento payment configuration](/images/docs/magento/magento-payment-configuration.png)
After finishing, remember to Save Config on right top corner and refresh cacheafter it. If credentials are valid and every step was done on the frontend you should be able to see Pay with First Iraqi Bank/Pay with FIB payment method.
![magento payment method](/images/docs/magento/magento-payment-method.png)
When a customer finishes the payment process on application page, an order will automatically be submitted for the customer. And you will be able to see notice on order details page like this one
![magento order details](/images/docs/magento/magento-order-details.png)
You can also check the generated transaction on Sales \ Pay with FIB \ Transactions
![magento transaction details](/images/docs/magento/magento-transaction-details.png)
Notice
Currently Pay with FIB is offline payment type. In future releases it will be upgraded to online type with full options related with this type.