public static string IdServiceValidation(IdValidationRequest idValidation) { var idType = ""; switch (idValidation.idType.ToLower()) { case "nin": idType = "nin"; break; case "vin": idType = "vin"; break; case "passport": idType = "passport"; break; case "frsc": idType = "frsc"; break; default: idType = ""; break; } var responseString = ""; var fullUrl = seamFixBaseUrl + "id-service/" + idType; idValidation.transactionRef = KycLogic.GenerateTransactionRef(); var json = JsonConvert.SerializeObject(idValidation); var requestTime = DateTime.Now; try { using (var client = new HttpClient()) { Utils.AddCustomHeadersToHttpClient(client); var data = new StringContent(json, Encoding.UTF8, "application/json"); requestTime = DateTime.Now; var httpResponseMsg = client.PostAsync(fullUrl, data).Result; if (httpResponseMsg.IsSuccessStatusCode) { responseString = httpResponseMsg.Content.ReadAsStringAsync().Result; } } var responseTime = DateTime.Now; RequestResponseRepository.SaveRequestResponse("POST", json, requestTime, fullUrl, responseString, "", responseTime); } catch (Exception e) { ExceptionLogRepository.SaveExceptionLog(e); } return(responseString); }
public static string KycTier3Verification(KycTier3Verification KycTier3Verif) { var responseString = ""; var fullUrl = seamFixBaseUrl + "KYC Tier-3 Verification"; KycTier3Verif.transactionRef = KycLogic.GenerateTransactionRef(); var json = JsonConvert.SerializeObject(KycTier3Verif); var requestTime = DateTime.Now; try { using (var client = new HttpClient()) { Utils.AddCustomHeadersToHttpClient(client); var data = new StringContent(json, Encoding.UTF8, "application/json"); requestTime = DateTime.Now; var httpResponseMsg = client.PostAsync(fullUrl, data).Result; if (httpResponseMsg.IsSuccessStatusCode) { responseString = httpResponseMsg.Content.ReadAsStringAsync().Result; } } var responseTime = DateTime.Now; RequestResponseRepository.SaveRequestResponse("POST", json, requestTime, fullUrl, responseString, "", responseTime); } catch (Exception e) { ExceptionLogRepository.SaveExceptionLog(e); } return(responseString); }
protected void IdVal() { try { using (var client = new WebClient()) { var fullUrl = "http://localhost:52353/api/kyc/seamfix/v1/id-validation"; var values = new NameValueCollection(); values["idNo"] = "121290909090"; values["idBase64String"] = "wyueryiew"; values["surname"] = "bayo"; values["firstname"] = "ade"; values["dob"] = "1990-04-01"; values["passportBase64String"] = ""; values["idtype"] = "frsc"; values["transactionRef"] = KycLogic.GenerateTransactionRef(); var requestTime = DateTime.Now; var response = client.UploadValues(fullUrl, values); var responseTime = DateTime.Now; var responseString = Encoding.Default.GetString(response); } } catch (Exception e) { } }
protected void BvnVal() { try { using (var client = new WebClient()) { var fullUrl = "http://localhost:52353/api/kyc/seamfix/v1/bvn"; var values = new NameValueCollection(); //client.Headers.Add("Content-Type", "application/json"); //client.Headers.Add("Accept", "application/json"); values["bvn"] = "22222222223"; values["transactionRef"] = KycLogic.GenerateTransactionRef(); var requestTime = DateTime.Now; var response = client.UploadValues(fullUrl, values); //var response = client.UploadData(fullUrl, values); var responseTime = DateTime.Now; var responseString = Encoding.Default.GetString(response); } } catch (Exception e) { } }
public static string IdServiceFaceMatch(IdFaceMatchRequest idFaceValidation) { var responseString = ""; var idType = ""; switch (idFaceValidation.idType.ToLower()) { case "nin": idType = "nin"; break; case "vin": idType = "vin"; break; case "passport": idType = "passport"; break; case "frsc": idType = "frsc"; break; default: idType = ""; break; } try { using (var client = new WebClient()) { var fullUrl = seamFixBaseUrl + "id-service/" + idType; var values = new NameValueCollection(); values["idNo"] = idFaceValidation.idNo; values["idBase64String"] = idFaceValidation.idBase64String; values["surname"] = idFaceValidation.surname; values["firstname"] = idFaceValidation.firstname; values["dob"] = idFaceValidation.dob; values["passportBase64String"] = idFaceValidation.passportBase64String; idFaceValidation.transactionRef = KycLogic.GenerateTransactionRef(); values["transactionRef"] = idFaceValidation.transactionRef; var requestTime = DateTime.Now; var response = client.UploadValues(fullUrl, values); var responseTime = DateTime.Now; responseString = Encoding.Default.GetString(response); RequestResponseRepository.SaveRequestResponse("POST", values.ToString(), requestTime, fullUrl, responseString, "", responseTime); } } catch (Exception e) { ExceptionLogRepository.SaveExceptionLog(e); } return(responseString); }
public BankBvnResponse DoIdServicesValidation(BankBvnRequest bankBvnRequest) { return(KycLogic.GetCustomerBvnDetails(bankBvnRequest)); }
public AddressVerificationStatusResponse DoAddressVerifStatusResp(string referenceNo) { return(KycLogic.AddressVerificationStatusResponseProcessor(referenceNo)); }
public AddressVerificationResponse DoAddressVerifReq(AddressVerificationRequest AddressVerifReq) { return(KycLogic.AddressVerificationResponseProcessor(AddressVerifReq)); }
public KycTier3VerifResponse DoKycTier3Req(KycTier3Verification KycTier3Req) { return(KycLogic.KycTier3VerifResponseProcessor(KycTier3Req)); }
public StatusResponse DoStatus(StatusServiceRequest statusReq) { return(KycLogic.StatusResponseProcessor(statusReq)); }
public DocumentServiceResponse DoDocumentService(DocumentServiceRequest documentReq) { return(KycLogic.DocumentServiceProcessor(documentReq)); }
public BvnFacematchResponse DoBvnFacematch(BvnServiceFaceMatch bvnFaceMatchReq) { return(KycLogic.BvnFacematchProcessor(bvnFaceMatchReq)); }
public BvnResponse DoBvn(BvnServiceRequest bvnServiceRequest) { return(KycLogic.BvnProcessor(bvnServiceRequest)); }
public IdFacematchResponse DoIdFacematch(IdFaceMatchRequest idFaceMatchRequest) { return(KycLogic.IdFaceMatchProcessor(idFaceMatchRequest)); }
public IdValidationResponse DoIdServicesValidation(IdValidationRequest idValidationRequest) { return(KycLogic.IdValidationProcessor(idValidationRequest)); }