A PHP wrapper for the Wallets Africa API
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
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
}
}
- Account
- Airtime
- Identity
- Wallet
- Payout
You can contribute to the project in multiple ways:
- Write Documentation
- Implement features
- Fix bugs
- Add unit and functional tests
The coding style must conform with PSR-2 Coding Standard, the easiet way to apply the conventions is to install PHP_CodeSniffer
Additional resources are available at:
The MIT License (MIT). Please see License File for more information.