Download the PHP package prevailexcel/laravel-fincra without Composer
On this page you can find all versions of the php package prevailexcel/laravel-fincra. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download prevailexcel/laravel-fincra
More information about prevailexcel/laravel-fincra
Files in prevailexcel/laravel-fincra
Package laravel-fincra
Short Description A Laravel Package for working with Fincra API seamlessly
License MIT
Homepage https://github.com/prevailexcel/laravel-fincra
Informations about the package laravel-fincra
Laravel Fincra
A Laravel Package for working with Fincra Payments seamlessly.
Fincra offers a contemporary financial infrastructure designed for businesses and developers, enabling them to facilitate local and international payouts, gather payments from customers, and create virtual accounts.
This package allows you to:
- Accept payments via Checkout (Pop widget & Redirect)
- Create and manage virtual accounts
- Process local and international payouts
- Manage beneficiaries
- Verify identities (BVN, Account Numbers)
- Handle webhooks with verification
- And much more!
Requirements
PHP 7.4+ or PHP 8.0+, and Composer are required.
Installation
To get the latest version of Laravel Fincra, simply require it:
Or add the following line to the require block of your composer.json file:
You'll then need to run composer install or composer update to download it and have the autoloader updated.
Service Provider & Facade (Laravel < 5.5)
Once Laravel Fincra is installed, you need to register the service provider. Open up config/app.php and add the following to the providers key:
Also, register the Facade:
If you use Laravel >= 5.5 you can skip this step and go to configuration
Configuration
You can publish the configuration file using this command:
A configuration-file named fincra.php with sensible defaults will be placed in your config directory:
Environment Variables
Open your .env file and add your Fincra API keys:
Note: Remember to change
FINCRA_ENVtoliveand update the keys when you're in production.
Usage
Payment Flow Overview
- Collect payment information from your customer
- Initialize payment using either:
- Inline Checkout (Pop Widget) - User pays without leaving your site
- Checkout Redirect - Redirect user to Fincra hosted page
- Verify the transaction
- Handle webhook notifications
Routes Setup
Add these routes to handle payments:
Checkout Methods
1. Inline Checkout (Pop Widget)
The inline checkout displays a payment modal on your page, allowing customers to pay without leaving your site.
Controller Example
Blade Form
2. Checkout Redirect
Redirect users to Fincra's hosted checkout page:
Virtual Accounts
Create Virtual Account
Get Virtual Accounts
Payouts
Initiate Payout
Get Payouts
Beneficiaries
Identity Verification
Verify BVN
Verify Bank Account
Verify IBAN
BIN Resolution
Balance & Transactions
Conversions
Webhooks
Setup Webhook Handler
CSRF Exception
Add the webhook route to the CSRF exception array in app/Http/Middleware/VerifyCsrfToken.php:
Webhook Events
Fincra sends webhooks for these events:
charge.successful- Payment completed successfullycharge.failed- Payment failedpayout.successful- Payout completedpayout.failed- Payout failedvirtual_account.credited- Virtual account received paymentconversion.successful- Currency conversion completed
Available Methods
Payments/Collections
Virtual Accounts
Payouts
Beneficiaries
Identity Verification
Balance & Transactions
Conversions
Webhooks
Utilities
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Chimeremeze Prevail Ejimadu
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Support
For support, please reach out via:
- Email: [email protected]
- X/Twitter: @EjimaduPrevail
- LinkedIn: Chimeremeze Prevail Ejimadu
Also check out my page on medium to catch articles and tutorials on Laravel follow me on medium!
Thanks! Chimeremeze Prevail Ejimadu.
Show some ❤️ by starring this repository!
All versions of laravel-fincra with dependencies
illuminate/support Version ^7.0|^8.0|^9.0|^10.0|^11.0
guzzlehttp/guzzle Version ^7.0