예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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)
            {
            }
        }
예제 #4
0
        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)
            {
            }
        }
예제 #5
0
        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);
        }
예제 #6
0
 public BankBvnResponse DoIdServicesValidation(BankBvnRequest bankBvnRequest)
 {
     return(KycLogic.GetCustomerBvnDetails(bankBvnRequest));
 }
예제 #7
0
 public AddressVerificationStatusResponse DoAddressVerifStatusResp(string referenceNo)
 {
     return(KycLogic.AddressVerificationStatusResponseProcessor(referenceNo));
 }
예제 #8
0
 public AddressVerificationResponse DoAddressVerifReq(AddressVerificationRequest AddressVerifReq)
 {
     return(KycLogic.AddressVerificationResponseProcessor(AddressVerifReq));
 }
예제 #9
0
 public KycTier3VerifResponse DoKycTier3Req(KycTier3Verification KycTier3Req)
 {
     return(KycLogic.KycTier3VerifResponseProcessor(KycTier3Req));
 }
예제 #10
0
 public StatusResponse DoStatus(StatusServiceRequest statusReq)
 {
     return(KycLogic.StatusResponseProcessor(statusReq));
 }
예제 #11
0
 public DocumentServiceResponse DoDocumentService(DocumentServiceRequest documentReq)
 {
     return(KycLogic.DocumentServiceProcessor(documentReq));
 }
예제 #12
0
 public BvnFacematchResponse DoBvnFacematch(BvnServiceFaceMatch bvnFaceMatchReq)
 {
     return(KycLogic.BvnFacematchProcessor(bvnFaceMatchReq));
 }
예제 #13
0
 public BvnResponse DoBvn(BvnServiceRequest bvnServiceRequest)
 {
     return(KycLogic.BvnProcessor(bvnServiceRequest));
 }
예제 #14
0
 public IdFacematchResponse DoIdFacematch(IdFaceMatchRequest idFaceMatchRequest)
 {
     return(KycLogic.IdFaceMatchProcessor(idFaceMatchRequest));
 }
예제 #15
0
 public IdValidationResponse DoIdServicesValidation(IdValidationRequest idValidationRequest)
 {
     return(KycLogic.IdValidationProcessor(idValidationRequest));
 }