Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="parmName"></param>
        /// <returns></returns>
        public string GetParmValue(string parmName)
        {
            string parmValue = WebBase.GetQueryStringString(parmName, "");

            if (string.IsNullOrEmpty(parmValue))
            {
                parmValue = WebBase.GetFormString(parmName, "");
            }
            return(parmValue);
        }
Пример #2
0
        public void ProcessRequest(HttpContext context)
        {
            string url = HttpUtility.UrlDecode(WebBase.GetQueryStringString("url", string.Empty));

            if (!string.IsNullOrEmpty(url))
            {
                url = viviLib.Security.Cryptography.DecryptConnString(url).Replace("\0", "");

                ShowImage(url);
            }

            //context.Response.ContentType = "text/plain";
            //context.Response.Write("Hello World");
        }
Пример #3
0
        public void ProcessRequest(HttpContext context)
        {
            string url     = "";
            string message = "未知错误";

            try
            {
                string orderid = WebBase.GetQueryStringString("oid", "");

                if (!string.IsNullOrEmpty(orderid))
                {
                    var info = Factory.Instance.GetModelByOrderId(orderid);
                    if (info == null)
                    {
                        message = "不存在此订单";
                    }
                    else
                    {
                        if (info.status == 1)
                        {
                            message = "未完成支付";
                        }
                        else
                        {
                            url = viviapi.SysInterface.Bank.Utility.GetReturnUrl(info);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                message = ex.Message;
            }

            var result = new QueryOrderResult {
                msg = message, url = url
            };
            string text = Newtonsoft.Json.JsonConvert.SerializeObject(result, Newtonsoft.Json.Formatting.Indented);

            context.Response.ContentType = "application/json";
            context.Response.Write(text);
        }
Пример #4
0
        public void ProcessRequest(HttpContext context)
        {
            string callback = "";

            try
            {
                string cacheKey = WebBase.GetQueryStringString("cacheKey", "");
                string passKey  = WebBase.GetQueryStringString("passKey", "");

                //键值是否有效
                if (string.IsNullOrEmpty(cacheKey))
                {
                    callback = ("CacheKey is not null!");
                }

                //对传递的参数进行有效性检查
                if (passKey != viviLib.Security.Cryptography.MD5(cacheKey + viviapi.SysConfig.MemCachedConfig.AuthCode))
                {
                    callback = ("AuthCode is not valid!");
                }


                if (string.IsNullOrEmpty(callback))
                {
                    WebCache.LoadCacheStrategy(new DefaultCacheStrategy());
                    WebCache.GetCacheService().RemoveObject(cacheKey);
                    WebCache.LoadDefaultCacheStrategy();
                }


                callback = "OK";
            }
            catch (Exception)
            {
                callback = "Error";
            }
            context.Response.ContentType = "text/plain";
            context.Response.Write(callback);
        }
Пример #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int    userid    = WebBase.GetQueryStringInt32("u", 0);
            int    manageid  = WebBase.GetQueryStringInt32("m", 0);
            string sessionId = WebBase.GetQueryStringString("key", "");
            string sign      = WebBase.GetQueryStringString("sign", "");

            string plain = string.Format("{0}|{1}|{2}{3}", userid, manageid,
                                         sessionId, viviapi.BLL.Sys.Constant.ManageGOTOUserAdminKey);


            string sign2 = viviLib.Security.Cryptography.MD5(plain);

            if (sign == sign2)
            {
                int manageid2 = viviapi.BLL.ManageFactory.GetIdBySession(sessionId);
                if (manageid == manageid2)
                {
                    HttpContext.Current.Session[viviapi.BLL.Sys.Constant.ManageGOTOUserAdminKey] = userid;

                    Response.Redirect("/usermodule/account/index.aspx");
                }
            }
        }