live bvn cover
This commit is contained in:
@@ -4,3 +4,5 @@ MONGO_URL = "mongodb://digifi:digifi@10.10.10.48:27017"
|
|||||||
VERIFY_ME_ENDPOINT = "https://vapi.verifyme.ng/v1/verifications/identities/bvn"
|
VERIFY_ME_ENDPOINT = "https://vapi.verifyme.ng/v1/verifications/identities/bvn"
|
||||||
VERIFY_ME_PUBLIC_KEY = "pk_live_9f4c2642862cb0190d3b72ca94579b2670fd797a124"
|
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"
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,20 @@ export const fetch = async (req, res)=>{
|
|||||||
try{
|
try{
|
||||||
console.log("BVN REQ-----------------------------------------");
|
console.log("BVN REQ-----------------------------------------");
|
||||||
console.log(req.body);
|
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=========================================");
|
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 = {
|
let config = {
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': 'Bearer ' + `${process.env.VERIFY_ME_PUBLIC_TEST_SECRET}`,
|
'Authorization': 'Bearer ' + `${envKey}`,
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -19,10 +29,11 @@ export const fetch = async (req, res)=>{
|
|||||||
"lastname":"Doe",
|
"lastname":"Doe",
|
||||||
"dob":"04-04-1944"
|
"dob":"04-04-1944"
|
||||||
};
|
};
|
||||||
//22349419550 real live
|
//22349419550 real live userBNV
|
||||||
//10000000001 test
|
//10000000001 test
|
||||||
|
// `${process.env.VERIFY_ME_ENDPOINT}/10000000001`,
|
||||||
axios.post(
|
axios.post(
|
||||||
`${process.env.VERIFY_ME_ENDPOINT}/10000000001`,
|
`${process.env.VERIFY_ME_ENDPOINT}/${userBNV}`,
|
||||||
bodyParameters
|
bodyParameters
|
||||||
,
|
,
|
||||||
config
|
config
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export const verifyEmployer = async (req, res)=>{
|
|||||||
"This serves as an employer’s 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." +
|
"This serves as an employer’s 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 " +
|
" Please click on the link below to confirm this before we can approve his loan\n " +
|
||||||
"<br><br>\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" +
|
"<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" +
|
"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";
|
"Finance team, <br> "+req.body.processing_bank_name+"<br>\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user