https://github.com/eminisolomon/safehaven
A streamlined Laravel package facilitating seamless integration with Safe Haven MFB's API, providing efficient access to essential banking services.
https://github.com/eminisolomon/safehaven
bank mfb nigeria safehaven
Last synced: 6 months ago
JSON representation
A streamlined Laravel package facilitating seamless integration with Safe Haven MFB's API, providing efficient access to essential banking services.
- Host: GitHub
- URL: https://github.com/eminisolomon/safehaven
- Owner: eminisolomon
- License: mit
- Created: 2024-07-15T21:58:36.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-12-06T10:13:38.000Z (8 months ago)
- Last Synced: 2025-12-10T03:51:23.195Z (8 months ago)
- Topics: bank, mfb, nigeria, safehaven
- Language: PHP
- Homepage: https://safehaven-mfb.vercel.app
- Size: 275 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Safe Haven MFB Laravel package
[](https://github.com/eminisolomon/safehaven/releases)
[](https://packagist.org/packages/eminisolomon/safehaven)
[](https://packagist.org/packages/eminisolomon/safehaven)
Safe Haven MFB for your Laravel project made easy
## Installation
You can install the package via composer:
```bash
composer require eminisolomon/safehaven
```
Publishing the config file
```bash
php artisan vendor:publish --provider="Eminisolomon\SafeHaven\SafeHavenServiceProvider" --tag="config"
```
## Usage
```php
use Eminisolomon\SafeHaven\SafeHaven;
//Create Account
$accountType = "Savings";
$accountName = "Solomon Olatunji";
SafeHaven::account()->createAccount($accountType, $accountName, [
"verified" => true,
"notes" => ""
]);
```
For more information, please refer to the [package documentation](docs/index.md).
## Automatic API Token Refresh
For seamless and uninterrupted access to API endpoints, it's recommended to integrate an automated mechanism in your Laravel application. This mechanism will be responsible for generating client assertions and subsequently exchanging them for API tokens. By doing so, the API token gets refreshed automatically before it reaches its expiration, ensuring your API interactions remain consistent and uninterrupted. To implement this, simply add the provided script to your Laravel application's cron job configuration
**Step 1**: Import `ApiRequestor` from `Eminisolomon\SafeHaven`.
```php
use Eminisolomon\SafeHaven\ApiRequestor;
```
**Step 2**: Update `schedule` in `app/Console/Kernel.php` to refresh the token every 30 minutes.
```php
protected function schedule(Schedule $schedule)
{
$schedule->call(function () {
(new ApiRequestor())->token();
})->everyThirtyMinutes();
}
```
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
### Security
If you discover any security-related issues, please email realsolomon@outlook.com instead of using the issue tracker.
## Credits
- [Solomon Olatunji](https://github.com/eminisolomon)
- [All Contributors](CONTRIBUTORS.md)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.