Exemplo n.º 1
0
        public static bool VerifyNotify(SortedDictionary <string, string> inputPara, string notify_id, string sign, string _key, string _input_charset, string _partner)
        {
            Dictionary <string, string> strs = new Dictionary <string, string>();
            string str  = OutPayHelp.CreateLinkString(OutPayHelp.FilterPara(inputPara));
            bool   flag = OutPayHelp.Verify(str, sign, _key, _input_charset);
            string str1 = "true";

            if ((notify_id == null ? false : notify_id != ""))
            {
                string   str2      = "https://mapi.alipay.com/gateway.do?service=notify_verify&";
                HttpHelp httpHelp  = new HttpHelp();
                string[] strArrays = new string[] { str2, "partner=", _partner, "&notify_id=", notify_id };
                str1 = httpHelp.DoGet(string.Concat(strArrays), null);
            }
            return((str1 != "true" ? true : !flag) ? false : true);
        }
Exemplo n.º 2
0
        public static bool VerifyNotify(SortedDictionary <string, string> inputPara, string notify_id, string sign, string _key, string _input_charset, string _partner)
        {
            Dictionary <string, string> dicArray = new Dictionary <string, string>();

            dicArray = OutPayHelp.FilterPara(inputPara);
            string prestr = OutPayHelp.CreateLinkString(dicArray);
            bool   flag   = OutPayHelp.Verify(prestr, sign, _key, _input_charset);
            string a      = "true";

            if (notify_id != null && notify_id != "")
            {
                string text = "https://mapi.alipay.com/gateway.do?service=notify_verify&";
                a = new HttpHelp().DoGet(string.Concat(new string[]
                {
                    text,
                    "partner=",
                    _partner,
                    "&notify_id=",
                    notify_id
                }), null);
            }
            return(a == "true" && flag);
        }