live bvn cover

This commit is contained in:
CHIEFSOFT\ameye
2024-09-10 08:02:00 -04:00
parent dd210d5ae2
commit 9b3efe70de
3 changed files with 18 additions and 5 deletions
+3 -1
View File
@@ -3,4 +3,6 @@ MONGO_URL = "mongodb://digifi:digifi@10.10.10.48:27017"
VERIFY_ME_ENDPOINT = "https://vapi.verifyme.ng/v1/verifications/identities/bvn"
VERIFY_ME_PUBLIC_KEY = "pk_live_9f4c2642862cb0190d3b72ca94579b2670fd797a124"
VERIFY_ME_PUBLIC_TEST_SECRET = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE1MjgzNywiZW52IjoidGVzdCIsImlhdCI6MTY1ODgyMzY0OH0.PszalhCuvCv6Y7kK41o3LuJh_R9kIlodbtWSi8HoFnI"
VERIFY_ME_PUBLIC_TEST_SECRET = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE1MjgzNywiZW52IjoidGVzdCIsImlhdCI6MTY1ODgyMzY0OH0.PszalhCuvCv6Y7kK41o3LuJh_R9kIlodbtWSi8HoFnI"
VERIFY_ME_PUBLIC_LIVE_SECRET = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE1MjgzNywiZW52IjoibGl2ZSIsImlhdCI6MTY1ODgyMzY0OH0.jGwa1S6BKr14-QC_0isfVdmhjo_geC1EgyqIh65fhY4"
+14 -3
View File
@@ -6,10 +6,20 @@ export const fetch = async (req, res)=>{
try{
console.log("BVN REQ-----------------------------------------");
console.log(req.body);
//{ bvn: '12345678912', '10000000001': '10000000001', verify_mode: 1000 }
const userBNV = req.body.bvn;
const verifyMode = req.body.verify_mode;
console.log("BVN REQ=========================================");
const envKey = process.env.VERIFY_ME_PUBLIC_TEST_SECRET;
if (verifyMode === 100) // this is live
{
const envKey = process.env.VERIFY_ME_PUBLIC_LIVE_SECRET;
}
// 'Authorization': 'Bearer ' + `${process.env.VERIFY_ME_PUBLIC_TEST_SECRET}`,
let config = {
headers: {
'Authorization': 'Bearer ' + `${process.env.VERIFY_ME_PUBLIC_TEST_SECRET}`,
'Authorization': 'Bearer ' + `${envKey}`,
'Content-Type': 'application/json'
}
};
@@ -19,10 +29,11 @@ export const fetch = async (req, res)=>{
"lastname":"Doe",
"dob":"04-04-1944"
};
//22349419550 real live
//22349419550 real live userBNV
//10000000001 test
// `${process.env.VERIFY_ME_ENDPOINT}/10000000001`,
axios.post(
`${process.env.VERIFY_ME_ENDPOINT}/10000000001`,
`${process.env.VERIFY_ME_ENDPOINT}/${userBNV}`,
bodyParameters
,
config
+1 -1
View File
@@ -27,7 +27,7 @@ export const verifyEmployer = async (req, res)=>{
"This serves as an employers commitment to notify you that your staff (<b>"+employee_name+"</b>) who holds the position of software engineer in your organization took a loan facility from our bank and has prompted us to notify you so as to confirm his existence as a staff of your organization." +
" Please click on the link below to confirm this before we can approve his loan\n " +
"<br><br>\n" +
"***<a href='"+approve_link+"/"+application_uid+"'>Employer commitment link</a> (You are to login with this email address and default password "+approve_password+" )\n " +
"***<a href='"+approve_link+"/"+application_uid+"'>Employer commitment link</a> (You are to login with this email address and default password <b> "+approve_password+" </b>)\n " +
"<br><br>\n" +
"If you have any questions or concerns with respect to this email, please contact our finance department at <b>"+req.body.processing_bank_email+"</b>.\n \n Kind Regards,<br><br>\n" +
"Finance team, <br> "+req.body.processing_bank_name+"<br>\n";