Exemplo n.º 1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            ccJoin.ValidateCaptcha(TextBox1.Text);
            if (!ccJoin.UserValidated)
            {
                Label4.Text = "Mã bảo vệ chưa chính xác";
                return;
            }
            if (Session["payMethod"].ToString().Equals("0"))
            {
                var logic    = new SaveOperateLogic();
                var response = Invoke(logic, SaveRequestModel);
                if (HasError)
                {
                    return;
                }
            }
            var checkout = new CheckoutOperateLogic();
            var result   = Invoke(checkout, CheckoutRequestModel);

            if (HasError)
            {
                return;
            }
            Session["Cart"]         = null;
            Session["payMethod"]    = null;
            Session["GiftCd"]       = null;
            Session["GiftPrice"]    = null;
            Session["AcceptSlipNo"] = null;
            Session["isFirstPay"]   = true;
            Session["AcceptSlipNo"] = result.AcceptSlipNo;
            if (CheckoutRequestModel.Accept.PaymentMethods == "02")
            {
                makePay(CheckoutRequestModel.Accept);
            }
            Response.Redirect(Pages.CLIENT_OVERVIEW);
        }
Exemplo n.º 2
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     ccJoin.ValidateCaptcha(TextBox1.Text);
     if (!ccJoin.UserValidated)
     {
         Label4.Text = "Mã bảo vệ chưa chính xác";
         return;
     }
     if (Session["payMethod"].ToString().Equals("0"))
     {
         var logic = new SaveOperateLogic();
         var response = Invoke(logic, SaveRequestModel);
         if (HasError) return;
     }
     var checkout = new CheckoutOperateLogic();
     var result = Invoke(checkout, CheckoutRequestModel);
     if (HasError) return;
     Session["Cart"] = null;
     Session["payMethod"] = null;
     Session["GiftCd"] = null;
     Session["GiftPrice"] = null;
     Session["AcceptSlipNo"] = null;
     Session["isFirstPay"] = true;
     Session["AcceptSlipNo"] = result.AcceptSlipNo;
     if (CheckoutRequestModel.Accept.PaymentMethods == "02")
     {
         makePay(CheckoutRequestModel.Accept);
     }
     Response.Redirect(Pages.CLIENT_OVERVIEW);
 }