hopekelldev/laravel-danarewa
最新稳定版本:v1.0.0
Composer 安装命令:
composer require hopekelldev/laravel-danarewa
包简介
Laravel wrapper for DanArewaTech API
README 文档
README
Laravel DanArewa is a Laravel 10+ package that provides a clean wrapper around the DanArewaTech identity verification API. It offers a Facade-based interface for verification, clearance, validation, and user wallet inquiries.
Requirements
- PHP >= 8.0
- Laravel >= 10.0
- GuzzleHTTP >= 7.0
Installation
Install the package via Composer:
composer require hopekelldev/laravel-danarewa
Configuration
Publish Configuration File
Run the following command to publish the configuration file:
php artisan vendor:publish --tag=config --provider="HopekellDev\DanArewa\DanArewaServiceProvider"
Environment Variables
Add the following to your .env file:
DANAREWA_API_KEY=your_api_key_here DANAREWA_BASE_URL=https://danarewatech.com.ng/api
Usage Example
Here’s how to use the package to verify an NIN:
use HopekellDev\DanArewa\Facades\DanArewa; // Example: Verify NIN $response = DanArewa::verifications()->ninVerification('12345678901'); if ($response && ($response['status'] ?? false) === 'success') { $data = $response['data']; // Process success } else { $error = $response['message'] ?? 'Verification failed'; }
Available Methods
| Category | Method | Description |
|---|---|---|
| Verifications | verifications()->ninVerification($nin) |
Verify NIN by number |
| Verifications | verifications()->phoneVerification($phone) |
Verify NIN by registered phone |
| Verifications | verifications()->bvnVerification($bvn) |
Verify BVN number |
| Verifications | verifications()->trackingIdVerification($trackingId) |
Verify by Tracking ID |
| IPE Clearance | ipeClearance()->ipeClearance($trackingID) |
Instant IPE Clearance |
| IPE Clearance | ipeClearance()->ipeClearanceStatus($trackingID) |
Check IPE status |
| Validation | validation()->validate($nin) |
Validate ID |
| Validation | validation()->validateStatus($nin) |
Check validation status |
| User Wallet | userDetails()->walletBalance() |
Get user wallet balance |
Controller Usage Example
Here’s an example of how to use the package in a Laravel controller:
use HopekellDev\DanArewa\Facades\DanArewa; public function verifyNIN(Request $request) { $response = DanArewa::verifications()->ninVerification($request->nin); return response()->json($response); }
License
This package is released under the MIT License.
Author
Ezenwa Hopekell
- GitHub: HopekellDev
- Email: hopekelltech@gmail.com
- Message Hopekell on Whatsapp
Contributions & Issues
Found a bug or have a feature request? Feel free to open an issue or submit a pull request on GitHub.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-07-18