⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 paypageredirect.cs

📁 如果不使用IIS,请先运行 XSP.exe,待提示已侦听 8080端口后
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Web;
using System.Configuration;

namespace DNNLite.DesktopModules.OnlinePay
{
    /// <summary>
    ///帮助重定向到支付页
    /// </summary>
    public class PayPageRedirect
    {
        /// <summary>
        /// 创建新实例
        /// </summary>
        /// <param name="payable">要支付的信息</param>
        public PayPageRedirect( PayAble payable )
        {
            _payable = payable;
        }

        private PayAble _payable;

        /// <summary>
        /// 执行重定向
        /// </summary>
        public void Redirect()
        {
            string paymentnum = Comm.GuidComb.NewComb().ToString();

            HttpContext.Current.Session.Add(paymentnum, _payable);

            Configuration cfg = 
                ConfigurationManager.OpenExeConfiguration(HttpContext.Current.Server.MapPath("~/web.config"));

            string tabid = cfg.AppSettings.Settings["onlinepayindex"].Value;
            string navurl = DNNLite.Comm.Comm.NavigateURL(int.Parse(tabid), "paymentnum=" + paymentnum,"isgotoselect=true");

            HttpContext.Current.Response.Redirect(navurl);

        }

    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -