码迷,mamicode.com
首页 > 移动开发 > 详细

移动端银联支付,wap接入

时间:2014-12-03 20:51:07      阅读:144      评论:0      收藏:0      [点我收藏+]

标签:http   io   ar   os   sp   on   文件   bs   cti   

银联文件下载地址: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接入

标签:http   io   ar   os   sp   on   文件   bs   cti   

原文地址:http://www.cnblogs.com/wangchengshen/p/4140929.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!