Exemplo n.º 1
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            string a        = base.Request.Form["return_code"];
            string arg_2B_0 = base.Request.Form["return_msg"];
            string text     = base.Request.Form["code_url"];
            string text2    = base.Request.Form["orderID"];
            string text3    = base.Request.Form["amount"];

            if (a == "SUCCESS" && text != null && text != "")
            {
                Bitmap bitmap = new QrImage
                {
                    Mode       = "byte",
                    Version    = -1,
                    Size       = 200,
                    Padding    = 10,
                    Level      = "Q",
                    Background = Color.White,
                    Foreground = Color.Black
                }.CreateImage(text);
                System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
                bitmap.Save(memoryStream, ImageFormat.Png);
                byte[] buffer = memoryStream.GetBuffer();
                this.imagecode  = System.Convert.ToBase64String(buffer, 0, buffer.Length);
                this.amountcode = text3;
                this.orderid    = text2;
            }
        }