fix verifications
This commit is contained in:
@@ -54,6 +54,13 @@ class DigiFiBVN extends BaseController
|
|||||||
'firstname' =>'firstname-'.rand(1,1000),
|
'firstname' =>'firstname-'.rand(1,1000),
|
||||||
'lastname' => 'lastname-'.rand(1,1000)
|
'lastname' => 'lastname-'.rand(1,1000)
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$udata = [
|
||||||
|
'bvn' => $data['bvn'],
|
||||||
|
'firstname' => $results["firstname"],
|
||||||
|
'lastname' => $results["lastname"],
|
||||||
|
];
|
||||||
|
|
||||||
$customer = $this->insert_db('customers',$udata);
|
$customer = $this->insert_db('customers',$udata);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -123,6 +130,50 @@ class DigiFiBVN extends BaseController
|
|||||||
return $this->fail($response, 500);
|
return $this->fail($response, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
*| Type | Collation | Nullable | Default
|
||||||
|
-------------+-----------------------------+-----------+----------+----------------------------------------
|
||||||
|
id | integer | | not null | nextval('bvn_checks_id_seq'::regclass)
|
||||||
|
uid | uuid | | | uuid_generate_v4()
|
||||||
|
bvn | character varying(15) | | not null |
|
||||||
|
status | integer | | | 1
|
||||||
|
added | timestamp without time zone | | | now()
|
||||||
|
updated | timestamp without time zone | | | now()
|
||||||
|
firstname | character varying(35) | | |
|
||||||
|
lastname | character varying(35) | | |
|
||||||
|
middlename | character varying(35) | | |
|
||||||
|
gender | character varying(5) | | |
|
||||||
|
birthdate | timestamp without time zone | | |
|
||||||
|
phone | character varying(35) | | |
|
||||||
|
nationality | character varying(15) | | |
|
||||||
|
Indexes:
|
||||||
|
"bvn_checks_id_key" UNIQUE CONSTRAINT, btree (id)
|
||||||
|
|
||||||
|
"bvn": "10000000001",
|
||||||
|
"firstname": "John",
|
||||||
|
"lastname": "Doe",
|
||||||
|
"middlename": "Favor",
|
||||||
|
"phone": "080000000001",
|
||||||
|
"birthdate": "1944-04-04",
|
||||||
|
"gender": "m",
|
||||||
|
"nationality": "Nigerian",
|
||||||
|
|
||||||
|
*/
|
||||||
|
$bvn = $data['bvn'];
|
||||||
|
|
||||||
|
$firstname = $bvnData["res"]["data"]["firstname"];
|
||||||
|
$lastname = $bvnData["res"]["data"]["lastname"];
|
||||||
|
$middlename = $bvnData["res"]["data"]["middlename"];
|
||||||
|
$phone = $bvnData["res"]["data"]["phone"];
|
||||||
|
$birthdate = $bvnData["res"]["data"]["birthdate"];
|
||||||
|
$gender = $bvnData["res"]["data"]["gender"];
|
||||||
|
$nationality = $bvnData["res"]["data"]["nationality"];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$sqlUpdate = "UPDATE bvn_checks SET firstname ='$firstname', lastname='$lastname', middlename='$middlename' , phone='$phone' , birthdate='$birthdate' , gender='$gender' , nationality='$nationality' WHERE bvn = '$bvn' ";
|
||||||
|
$query = $this->db->query($sqlUpdate);
|
||||||
|
|
||||||
$response = [
|
$response = [
|
||||||
'message' => 'Verification text sent to user',
|
'message' => 'Verification text sent to user',
|
||||||
'call_return' => '100',
|
'call_return' => '100',
|
||||||
|
|||||||
Reference in New Issue
Block a user