定制 hopekelldev/laravel-danarewa 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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.

Latest Version on Packagist Total Downloads Scrutinizer Code Quality PHP Version Laravel Version GuzzleHTTP Version

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

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-18