how to integrate PayU payment gateway in windows phone 8.1?

449 views Asked by At

I am developing on Windows phone application. I have implemented code for payment getway using pay U. When I post html file with all parameters, I get an error. It says, "checksum failed. please contact your merchant". Can you please provide me any demo developed for windows phone 8.1.

Below Code : Ex 1)

    public string Generatehash512(string text)
    {
        byte[] message = Encoding.UTF8.GetBytes(text);
        byte[] hashValue;
        SHA512Managed hashString = new SHA512Managed();
        string hex = "";
        hashValue = hashString.ComputeHash(message);
        foreach (byte x in hashValue)
        {
            hex += String.Format("{0:x2}", x);
        }
        return hex;
    }

above code work fine in asp.net or asp-mvc.net but not work in windows phone 8.1 app ,

i have implemented Below code(EX.2) same like above code(EX.1) in windows phone 8.1 but its not work .

Ex 2) Windows phone 8.1 universal app code

    public string Generatehash512(string text)
    {
        HashAlgorithmProvider hashProvider = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha512);
        IBuffer hash = hashProvider.HashData(CryptographicBuffer.ConvertStringToBinary(text, BinaryStringEncoding.Utf8));
        string hashValue = CryptographicBuffer.EncodeToBase64String(hash);
        IBuffer digest;
        digest = hashProvider.HashData(hash);
        string hex = CryptographicBuffer.EncodeToHexString(digest);
        return hex;
    }

![enter image description here][1]

Above Error Show at run time, after passing all parameters .

Thank You :)

0

There are 0 answers