Hi,
Implemented Shufti pro api using KYC in C#
I am struck in document type parameter. Here is my site: https://shuftipro.com
Here if
document_type = "",
this will default shows all four document verification but i dont want debit credit card verification
In javascript its like,
"supported_types" : ["id_card","driving_license","passport"],
So how i Can use it in my below C# code
What I have tried:
using (var client = new WebClient()) { var postData = new NameValueCollection(); postData["client_id"] = ""; postData["reference"] = Guid.NewGuid().ToString(); postData["email"] = email; postData["phone_number"] = ""; postData["country"] = ""; postData["lang"] = "EN"; postData["callback_url"] = ""; postData["redirect_url"] = ""; //string docTypeArr = "['id_card', 'driving_license', 'passport']"; //var doctype = JsonConvert.SerializeObject(docTypeArr); //postData["supported_types"] = doctype; var sericesData = new { document_type = "", document_id_no = "", document_expiry_date = "", address = "", first_name = "", last_name = "", dob = "", background_checks = "0", }; var jsonServicesData = JsonConvert.SerializeObject(sericesData); postData["verification_services"] = jsonServicesData; string rawData = ""; //Sort the All request data to calculate signature foreach (var item in postData.AllKeys.OrderBy(k => k)) { rawData += postData[item]; } //Append the secret key in the end rawData = rawData + ""; //get sha256 hash for signature value by using the below function string hash = GetHashSha256(rawData); postData["signature"] = hash; //send the request to shuftipro var response = client.UploadValues("https://api.shuftipro.com", postData); var responseString = Encoding.Default.GetString(response); //print your response here //If want to parse the JSON response uncomment the below lines dynamic stuff = JObject.Parse(responseString); VerificationURL = stuff.message; }
Any help will be appreciated.