Exemple #1
0
        private static Dictionary <string, string> BuildRequestPara(SortedDictionary <string, string> sParaTemp)
        {
            Dictionary <string, string> sPara = new Dictionary <string, string>();
            string str = "";

            sPara = AlipayCore.FilterPara(sParaTemp);
            str   = BuildRequestMysign(sPara);
            sPara.Add("sign", str);
            sPara.Add("sign_type", _sign_type);
            return(sPara);
        }
Exemple #2
0
        private bool GetSignVeryfy(SortedDictionary <string, string> inputPara, string sign)
        {
            Dictionary <string, string> dictionary = new Dictionary <string, string>();
            string prestr = AlipayCore.CreateLinkString(AlipayCore.FilterPara(inputPara));
            bool   flag   = false;

            if (((sign != null) && (sign != "")) && (this._sign_type == "MD5"))
            {
                flag = AlipayMD5.Verify(prestr, sign, this._key, this._input_charset);
            }
            return(flag);
        }
Exemple #3
0
        private string GetPreSignStr(SortedDictionary <string, string> inputPara)
        {
            Dictionary <string, string> dictionary = new Dictionary <string, string>();

            return(AlipayCore.CreateLinkString(AlipayCore.FilterPara(inputPara)));
        }
Exemple #4
0
        private static string BuildRequestParaToString(SortedDictionary <string, string> sParaTemp, Encoding code)
        {
            Dictionary <string, string> dictionary = new Dictionary <string, string>();

            return(AlipayCore.CreateLinkStringUrlencode(BuildRequestPara(sParaTemp), code));
        }
Exemple #5
0
        private static string BuildRequestMysign(Dictionary <string, string> sPara)
        {
            string prestr = AlipayCore.CreateLinkString(sPara);

            return((_sign_type == "MD5") ? AlipayMD5.Sign(prestr, _key, _input_charset) : "");
        }