remeni / wallets-africa-php
Wallets Africa API 的 PHP 封装。
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-09-15 01:27:24 UTC
README
Wallets Africa API 的 PHP 封装 Wallets Africa
安装
使用 Composer 安装库。如果您不熟悉 Composer 或一般依赖管理器,请阅读 Composer 文档。
composer require remeni/wallets-africa-php
使用方法
在使用 Wallets Africa API 之前,您需要在 Wallets Africa 网站 上申请 API 密钥。
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 } }
支持的 API 调用
- 账户
- 通话时间
- 身份
- 钱包
- 支付
贡献
您可以通过多种方式为项目做出贡献
- 编写文档
- 实现功能
- 修复错误
- 添加单元和功能测试
代码风格和结构
代码风格必须符合 PSR-2 编码标准,应用这些约定最简单的方法是安装 PHP_CodeSniffer
其他资源
其他资源可在以下位置找到
许可证
MIT 许可证 (MIT)。有关更多信息,请参阅 许可证文件。