remeni / wallets-africa-php
A PHP wrapper for the Wallets Africa API.
v1.0.0
2020-10-23 20:57 UTC
Requires
- php: >=7.2
- ext-json: *
- guzzlehttp/guzzle: 7.0
Requires (Dev)
This package is auto-updated.
Last update: 2024-06-15 00:46:17 UTC
README
wallets-africa-php
A PHP wrapper for the Wallets Africa API
Installation
Install the library using Composer. Please read the Composer Documentation if you're unfamiliar with Composer or dependency managers in general.
composer require remeni/wallets-africa-php
Usage
Before using the Wallets Africa API, you'll need to request for API Keys at Wallets Africa site
require('vendor/autoload.php'); use Remeni\WalletsAfrica\Configuration; use Remeni\WalletsAfrica\ApiException; use Remeni\WalletsAfrica\WalletsAfrica; $configuration = new Configuration([ 'publicKey' => 'YOUR_PUBLIC_KEY', 'secretKey' => 'YOUR_SECRET_KEY', 'currency' => 'NGN' ]); $client = new WalletsAfrica($configuration); try { $response = $client->account->checkBalance(); if ($response->getStatusCode() == 200) { // Successful } } catch (ApiException $e) { if ($e->getResponseBody()) { // No response from the server } else { // Response was returned from the server } }
Supported API Calls
- Account
- Airtime
- Identity
- Wallet
- Payout
Contributing
You can contribute to the project in multiple ways:
- Write Documentation
- Implement features
- Fix bugs
- Add unit and functional tests
Code style and structure
The coding style must conform with PSR-2 Coding Standard, the easiet way to apply the conventions is to install PHP_CodeSniffer
Additional resources
Additional resources are available at:
License
The MIT License (MIT). Please see License File for more information.