Пример #1
0
        /// <summary>
        /// Creates an instance of <see cref="PaymentRequestResult"/> which indicates a successful result and a Gateway Transporter with type of Redirect.
        /// </summary>
        /// <param name="gatewayAccountName"></param>
        /// <param name="httpContext"></param>
        /// <param name="url">Page URL.</param>
        public static PaymentRequestResult SucceedWithRedirect(
            string gatewayAccountName,
            HttpContext httpContext,
            string url)
        {
            var descriptor = GatewayTransporterDescriptor.CreateRedirect(url);

            var transporter = new DefaultGatewayTransporter(httpContext, descriptor);

            return(Succeed(transporter, gatewayAccountName));
        }
Пример #2
0
        /// <summary>
        /// Creates an instance of <see cref="PaymentRequestResult"/> which indicates a successful result and a Gateway Transporter with type of Post.
        /// </summary>
        /// <param name="gatewayAccountName"></param>
        /// <param name="httpContext"></param>
        /// <param name="url">Page URL.</param>
        /// <param name="form">Form to post.</param>
        public static PaymentRequestResult SucceedWithPost(
            string gatewayAccountName,
            HttpContext httpContext,
            string url,
            IEnumerable <KeyValuePair <string, string> > form)
        {
            var descriptor = GatewayTransporterDescriptor.CreatePost(url, form);

            var transporter = new DefaultGatewayTransporter(httpContext, descriptor);

            return(Succeed(transporter, gatewayAccountName));
        }