PHP code example of hopekelldev / laravel-danarewa
1. Go to this page and download the library: Download hopekelldev/laravel-danarewa library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hopekelldev / laravel-danarewa example snippets
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';
}
use HopekellDev\DanArewa\Facades\DanArewa;
public function verifyNIN(Request $request)
{
$response = DanArewa::verifications()->ninVerification($request->nin);
return response()->json($response);
}