private void CreatePostParameters(CheckoutDetails checkout) { PaymentAppGateway gateway = new PaymentAppGateway(checkout); TwoCheckoutRedirectPaymentMethod twoCheckoutPaymentMethod = (TwoCheckoutRedirectPaymentMethod)checkout.PaymentMethod; string urlHidden = twoCheckoutPaymentMethod.GetPostedUrl(); NameValueCollection collection = twoCheckoutPaymentMethod.CreatePostParameters( checkout, StoreContext.Culture, StoreContext.Currency, StoreContext.ShoppingCart, UrlPath.StorefrontUrl, OrderID, StoreContext.GetOrderAmount().Total, StoreContext.WholesaleStatus, WebUtilities.GetVisitorIP()); uxLiteral.Text = CreateParameterText(collection, twoCheckoutPaymentMethod); string xmlData = gateway.CreateHostedPaymentXml( StoreContext.Culture, StoreContext.Currency, StoreContext.ShoppingCart, UrlPath.StorefrontUrl, OrderID, StoreContext.GetOrderAmount().Total, StoreContext.WholesaleStatus, WebUtilities.GetVisitorIP()); HostedXml.Value = HttpUtility.UrlEncode(xmlData); uxUrlHidden.Value = urlHidden; uxRefreshLink.NavigateUrl = urlHidden; }
private void ProcessHostedPayment(CheckoutDetails checkout) { OrderNotifyService order = CreateOrder(checkout); PaymentAppGateway gateway = new PaymentAppGateway(checkout); string xmlData = gateway.CreateHostedPaymentXml( StoreContext.Culture, CurrenntCurrency, StoreContext.ShoppingCart, UrlPath.StorefrontUrl, order.OrderID, StoreContext.GetOrderAmount().Total, StoreContext.WholesaleStatus, WebUtilities.GetVisitorIP()); Response.Redirect("../Gateway/GatewayPosting.aspx?OrderID=" + order.OrderID); }
private void CreatePostParameters(CheckoutDetails checkout) { PaymentAppGateway gateway = new PaymentAppGateway(checkout); string urlHidden = PaymentAppGateway.GetPaymentAppUrl("/HostedRecordHtml.aspx", UrlPath.StorefrontUrl); string xmlData = gateway.CreateHostedPaymentXml( StoreContext.Culture, StoreContext.Currency, StoreContext.ShoppingCart, UrlPath.StorefrontUrl, OrderID, StoreContext.GetOrderAmount().Total, StoreContext.WholesaleStatus, WebUtilities.GetVisitorIP()); HostedXml.Value = HttpUtility.UrlEncode(xmlData); uxUrlHidden.Value = urlHidden; uxRefreshLink.NavigateUrl = urlHidden; }