public void Getqrcode_img_url(string orderid, decimal orderAmt, string bankcode) { var info = OrderBankCodePay.Instance.GetModel(orderid); if (info == null) { var api = new Qrcode(); qrcode_img_url = api.Getqrcode_img_url(orderid, orderAmt, bankcode); if (string.IsNullOrEmpty(qrcode_img_url)) { Response.Write("error 1"); Response.End(); } info = new viviapi.Model.Order.Bank.OrderBankCodePay { addTime = DateTime.Now, channel = 101, codeImgUrl = qrcode_img_url, sysOrderNo = orderid, updateTime = DateTime.Now }; int infoId = OrderBankCodePay.Instance.Add(info); if (infoId <= 0) { Response.Write("error 2"); Response.End(); } } else { qrcode_img_url = info.codeImgUrl; } if (!string.IsNullOrEmpty(qrcode_img_url)) { } //litimg.Text = string.Format("<img src='{0}' />", qrcode_img_url); }
public void Getqrcode_img_url(int suppid, string orderid, decimal orderAmt, string bankcode) { var info = OrderBankCodePay.Instance.GetModel(orderid); if (info == null) { var SuppInfo = viviapi.BLL.Supplier.Factory.GetCacheModel(suppid); if (SuppInfo != null) { company_name = SuppInfo.desc; if (SuppInfo.multiacct) { var itemInfo = suppAcctBll.GetCacheModelByDomain((int)SupplierCode.Weixin , HttpContext.Current.Request.Url.Authority); if (itemInfo != null) { company_name = itemInfo.jumpdomain; } } } if (suppid == (int)SupplierCode.Swiftpass) { var api = new viviapi.ETAPI.Swiftpass.Gateway(); Hashtable param = api.submitOrderInfo(orderid, orderAmt); if (param == null) { Response.Write("系统出错,请联系客服处理 ErrCode 2000"); Response.End(); } else { qrcode_img_url = param["code_img_url"].ToString(); code_url = param["code_url"].ToString(); } } else if (suppid == (int)SupplierCode.Weixin) { var wxpay = new viviapi.ETAPI.Weixin.Utility(); qrcode_img_url = wxpay.GetH5Url(orderid, orderAmt, string.Empty, HttpContext.Current); if (!string.IsNullOrEmpty(qrcode_img_url)) { WxH5Url = qrcode_img_url; } } if (!string.IsNullOrEmpty(qrcode_img_url)) { info = new viviapi.Model.Order.Bank.OrderBankCodePay { addTime = DateTime.Now, channel = 100, codeImgUrl = qrcode_img_url, sysOrderNo = orderid, updateTime = DateTime.Now }; int infoId = OrderBankCodePay.Instance.Add(info); if (infoId <= 0) { Response.Write("系统出错,请联系客服处理 ErrCode 2001"); Response.End(); } } } else { qrcode_img_url = info.codeImgUrl; } //if (!string.IsNullOrEmpty(qrcode_img_url)) // litimg.Text = string.Format("<img src='{0}' />", qrcode_img_url); }
public void Getqrcode_img_url(int suppid, string orderid, decimal orderAmt, string bankcode) { var info = OrderBankCodePay.Instance.GetModel(orderid); if (info == null) { var SuppInfo = viviapi.BLL.Supplier.Factory.GetCacheModel(suppid); if (SuppInfo != null) { company_name = SuppInfo.desc; if (SuppInfo.multiacct) { var itemInfo = suppAcctBll.GetCacheModelByDomain((int)SupplierCode.Zweixin , HttpContext.Current.Request.Url.Authority); if (itemInfo != null) { company_name = itemInfo.jumpdomain; } } } if (suppid == (int)SupplierCode.Swiftpass) { var api = new viviapi.ETAPI.Swiftpass.Gateway(); Hashtable param = api.submitOrderInfo(orderid, orderAmt); if (param == null) { Response.Write("系统出错,请联系客服处理 ErrCode 2000"); Response.End(); } else { qrcode_img_url = param["code_img_url"].ToString(); code_url = param["code_url"].ToString(); } } else if (suppid == (int)SupplierCode.Zweixin) { var zwxPay = new viviapi.ETAPI.Zweixin.ZweixinPay(); qrcode_img_url = zwxPay.GetCodeUrl(orderid, orderAmt, string.Empty, HttpContext.Current); if (!string.IsNullOrEmpty(qrcode_img_url)) { string urldata = viviLib.Security.Cryptography.EncryptConnString(qrcode_img_url); qrcode_img_url = Host + "/wxqrcode.ashx?url=" + HttpUtility.UrlEncode(urldata); } } if (!string.IsNullOrEmpty(qrcode_img_url)) { info = new viviapi.Model.Order.Bank.OrderBankCodePay { addTime = DateTime.Now, channel = 100, codeImgUrl = qrcode_img_url, sysOrderNo = orderid, updateTime = DateTime.Now }; int infoId = OrderBankCodePay.Instance.Add(info); if (infoId <= 0) { Response.Write("系统出错,请联系客服处理 ErrCode 2001"); Response.End(); } } } else { qrcode_img_url = info.codeImgUrl; } }