コード例 #1
0
 public ActionResult Accept(UPGModal model)
 {
     var rnd = new Random();
     var no  = rnd.Next(1000, 100000000);
     model.transactionnumber = no.ToString("0000000");
     model.transactiontime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
     doCheck(model);
     String data = Helpers.ConvertToQueryString<UPGModal>(model);
     var idx = model.callbackurl.IndexOf("/", 10);
     var returnurl = model.callbackurl.Substring(0, idx + 1) + "users";
     return Redirect(returnurl);
 }
コード例 #2
0
        private void doCheck(UPGModal model)
        {
            String data = Helpers.ConvertToQueryString<UPGModal>(model);
            HttpWebRequest webRequest = null;
            HttpWebResponse webResponse = null;

            try
            {

                webRequest = (HttpWebRequest)HttpWebRequest.Create(model.callbackurl + data);
                webRequest.Method = "get";
                webRequest.ContentType = "text/plain; encoding='utf-8'";

                //Get Response
                webResponse = (HttpWebResponse)webRequest.GetResponse();

                HttpWebRequest req;
                req = (HttpWebRequest)WebRequest.Create(model.callbackurl);
            }
            catch (Exception e)
            {
                System.Diagnostics.Debugger.Log(0, "here", e.Message);
            }
        }
コード例 #3
0
 private string getParamsFromModel(UPGModal model)
 {
     return model.callbackdata;
 }
コード例 #4
0
 public ActionResult Reject(UPGModal modal)
 {
     return View();
 }
コード例 #5
0
 //
 // GET: /UPG/
 public ActionResult Index(UPGModal model)
 {
     model.userrefno = model.itemcode;
     model.showentry = model.transactionamount;
     return View(model);
 }