首页 > 代码库 > 移动端银联支付,wap接入

移动端银联支付,wap接入

银联文件下载地址:http://202.101.25.178:8080/sim/docs/

 

public ActionResult unionTest()
        {
            Dictionary<String, String> resp = new Dictionary<String, String>();
            DateTime orderTime = DateTime.Now;
            bool validResp = UpmpConfig.UnionPay(orderTime.ToString("yyyyMMddhhmmss"), 8349, 1, out resp, out orderTime);
            if (validResp)
            {
                string tn = resp["tn"];
                string resultUrl = UpmpConfig.GetInstance().MER_FRONT_END_URL;
                resultUrl = System.Web.HttpUtility.UrlEncode(resultUrl);
                string parastr = "tn=" + tn + ",resultUrl=" + resultUrl + ",usertestmode=true";

                byte[] bytes = Encoding.Default.GetBytes(parastr);
                parastr = Convert.ToBase64String(bytes);
                parastr = System.Web.HttpUtility.UrlEncode(parastr);

                ViewBag.UnionPara = parastr;
                return View();
            }

            return View();
        }

移动端银联支付,wap接入