protected void Page_Load(object sender, EventArgs e) { //if(!Common.SessionValidate.IsLogin()) //{ //} int CId = Convert.ToInt32(Session["id"]); if (!IsPostBack) { OrderCode = DateTime.Now.ToString("yyyyMMddHHmmss") + Session["id"]; CartInfoBLL bll = new CartInfoBLL(); DtCartInfo = bll.GetAllCartInfo(CId); } else { OrderMainBLL bll = new OrderMainBLL(); string orderId = Request["orderId"]; int customerId = Convert.ToInt32(Session["id"]); if (bll.ExecProc(orderId, customerId)) { //AliPay API //partner: business id //return_url: //subject: product name //body: product description //out_trade_no: orderId //total_fee: total price //seller_email: email address //sign: (total price, business id, order id, product name, business password,) use get method StringBuilder sb = new StringBuilder("http://*****:*****@gmail.com"); //sign: total price, bisiness ID, orderId, product name, bisiness password, //using MD5(utf-8, "x2", toLower) string sign = total_fee + "lizhen325" + orderId + "book" + "123"; sign = Common.MD5Encrypt.EncryptAli(sign); sb.Append("&sign=" + sign); Response.Redirect(sb.ToString()); } else { Response.Redirect("Error.html"); } } }