/// <summary> /// 加载支付方式 /// </summary> public object GetPayType() { BLL.PaymentBase pay = new BLL.PaymentBase(); var list = pay.GetModelList(" pay_IsDel = 0 and pay_isPhone = 1"); ViewData["PayTypeList"] = list; return ViewData["PayTypeList"]; }
/// <summary> /// 订单提交 /// </summary> public void SubmitOrder() { var context = System.Web.HttpContext.Current; string result = ""; string payID = context.Request.Params["payID"]; string resultUrl = ""; if (!string.IsNullOrWhiteSpace(payID)) { var model = new BLL.PaymentBase().GetModel(Convert.ToInt32(payID)); resultUrl = model.pay_Url; } try { //生成订单 int orderID = 0; using (var scope = new TransactionScope()) { orderID = CreateOrder(); CreateOrderSKUDetail(orderID); scope.Complete(); } result = "{'result':'保存成功!','orderId':'" + orderID + "','url':'" + resultUrl + "'}"; } catch (Exception e) { result = e.Message; } finally { } context.Response.Write(result); }
/// <summary> /// 支付方式 /// </summary> public void GetPayType() { BLL.PaymentBase pay = new BLL.PaymentBase(); var list = pay.GetModelList(" pay_IsDel = 0 and pay_isPhone = 0"); ViewData["PayTypeList"] = list; }