how to get json result from payfort Apis in C#
<p>The problem I am facing is that, payfort API should return me some json. But instead i get some html that has some hidden fields. and i see no error written inside there.</p>

<p>Here is my code </p>

<pre><code>string access_code = string.Empty,
            amount = string.Empty,
            currency = string.Empty,
            customer_email = string.Empty,
            merchant_reference = string.Empty,
            order_description = string.Empty,
            language = string.Empty,
            merchant_identifier = string.Empty,
            signature = string.Empty,
            command = string.Empty;

        access_code = "X78979879h8h8h8";
        amount = "1000";
        command = "AUTHORIZATION";
        currency = "AED";
        customer_email = "zetawars@hotmail.com";
        language = "en";
        merchant_identifier = "RaskdQuCc";
        merchant_reference = "ASASASASASADSS";
        order_description = "Some order details";
        signature = "";

        string signature_string = "PASSaccess_code="+access_code+"amount="+amount+"command="+command+"currency="+currency+"customer_email"+customer_email+"language"+language+"merchant_identifier"+merchant_identifier+"merchant_reference"+merchant_reference+"order_description"+order_description+"PASS";

        signature = getHashSha256(signature_string);
        string url = "https://sbcheckout.payfort.com/FortAPI/paymentPage";
        string param = "access_code" + access_code + "&amp;amount=" + amount + "&amp;currency=" + currency + 
            "&amp;customer_email=" + customer_email + "&amp;merchant_reference=" + merchant_reference + 
            "&amp;order_description=" + order_description + "&amp;language=" + language + "merchant_identifier=" 
            + merchant_identifier + "&amp;signature=" + signature + "&amp;command=" + command;


        using (WebClient wc = new WebClient())
        {
            wc.Headers[HttpRequestHeader.ContentType] = "application/json";
            //wc.Headers.Add("Content-Type", "application/json");
            string HtmlResult = wc.UploadString(url, param);
        }
</code></pre>