From fa1184043e5f42f116d5870bd67ed5b4bceb7451 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Mon, 6 May 2024 10:06:19 -0400 Subject: [PATCH] BVN Otp --- app/Controllers/DigiFiBVN.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app/Controllers/DigiFiBVN.php b/app/Controllers/DigiFiBVN.php index 9443b29..56267d6 100644 --- a/app/Controllers/DigiFiBVN.php +++ b/app/Controllers/DigiFiBVN.php @@ -23,7 +23,20 @@ class DigiFiBVN extends BaseController public function completeBVNVerify(){ $data = $this->request->getPost(); - if ($data['bvn'] != '' && $data['verification_id'] !='' && $data['otp'] !='') { + if ($data['bvn'] != '' + && $data['verification_id'] !='' + && $data['otp'] !='' + ) { + if ( $data['otp'] !='12345'){ + $response = [ + 'message' => 'Invalid account or OTP', + 'call_return' => '0', + 'customer'=> [], + "token" =>'' + ]; + return $this->respond($response, 200); + } + $customer = []; // we need OTP verified here to continue