digikraaft / mono-php
PHP Implementation of Mono API
Installs: 11 169
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 1
Forks: 5
Open Issues: 1
Requires
- php: ^7.4 | ^8.0
- ext-json: *
- guzzlehttp/guzzle: ^7.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- mockery/mockery: ^1.4
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2024-10-30 05:22:00 UTC
README
This package provides an expressive and convenient way to interact with the Mono API.
IMPORTANT NOTICE
Please note that the Mono API is not currently in private beta, this package is a pre-lease and therefore may not be stable enough for production. Use at your discretion!
We will continue to update this package as new features are being added to the Mono API.
Installation
You can install the package via composer:
composer require digikraaft/mono-php
Usage
All APIs documented in Mono's API Reference are currently supported by this package.
Authentication
Before using any of the endpoints, you will have to authenticate the current account
with the endpoint account/auth
:
<?php include_once('vendor/autoload.php'); use Digikraaft\Mono\Mono; Mono::setSecretKey('TEST_1234abcd'); $codeFromMonoConnect = "5eadinitaewqwuis"; $account = Account::authenticate($codeFromMonoConnect); $accountId = $account->data->id;
Available Methods
A list of the available methods are documented below:
Account
authenticate(string $codeFromConnect) : Array|Object
bvnLookup($params = null) : Array|Object
details(string $accountId) : Array|Object
fetchStatement(string $accountId, array $filters) : Array|Object
identity(string $accountId) : Array|Object
income(string $accountId) : Array|Object
listTransactions(string $accountId, array $filters) : Array|Object
pollStatementPdfStatus(string $accountId, string $jobId) : Array|Object
reAuthorise(string $accountId, ?array $params = null) : Array|Object
sync(string $accountId, ?array $params = null) : Array|Object
unlink(string $accountId, ?array $params = null) : Array|Object
Mono
getSecretKey(): string
setSecretKey(string $secretKey)
coverage() : Array|Object
Payment
initiate(array $params) : Array|Object
onetimeDebitStatus(string $paymentId) : Array|Object
recurringDebitStatus(string $paymentId) : Array|Object
Plan
create(array $params) : Array|Object
delete(string $paymentId) : Array|Object
list(string $paymentId) : Array|Object
update(string $paymentId, array $params) : Array|Object
Wallet
balance() : Array|Object
This package returns the exact response from the Mono API but as the stdClass
type.
Testing
composer test
More Good Stuff
Check here for more awesome free stuff!
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Contributions are welcome! Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email hello@digikraaft.ng instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.