Skip to content

A compact Laravel package enabling quick integration with Safe Haven MFB's API for easy access to banking features.

License

Notifications You must be signed in to change notification settings

maylancerdev/safehaven-laravel

Repository files navigation

Safe Haven MFB Laravel package

Latest Version Latest Version on Packagist Total Downloads

Safe Haven MFB for your Laravel project made easy

Installation

You can install the package via composer:

composer require maylancer/safehaven-laravel

Publishing the config file

php artisan vendor:publish --provider="MaylancerDev\SafeHaven\SafeHavenServiceProvider" --tag="config"

Usage

use MaylancerDev\SafeHaven\SafeHaven;

//Create Account
$accountType = "Savings";
$accountName = "John Timothy";
SafeHaven::account()->createAccount($accountType, $accountName, [
    "verified" => true,
    "notes" => ""
]);

For more information, please refer to the package documentation.

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 MaylancerDev\SafeHaven.

use MaylancerDev\SafeHaven\ApiRequestor;

Step 2: Update schedule in app/Console/Kernel.php to refresh the token every 30 minutes.

protected function schedule(Schedule $schedule)
{
    $schedule->call(function () {
        (new ApiRequestor())->token();
    })->everyThirtyMinutes();
}

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security-related issues, please email hello@maylancer.org instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

A compact Laravel package enabling quick integration with Safe Haven MFB's API for easy access to banking features.

Resources

License

Stars

Watchers

Forks

Packages

No packages published