public ActionResult Payment3dSecureIframe()
        {
            var transaction = _transactionService.GetById(BasketContext.Current.TransactionId.Value);

            DataCashPayment payment = new DataCashPayment(transaction);

            string hostUrl = Request.Url.Scheme + "://" + Request.ServerVariables["HTTP_HOST"];
            Payment3dSecureIframeViewModel model = new Payment3dSecureIframeViewModel
            {
                AcsUrl  = payment.AcsUrl,
                PaReq   = payment.PaReq,
                MD      = payment.MD,
                TermUrl = new Uri(new Uri(Request.Url.GetComponents(UriComponents.SchemeAndServer, UriFormat.SafeUnescaped)), Url.Action("Payment3dSecureCallback")).AbsolutePath
            };

            return(View(model));
        }
예제 #2
0
        public ActionResult Payment3dSecureIframe(long tid)
        {
            var transaction = _b2bCheckoutService.GetTransaction(tid);

            if (transaction == null || transaction.TransactionStatus != TransactionStatus.AwaitingPayment)
            {
                return(HttpNotFound());
            }

            DataCashPayment payment = new DataCashPayment(transaction);

            Payment3dSecureIframeViewModel model = new Payment3dSecureIframeViewModel
            {
                AcsUrl  = payment.AcsUrl,
                PaReq   = payment.PaReq,
                MD      = payment.MD,
                TermUrl = new Uri(new Uri(Request.Url.GetComponents(UriComponents.SchemeAndServer, UriFormat.SafeUnescaped)), Url.Action("Payment3dSecureCallback")).AbsoluteUri
            };

            ColonyContext.Response.CurrentTemplate = "Empty";
            return(View(model));
        }