Beispiel #1
0
        public ActionResult PurchaseResults(string mydata)
        {
            var nvc = HttpUtility.ParseQueryString(mydata);
            var paymentResponseContaner = new dsiPDCXListener.Models.PaymentResponseContainer();

            var config = new dsiPDCXListener.Infrastructure.ConfigHelper();

            var configData = new dsiPDCXListener.Models.ConfigurationData();

            configData.MerchantAddress    = config.MerchantAddress;
            configData.MerchantCity       = config.MerchantCity;
            configData.MerchantName       = config.MerchantName;
            configData.MerchantPostalCode = config.MerchantPostalCode;
            configData.MerchantState      = config.MerchantState;
            configData.PostURL            = HttpContext.Application["PostURL"].ToString();
            configData.TranDeviceID       = HttpContext.Application["TranDeviceID"].ToString();
            configData.ComPort            = HttpContext.Application["ComPort"].ToString();
            configData.SecureDevice       = HttpContext.Application["SecureDevice"].ToString();
            configData.MerchantID         = HttpContext.Application["MerchantID"].ToString();


            var paymentResponseData = new dsiPDCXListener.Models.PaymentResponseData();

            paymentResponseData.AcctNo         = nvc["AcctNo"];
            paymentResponseData.AuthCode       = nvc["AuthCode"];
            paymentResponseData.Authorize      = nvc["Authorize"];
            paymentResponseData.CaptureStatus  = nvc["CaptureStatus"];
            paymentResponseData.CardType       = nvc["CardType"];
            paymentResponseData.CmdStatus      = nvc["CmdStatus"];
            paymentResponseData.DSIXReturnCode = nvc["DSIXReturnCode"];
            paymentResponseData.InvoiceNo      = nvc["InvoiceNo"];
            paymentResponseData.MerchantID     = nvc["MerchantID"];
            paymentResponseData.Purchase       = nvc["Purchase"];
            paymentResponseData.RecordNo       = nvc["RecordNo"];
            paymentResponseData.RefNo          = nvc["RefNo"];
            paymentResponseData.ResponseOrigin = nvc["ResponseOrigin"];
            paymentResponseData.TextResponse   = nvc["TextResponse"];
            paymentResponseData.TranCode       = nvc["TranCode"];

            paymentResponseContaner.PaymentResponseData = paymentResponseData;
            paymentResponseContaner.ConfigurationData   = configData;

            ViewBag.Message = paymentResponseData.CmdStatus;

            return(View(paymentResponseContaner));
        }
        public ActionResult PurchaseResults(string mydata)
        {
            var nvc = HttpUtility.ParseQueryString(mydata);
            var paymentResponseContaner = new dsiPDCXListener.Models.PaymentResponseContainer();

            var config = new dsiPDCXListener.Infrastructure.ConfigHelper();

            var configData = new dsiPDCXListener.Models.ConfigurationData();
            configData.MerchantAddress = config.MerchantAddress;
            configData.MerchantCity = config.MerchantCity;
            configData.MerchantName = config.MerchantName;
            configData.MerchantPostalCode = config.MerchantPostalCode;
            configData.MerchantState = config.MerchantState;
            configData.PostURL = HttpContext.Application["PostURL"].ToString();
            configData.TranDeviceID = HttpContext.Application["TranDeviceID"].ToString();
            configData.ComPort = HttpContext.Application["ComPort"].ToString();
            configData.SecureDevice = HttpContext.Application["SecureDevice"].ToString();
            configData.MerchantID = HttpContext.Application["MerchantID"].ToString();


            var paymentResponseData = new dsiPDCXListener.Models.PaymentResponseData();
            paymentResponseData.AcctNo = nvc["AcctNo"];
            paymentResponseData.AuthCode = nvc["AuthCode"];
            paymentResponseData.Authorize = nvc["Authorize"];
            paymentResponseData.CaptureStatus = nvc["CaptureStatus"];
            paymentResponseData.CardType = nvc["CardType"];
            paymentResponseData.CmdStatus = nvc["CmdStatus"];
            paymentResponseData.DSIXReturnCode = nvc["DSIXReturnCode"];
            paymentResponseData.InvoiceNo = nvc["InvoiceNo"];
            paymentResponseData.MerchantID = nvc["MerchantID"];
            paymentResponseData.Purchase = nvc["Purchase"];
            paymentResponseData.RecordNo = nvc["RecordNo"];
            paymentResponseData.RefNo = nvc["RefNo"];
            paymentResponseData.ResponseOrigin = nvc["ResponseOrigin"];
            paymentResponseData.TextResponse = nvc["TextResponse"];
            paymentResponseData.TranCode = nvc["TranCode"];

            paymentResponseContaner.PaymentResponseData = paymentResponseData;
            paymentResponseContaner.ConfigurationData = configData;

            ViewBag.Message = paymentResponseData.CmdStatus;

            return View(paymentResponseContaner);
        }