Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Logger logger = new Logger();

            try
            {
                logger.Log("Begin processing card...");

                string url = System.Configuration.ConfigurationSettings.AppSettings["serviceURI"];

                string input = "";

                using (StreamReader sr = new StreamReader(HttpContext.Current.Request.InputStream))
                {
                    input = sr.ReadToEnd();
                }

                if (input == "")
                {
                    logger.Log("There was no input xml passed from Google Cart");
                    return;
                }

                OrderProcessor.Processor p = new OrderProcessor.Processor();
                p.DoIt(input);

            }
            catch (Exception ex)
            {
                logger.Log(ex.Source, ex.Message, ex.Data.ToString(), ex.StackTrace, ex.TargetSite.Name, Logger.ErrorLevels.ERROR, "some bad shit occured");
            }
        }
Beispiel #2
0
        public void cmdSendCard_OnClick(object sender, EventArgs e)
        {
            string s = Id.Substring(Id.IndexOf("#")+1);

            int id;
            bool b = int.TryParse(s, out id);
            if (b)
            {
                OrderProcessor.Processor p = new OrderProcessor.Processor();
                p.DoIt(id);
            }

            Response.Redirect("http://pinked.breastfriends.org");
        }