예제 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SystemOptions so = new SystemOptions();

        ElectronTicket_HPCQ_Status_ON = so["ElectronTicket_HPCQ_Status_ON"].ToBoolean(false);
        ElectronTicket_HPCQ_Getway = so["ElectronTicket_HPCQ_Getway"].ToString("");
        ElectronTicket_HPCQ_UserName = so["ElectronTicket_HPCQ_UserName"].ToString("");
        ElectronTicket_HPCQ_UserPassword = so["ElectronTicket_HPCQ_UserPassword"].ToString("");

        if (!ElectronTicket_HPCQ_Status_ON)
        {
            return;
        }

        if (!this.IsPostBack)
        {
            TransType = Shove._Web.Utility.GetRequest("transType");
            TransMessage = Shove._Web.Utility.GetRequest("transMessage");

            if (TransType != "" && TransMessage != "")
            {
                if (ValidMessage(TransType, TransMessage))
                {
                    Receive(TransType, TransMessage);
                }
            }
        }
    }
예제 #2
0
        public void Initialized(InitializedContext context)
        {
            var settingJsonPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "App_Data", "setting.json");
            var options         = new SystemOptions();

            if (File.Exists(settingJsonPath))
            {
                options = JsonConvert.DeserializeObject <SystemOptions>(File.ReadAllText(settingJsonPath));
            }
            SystemOptions.Instance = options;
            // 在本地地址上启动Web服务,可以根据需求改变端口
            _webHost.StartAsync(options.HangdireDashboardUri, _mahuaApi.GetSourceContainer());

            // 定时记录资产
            RecurringJob.AddOrUpdate(nameof(IUserAssetTracer), () => _userAssetTracer.Recode(), Cron.MinuteInterval(10));

            // 定时检测订单成交变化
            RecurringJob.AddOrUpdate(nameof(OrderTracer), () => _orderTracer.ReportFinishedOrders(), () => Cron.MinuteInterval(5));

            // 定时报告资产变化
            foreach (var hour in HoursInChina)
            {
                RecurringJob.AddOrUpdate(nameof(IUserAssetTracer) + hour,
                                         () => _userAssetTracer.Report(), () => Cron.Daily((hour - 8 + 24) % 24));
            }

            Process.Start($"{options.HangdireDashboardUri}/hangfire/recurring");
        }
예제 #3
0
파일: Login.aspx.cs 프로젝트: ichari/ichari
    protected void Page_Load(object sender, EventArgs e)
    {
        SystemOptions so = new SystemOptions();

        string key = so["MemberSharing_Alipay_MD5"].ToString("");
        string return_url = Shove._Web.Utility.GetUrl() + "/MemberSharing/Alipay/Receive.aspx"; //服务器通知返回接口
        string gateway = "https://mapi.alipay.com/gateway.do";             //支付接口
        string _input_charset = "utf-8";
        string service = "alipay.auth.authorize";
        string sign_type = "MD5";
        string partner = so["MemberSharing_Alipay_UserNumber"].ToString("");          //卖家商户号
        string target_service = "user.auth.quick.login";

        Alipay.Gateway.Utility ap = new Alipay.Gateway.Utility();
        string aliay_url = ap.CreatUrl(
            gateway,
            service,
            partner,
            sign_type,
            key,
            return_url,
            _input_charset,
            target_service
        );

        Response.Redirect(aliay_url, true);
    }
예제 #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.Request.QueryString.Count < 1)
        {
            Shove._Web.JavaScript.Alert(this.Page, "接口调用失败,请重新登录。", "../../Default.aspx");

            return;
        }

        SystemOptions so = new SystemOptions();

        string alipayNotifyURL = "http://notify.alipay.com/trade/notify_query.do?";
        string partner         = so["MemberSharing_Alipay_UserNumber"].ToString(""); //卖家商户号

        alipayNotifyURL = alipayNotifyURL + "partner=" + partner + "&notify_id=" + Request.QueryString["notify_id"];

        //获取支付宝ATN返回结果,true是正确的订单信息,false 是无效的
        string responseTxt = Get_Http(alipayNotifyURL, 120000);

        if (responseTxt == "false")
        {
            Shove._Web.JavaScript.Alert(this.Page, "接口调用失败,请重新登录。", "../../Home/Web/Default.aspx");

            return;
        }

        string url = this.Request.Url.AbsoluteUri.Replace("/MemberSharing/Alipay/Receive.aspx?", "/Home/Room/Receive.aspx?");

        this.Response.Redirect(url, true);
    }
예제 #5
0
        public string BuildLoginUrl()
        {
            SystemOptions so = new SystemOptions();

            string key            = so["MemberSharing_Alipay_MD5"].ToString("");
            string return_url     = Shove._Web.Utility.GetUrl() + "/MemberSharing/Alipay/Receive.aspx"; //服务器通知返回接口
            string gateway        = so["MemberSharing_Alipay_Gateway"].ToString("");                    //支付接口
            string _input_charset = "utf-8";
            string service        = "user_authentication";
            string sign_type      = "MD5";
            string partner        = so["MemberSharing_Alipay_UserNumber"].ToString("");   //卖家商户号
            string ReturnUrl      = Shove._Web.Utility.GetUrl() + "/MemberSharing/Alipay/Receive.aspx";

            Shove.Alipay.Alipay ap = new Shove.Alipay.Alipay();
            string aliay_url       = ap.CreatUrl(
                gateway,
                service,
                partner,
                sign_type,
                key,
                return_url,
                _input_charset,
                ReturnUrl
                );

            return(aliay_url);
        }
예제 #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SystemOptions so = new SystemOptions();

        ElectronTicket_HPCQ_Status_ON    = so["ElectronTicket_HPCQ_Status_ON"].ToBoolean(false);
        ElectronTicket_HPCQ_Getway       = so["ElectronTicket_HPCQ_Getway"].ToString("");
        ElectronTicket_HPCQ_UserName     = so["ElectronTicket_HPCQ_UserName"].ToString("");
        ElectronTicket_HPCQ_UserPassword = so["ElectronTicket_HPCQ_UserPassword"].ToString("");

        if (!ElectronTicket_HPCQ_Status_ON)
        {
            return;
        }

        if (!this.IsPostBack)
        {
            TransType    = Shove._Web.Utility.GetRequest("transType");
            TransMessage = Shove._Web.Utility.GetRequest("transMessage");

            if (TransType != "" && TransMessage != "")
            {
                if (ValidMessage(TransType, TransMessage))
                {
                    Receive(TransType, TransMessage);
                }
            }
        }
    }
예제 #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SystemOptions so = new SystemOptions();

        string key            = so["MemberSharing_Alipay_MD5"].ToString("");
        string return_url     = Shove._Web.Utility.GetUrl() + "/MemberSharing/Alipay/Receive.aspx"; //服务器通知返回接口
        string gateway        = "https://mapi.alipay.com/gateway.do";                               //支付接口
        string _input_charset = "utf-8";
        string service        = "alipay.auth.authorize";
        string sign_type      = "MD5";
        string partner        = so["MemberSharing_Alipay_UserNumber"].ToString("");   //卖家商户号
        string target_service = "user.auth.quick.login";

        Alipay.Gateway.Utility ap = new Alipay.Gateway.Utility();
        string aliay_url          = ap.CreatUrl(
            gateway,
            service,
            partner,
            sign_type,
            key,
            return_url,
            _input_charset,
            target_service
            );

        Response.Redirect(aliay_url, true);
    }
예제 #8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     SystemOptions options = new SystemOptions();
     this.ElectronTicket_HPSH_Status_ON = options["ElectronTicket_HPSH_Status_ON"].ToBoolean(false);
     this.ElectronTicket_HPSH_Getway = options["ElectronTicket_HPSH_Getway"].ToString("");
     this.ElectronTicket_HPSH_UserName = options["ElectronTicket_HPSH_UserName"].ToString("");
     this.ElectronTicket_HPSH_UserPassword = options["ElectronTicket_HPSH_UserPassword"].ToString("");
     this.ElectronTicket_HPSH_IP = options["ElectronTicket_HPSH_IP"].ToString("").Trim();
     if (!this.ElectronTicket_HPSH_Status_ON)
     {
         base.Response.End();
     }
     else if (!base.IsPostBack)
     {
         if (string.IsNullOrEmpty(this.ElectronTicket_HPSH_IP))
         {
             this.ElectronTicket_HPSH_IP = "," + this.ElectronTicket_HPSH_IP + ",";
             if (this.ElectronTicket_HPSH_IP.IndexOf("," + this.GetClientIPAddress() + ",") < 0)
             {
                 new Log(@"ElectronTicket\HPSH").Write("电子票异常客户端 IP 请求。" + this.GetClientIPAddress());
                 base.Response.End();
                 return;
             }
         }
         this.TransType = Utility.GetRequest("transType");
         this.TransMessage = Utility.GetRequest("transMessage");
         this.WriteElectronTicketLog(false, this.TransType, "transType=" + this.TransType + "&transMessage=" + this.TransMessage);
         if (((this.TransType != "") && (this.TransMessage != "")) && this.ValidMessage(this.TransType, this.TransMessage))
         {
             this.Receive(this.TransType, this.TransMessage);
         }
     }
 }
예제 #9
0
    public void SettingParams()
    {
        SystemOptions options = new SystemOptions();

        this.requestUrl         = options["MemberSharing_Tencent_Gateway"].ToString("").Trim();
        this.sign_type          = "md5";
        this.key                = options["MemberSharing_Tencent_MD5"].ToString("").Trim();
        this.sign_encrypt_keyid = "0";
        this.input_charset      = "GBK";
        this.service            = "login";
        this.chnid              = options["MemberSharing_Tencent_UserNumber"].ToString("").Trim();
        this.chtype             = "0";
        this.redirect_url       = Utility.GetUrl() + "/Home/Room/TencentReceive.aspx";
        this.attach             = this.redirect_url;
        this.tmstamp            = this.GetTmstamp();
        Dictionary <string, string> dict = new Dictionary <string, string>();

        dict.Add("sign_type", this.sign_type);
        dict.Add("sign_encrypt_keyid", this.sign_encrypt_keyid);
        dict.Add("input_charset", this.input_charset);
        dict.Add("service", this.service);
        dict.Add("chnid", this.chnid);
        dict.Add("chtype", this.chtype);
        dict.Add("redirect_url", this.redirect_url);
        dict.Add("attach", this.attach);
        dict.Add("tmstamp", this.tmstamp.ToString());
        this.sign = this.GetSign(this.key, this.input_charset, dict);
    }
예제 #10
0
        public string BuildRegisterUrl(string Acccount, object OtherInfo)
        {
            SystemOptions options = new SystemOptions();
            string        gateway = options["MemberRegister_Alipay_Gateway"].ToString("");
            string        service = "create_member";
            string        partner = options["MemberRegister_Alipay_UserNumber"].ToString("");
            string        key     = options["MemberRegister_Alipay_MD5"].ToString("");
            string        str5    = "MD5";
            string        charset = "utf-8";

            if (((gateway == "") || (partner == "")) || (key == ""))
            {
                return("");
            }
            string str7  = Shove._Web.Utility.GetUrl() + "/AlipayMemberReceive/RegReceive.aspx";
            string str8  = Acccount;
            string str9  = "";
            string str10 = "";
            string str11 = "";
            string str12 = "";
            string str13 = OtherInfo.ToString();

            Gateway.Utility utility = new Gateway.Utility();
            if (PF.AlipayAccountRegisterPid != "")
            {
                return(utility.Createurl(gateway, service, partner, key, str5, charset, new string[] { "email", str8, "cert_type", str9, "cert_no", str10, "company_name", str11, "account_type", str12, "other_info", str13, "return_url", str7, "id", PF.AlipayAccountRegisterPid }));
            }
            return(utility.Createurl(gateway, service, partner, key, str5, charset, new string[] { "email", str8, "cert_type", str9, "cert_no", str10, "company_name", str11, "account_type", str12, "other_info", str13, "return_url", str7 }));
        }
예제 #11
0
    protected void btnOK_Click(object sender, EventArgs e)
    {
        try
        {
            _Site.SiteOptions["Opt_ISP_HostName"]      = new OptionValue(tb1.Text);
            _Site.SiteOptions["Opt_ISP_HostPort"]      = new OptionValue(tb2.Text);
            _Site.SiteOptions["Opt_ISP_UserID"]        = new OptionValue(tb3.Text);
            _Site.SiteOptions["Opt_ISP_UserPassword"]  = new OptionValue(tb4.Text);
            _Site.SiteOptions["Opt_ISP_RegCode"]       = new OptionValue(tb5.Text);
            _Site.SiteOptions["Opt_ISP_ServiceNumber"] = new OptionValue(tb6.Text);

            SystemOptions so = new SystemOptions();
            so["Betting_SMS_UserID"]       = new OptionValue(tb3.Text);
            so["Betting_SMS_UserPassword"] = new OptionValue(tb4.Text);
            so["Betting_SMS_RegCode"]      = new OptionValue(tb5.Text);
        }
        catch (Exception exception)
        {
            Shove._Web.JavaScript.Alert(this.Page, exception.Message);

            return;
        }

        Shove._Web.JavaScript.Alert(this.Page, "设置成功。");
    }
예제 #12
0
    protected void btnOK_Click(object sender, EventArgs e)
    {
        SystemOptions so = new SystemOptions();

        //恒朋江西电子票参数
        so["ElectronTicket_HPJX_Getway"]       = new OptionValue(tb1.Text);
        so["ElectronTicket_HPJX_UserName"]     = new OptionValue(tb2.Text);
        so["ElectronTicket_HPJX_UserPassword"] = new OptionValue(tb3.Text);
        so["ElectronTicket_HPJX_Status_ON"]    = new OptionValue(cb1.Checked);

        //恒朋上海电子票参数
        so["ElectronTicket_HPSH_Getway"]       = new OptionValue(tb_HPSH_Getway.Text);
        so["ElectronTicket_HPSH_UserName"]     = new OptionValue(tb_AgentID.Text);
        so["ElectronTicket_HPSH_UserPassword"] = new OptionValue(tb_AgentPwd.Text);
        so["ElectronTicket_HPSH_Status_ON"]    = new OptionValue(cb_HPSH.Checked);

        //恒朋山东电子票参数
        so["ElectronTicket_HPSD_Getway"]       = new OptionValue(tb_HPSD_Getway.Text);
        so["ElectronTicket_HPSD_UserName"]     = new OptionValue(tb_HPSD_AgentID.Text);
        so["ElectronTicket_HPSD_UserPassword"] = new OptionValue(tb_HPSD_AgentPwd.Text);
        so["ElectronTicket_HPSD_Status_ON"]    = new OptionValue(cb_HPSD.Checked);

        for (int i = 0; i < g.Rows.Count; i++)
        {
            DropDownList ddlElectronTicket = (DropDownList)g.Rows[i].Cells[1].FindControl("ddlElectronTicket");

            MSSQL.ExecuteNonQuery("update T_Lotteries set PrintOutType = " + ddlElectronTicket.SelectedValue + " where [ID] = " + g.Rows[i].Cells[2].Text);
        }

        tb3.Attributes.Add("value", tb3.Text);

        Shove._Web.JavaScript.Alert(this.Page, "站点资料已经保存成功。");
    }
예제 #13
0
    private void BindData()
    {
        SystemOptions so = new SystemOptions();

        //恒朋江西电子票参数
        tb1.Text = so["ElectronTicket_HPJX_Getway"].ToString("");
        tb2.Text = so["ElectronTicket_HPJX_UserName"].ToString("");
        tb3.Attributes.Add("value", so["ElectronTicket_HPJX_UserPassword"].ToString(""));

        cb1.Checked = so["ElectronTicket_HPJX_Status_ON"].ToBoolean(false);

        //恒朋上海电子票参数
        tb_HPSH_Getway.Text = so["ElectronTicket_HPSH_Getway"].ToString("");
        tb_AgentID.Text     = so["ElectronTicket_HPSH_UserName"].ToString("");
        tb_AgentPwd.Attributes.Add("value", so["ElectronTicket_HPSH_UserPassword"].ToString(""));

        cb_HPSH.Checked = so["ElectronTicket_HPSH_Status_ON"].ToBoolean(false);

        //恒朋上海电子票参数
        tb_HPSD_Getway.Text  = so["ElectronTicket_HPSD_Getway"].ToString("");
        tb_HPSD_AgentID.Text = so["ElectronTicket_HPSD_UserName"].ToString("");
        tb_HPSD_AgentPwd.Attributes.Add("value", so["ElectronTicket_HPSD_UserPassword"].ToString(""));

        cb_HPSD.Checked = so["ElectronTicket_HPSD_Status_ON"].ToBoolean(false);
    }
예제 #14
0
        public string BuildLoginUrl()
        {
            new Log("bbb").Write("----------------1");

            SystemOptions so = new SystemOptions();

            string key            = so["MemberSharing_Alipay_MD5"].ToString("");
            string return_url     = Shove._Web.Utility.GetUrl() + "/MemberSharing/Alipay/Receive.aspx"; //服务器通知返回接口
            string gateway        = "https://mapi.alipay.com/gateway.do";                               //支付接口
            string _input_charset = "utf-8";
            string service        = "alipay.auth.authorize";
            string sign_type      = "MD5";
            string partner        = so["MemberSharing_Alipay_UserNumber"].ToString("");   //卖家商户号
            string target_service = "user.auth.quick.login";

            Alipay.Gateway.Utility ap = new Alipay.Gateway.Utility();
            string aliay_url          = ap.CreatUrl(
                gateway,
                service,
                partner,
                sign_type,
                key,
                return_url,
                _input_charset,
                target_service
                );

            new Log("bbb").Write(aliay_url);

            return(aliay_url); //utility.CreateLoginUrl(Gateway, Partner, SignType, ReturnUrl, Key, InputCharset, parameters);
        }
예제 #15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SystemOptions so = new SystemOptions();

        string key            = so["MemberSharing_Alipay_MD5"].ToString("");
        string return_url     = Shove._Web.Utility.GetUrl() + "/Home/Room/Receive.aspx?" + System.Web.HttpUtility.UrlEncode("BuyID=" + Request["BuyID"]); //服务器通知返回接口
        string gateway        = so["MemberSharing_Alipay_Gateway"].ToString("");                                                                          //支付接口
        string _input_charset = "utf-8";
        string service        = "user_authentication";
        string sign_type      = "MD5";
        string partner        = so["MemberSharing_Alipay_UserNumber"].ToString("");   //卖家商户号
        string ReturnUrl      = return_url;

        Shove.Alipay.Alipay ap = new Shove.Alipay.Alipay();
        string aliay_url       = ap.CreatUrl(
            gateway,
            service,
            partner,
            sign_type,
            key,
            return_url,
            _input_charset,
            ReturnUrl
            );

        Response.Redirect(aliay_url, true);
    }
 public void SettingParams()
 {
     SystemOptions options = new SystemOptions();
     this.requestUrl = options["MemberSharing_Tencent_Gateway"].ToString("").Trim();
     this.sign_type = "md5";
     this.key = options["MemberSharing_Tencent_MD5"].ToString("").Trim();
     this.sign_encrypt_keyid = "0";
     this.input_charset = "GBK";
     this.service = "login";
     this.chnid = options["MemberSharing_Tencent_UserNumber"].ToString("").Trim();
     this.chtype = "0";
     this.redirect_url = Utility.GetUrl() + "/Home/Room/TencentReceive.aspx";
     this.attach = this.redirect_url;
     this.tmstamp = this.GetTmstamp();
     Dictionary<string, string> dict = new Dictionary<string, string>();
     dict.Add("sign_type", this.sign_type);
     dict.Add("sign_encrypt_keyid", this.sign_encrypt_keyid);
     dict.Add("input_charset", this.input_charset);
     dict.Add("service", this.service);
     dict.Add("chnid", this.chnid);
     dict.Add("chtype", this.chtype);
     dict.Add("redirect_url", this.redirect_url);
     dict.Add("attach", this.attach);
     dict.Add("tmstamp", this.tmstamp.ToString());
     this.sign = this.GetSign(this.key, this.input_charset, dict);
 }
예제 #17
0
        public Game1()
        {
            FileHandler.writeToFile(systemOptions, @"Content\Data\system_variables.xml", new XmlSerializer(typeof(SystemOptions)));
            systemOptions = FileHandler.readFromFile(@"Content\Data\system_variables.xml", new XmlSerializer(typeof(SystemOptions)));

            new GraphicsDeviceManager(this)
            {
                PreferredBackBufferWidth  = systemOptions.resolutionWidth,
                PreferredBackBufferHeight = systemOptions.resolutionHeight,
                IsFullScreen = systemOptions.fullScreen
            };

            Components.Add(new InputHandler(this));
            stateManager = new GameStateManager(this);
            Components.Add(stateManager);

            screenRectangle         = new Rectangle(0, 0, systemOptions.resolutionWidth, systemOptions.resolutionHeight);
            startMenuScreen         = new StartMenuScreen(this, stateManager);
            Level1                  = new Level1(this, stateManager);
            Level2                  = new Level2(this, stateManager);
            characterCreationScreen = new CharacterCreationScreen(this, stateManager);
            pauseScreen             = new PauseScreen(this, stateManager);
            optionsScreen           = new OptionsScreen(this, stateManager);
            loadGameScreen          = new LoadGameScreen(this, stateManager);
            gameLoseScreen          = new GameLoseScreen(this, stateManager);
            lobbyScreen             = new LobbyScreen(this, stateManager);
            highScoreScreen         = new HighScoresScreen(this, stateManager);

            stateManager.ChangeState(startMenuScreen);
        }
예제 #18
0
    protected void btnOK_Click(object sender, EventArgs e)
    {
        SystemOptions so = new SystemOptions();

        so["ElectronTicket_Getway"]             = new OptionValue(tb1.Text);
        so["ElectronTicket_Agent_UserNumber"]   = new OptionValue(tb2.Text);
        so["ElectronTicket_Agent_Key"]          = new OptionValue(tb3.Text);
        so["ElectronTicket_Agent_UserName"]     = new OptionValue(tb4.Text);
        so["ElectronTicket_Agent_UserPassword"] = new OptionValue(tb5.Text);
        so["ElectronTicket_Agent_PostPassword"] = new OptionValue(tb6.Text);

        so["ElectronTicketbase_TC_Getway"]           = new OptionValue(tbTC1.Text);
        so["ElectronTicketbase_TC_Agent_UserNumber"] = new OptionValue(tbTC2.Text);
        so["ElectronTicketbase_TC_Agent_Key"]        = new OptionValue(tbTC3.Text);

        so["ElectronTicketbase_FC_Getway"]           = new OptionValue(tbFC1.Text);
        so["ElectronTicketbase_FC_Agent_UserNumber"] = new OptionValue(tbFC2.Text);
        so["ElectronTicketbase_FC_Agent_Key"]        = new OptionValue(tbFC3.Text);

        so["ElectronTicketbase_JC_Getway"]           = new OptionValue(tbJC1.Text);
        so["ElectronTicketbase_JC_Agent_UserNumber"] = new OptionValue(tbJC2.Text);
        so["ElectronTicketbase_JC_Agent_Key"]        = new OptionValue(tbJC3.Text);

        for (int i = 0; i < g.Rows.Count; i++)
        {
            DropDownList ddlElectronTicket = (DropDownList)g.Rows[i].Cells[1].FindControl("ddlElectronTicket");

            MSSQL.ExecuteNonQuery("update T_Lotteries set PrintOutType = " + ddlElectronTicket.SelectedValue + " where [ID] = " + g.Rows[i].Cells[2].Text);
        }

        tb3.Attributes.Add("value", tb3.Text);

        Shove._Web.JavaScript.Alert(this.Page, "站点资料已经保存成功。");
    }
예제 #19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.Request.QueryString.Count < 1)
        {
            Shove._Web.JavaScript.Alert(this.Page, "接口调用失败,请重新登录。", "../../Default.aspx");

            return;
        }

        SystemOptions so = new SystemOptions();

        string alipayNotifyURL = "http://notify.alipay.com/trade/notify_query.do?";
        string partner = so["MemberSharing_Alipay_UserNumber"].ToString("");  //卖家商户号

        alipayNotifyURL = alipayNotifyURL + "partner=" + partner + "&notify_id=" + Request.QueryString["notify_id"];

        //获取支付宝ATN返回结果,true是正确的订单信息,false 是无效的
        string responseTxt = Get_Http(alipayNotifyURL, 120000);

        if (responseTxt == "false")
        {
            Shove._Web.JavaScript.Alert(this.Page, "接口调用失败,请重新登录。", "../../Home/Web/Default.aspx");

            return;
        }

        string url = this.Request.Url.AbsoluteUri.Replace("/MemberSharing/Alipay/Receive.aspx?", "/Home/Room/Receive.aspx?");
        this.Response.Redirect(url, true);
    }
예제 #20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SystemOptions options = new SystemOptions();

        this.ElectronTicket_HPSH_Status_ON    = options["ElectronTicket_HPSH_Status_ON"].ToBoolean(false);
        this.ElectronTicket_HPSH_Getway       = options["ElectronTicket_HPSH_Getway"].ToString("");
        this.ElectronTicket_HPSH_UserName     = options["ElectronTicket_HPSH_UserName"].ToString("");
        this.ElectronTicket_HPSH_UserPassword = options["ElectronTicket_HPSH_UserPassword"].ToString("");
        this.ElectronTicket_HPSH_IP           = options["ElectronTicket_HPSH_IP"].ToString("").Trim();
        if (!this.ElectronTicket_HPSH_Status_ON)
        {
            base.Response.End();
        }
        else if (!base.IsPostBack)
        {
            if (string.IsNullOrEmpty(this.ElectronTicket_HPSH_IP))
            {
                this.ElectronTicket_HPSH_IP = "," + this.ElectronTicket_HPSH_IP + ",";
                if (this.ElectronTicket_HPSH_IP.IndexOf("," + this.GetClientIPAddress() + ",") < 0)
                {
                    new Log(@"ElectronTicket\HPSH").Write("电子票异常客户端 IP 请求。" + this.GetClientIPAddress());
                    base.Response.End();
                    return;
                }
            }
            this.TransType    = Utility.GetRequest("transType");
            this.TransMessage = Utility.GetRequest("transMessage");
            this.WriteElectronTicketLog(false, this.TransType, "transType=" + this.TransType + "&transMessage=" + this.TransMessage);
            if (((this.TransType != "") && (this.TransMessage != "")) && this.ValidMessage(this.TransType, this.TransMessage))
            {
                this.Receive(this.TransType, this.TransMessage);
            }
        }
    }
    protected void btnOK_Click(object sender, EventArgs e)
    {
        SystemOptions options = new SystemOptions();

        try
        {
            options["OnlinePay_Alipay_UserName"]   = new OptionValue(this.tbAlipayName.Text);
            options["OnlinePay_Alipay_UserNumber"] = new OptionValue(this.tbAlipayNumber.Text);
            options["OnlinePay_Alipay_MD5Key"]     = new OptionValue(this.tbAlipayKey.Text);
            options["OnlinePay_Alipay_PayFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbAlipayPayFormalitiesFeesScale.Text, 0.0));
            options["OnlinePayOut_Alipay_MD5Key"] = new OptionValue(this.tbAlipayOutKey.Text);
            options["OnlinePayOut_Alipay_DistillFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbAlipayDistillFormalitiesFeesScale.Text, 0.0));
            options["OnlinePay_Alipay_Status_ON"] = new OptionValue(this.cbAlipayON.Checked);
            options["OnlinePay_Alipay_ForUserDistill_UserName"]         = new OptionValue(this.tbOnlinePay_Alipay_ForUserDistill_UserName.Text);
            options["OnlinePay_Alipay_ForUserDistill_UserNumber"]       = new OptionValue(this.tbOnlinePay_Alipay_ForUserDistill_UserNumber.Text);
            options["OnlinePay_Alipay_ForUserDistill_MD5Key"]           = new OptionValue(this.tbOnlinePay_Alipay_ForUserDistill_MD5Key.Text);
            options["OnlinePay_Alipay_ForUserDistill_MD5Key_ForPayOut"] = new OptionValue(this.tbOnlinePay_Alipay_ForUserDistill_MD5Key_ForPayOut.Text);
            options["OnlinePay_Alipay_ForUserDistill_Status_ON"]        = new OptionValue(this.cbOnlinePay_Alipay_ForUserDistill_Status_ON.Checked);
            options["OnlinePay_99Bill_UserName"]   = new OptionValue(this.tb99BillName.Text);
            options["OnlinePay_99Bill_UserNumber"] = new OptionValue(this.tb99BillNumber.Text);
            options["OnlinePay_99Bill_MD5Key"]     = new OptionValue(this.tb99BillKey.Text);
            options["OnlinePay_99Bill_PayFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tb99BillPayFormalitiesFeesScale.Text, 0.0));
            options["OnlinePayOut_99Bill_MD5Key"]   = new OptionValue(this.tb99BillOutKey.Text);
            options["OnlinePay_99Bill_QueryMD5Key"] = new OptionValue(this.tb99BillQueryKey.Text);
            options["OnlinePayOut_99Bill_DistillFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tb99BillDistillFormalitiesFeesScale.Text, 0.0));
            options["OnlinePay_99Bill_Status_ON"]  = new OptionValue(this.cb99BillON.Checked);
            options["OnlinePay_Tenpay_UserName"]   = new OptionValue(this.tbTenpayName.Text);
            options["OnlinePay_Tenpay_UserNumber"] = new OptionValue(this.tbTenpayNumber.Text);
            options["OnlinePay_Tenpay_MD5Key"]     = new OptionValue(this.tbTenpayKey.Text);
            options["OnlinePay_Tenpay_PayFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbTenpayPayFormalitiesFeesScale.Text, 0.0));
            options["OnlinePayOut_Tenpay_MD5Key"] = new OptionValue(this.tbTenpayOutKey.Text);
            options["OnlinePayOut_Tenpay_DistillFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbTenpayDistillFormalitiesFeesScale.Text, 0.0));
            options["OnlinePay_Tenpay_Status_ON"]     = new OptionValue(this.cbTenpayON.Checked);
            options["OnlinePay_CBPayMent_UserName"]   = new OptionValue(this.tbCBPayMentName.Text);
            options["OnlinePay_CBPayMent_UserNumber"] = new OptionValue(this.tbCBPayMentNumber.Text);
            options["OnlinePay_CBPayMent_MD5Key"]     = new OptionValue(this.tbCBPayMentKey.Text);
            options["OnlinePay_CBPayMent_PayFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbCBPayMentPayFormalitiesFeesScale.Text, 0.0));
            options["OnlinePayOut_CBPayMent_MD5Key"] = new OptionValue(this.tbCBPayMentOutKey.Text);
            options["OnlinePayOut_CBPayMent_DistillFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbCBPayMentDistillFormalitiesFeesScale.Text, 0.0));
            options["OnlinePay_CBPayMent_Status_ON"]                   = new OptionValue(this.cbCBPayMentON.Checked);
            options["OnlinePay_YeePay_UserName"]                       = new OptionValue(this.tbYeePayName.Text);
            options["OnlinePay_YeePay_UserNumber"]                     = new OptionValue(this.tbYeePayNumber.Text);
            options["OnlinePay_YeePay_MD5Key"]                         = new OptionValue(this.tbYeePayKey.Text);
            options["OnlinePay_YeePayy_PayFormalitiesFeesScale"]       = new OptionValue(_Convert.StrToDouble(this.tbYeePayFormalitiesFeesScale.Text, 0.0));
            options["OnlinePayOut_YeePay_MD5Key"]                      = new OptionValue(this.tbYeePayOutKey.Text);
            options["OnlinePayOut_YeePay_DistillFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbYeePayDistillFormalitiesFeesScale.Text, 0.0));
            options["OnlinePay_YeePay_Status_ON"]                      = new OptionValue(this.cbYeePayON.Checked);
            options["OnlinePay_007Ka_FormalitiesFees"]                 = new OptionValue(this.tb007Ka_FormalitiesFees.Text);
            options["OnlinePay_007Ka_MerAccount"]                      = new OptionValue(this.tb007Ka_MerAccount.Text);
            options["OnlinePay_007Ka_MerchantId"]                      = new OptionValue(this.tb007Ka_MerchantId.Text);
            options["OnlinePay_007Ka_Status_ON"]                       = new OptionValue(this.cb007KaON.Checked);
        }
        catch (Exception exception)
        {
            PF.GoError(1, exception.Message, "Admin_OnlinePayGateway");
            return;
        }
        JavaScript.Alert(this.Page, "设置保存成功。");
    }
 protected void btnOK_Click(object sender, EventArgs e)
 {
     SystemOptions options = new SystemOptions();
     try
     {
         options["OnlinePay_Alipay_UserName"] = new OptionValue(this.tbAlipayName.Text);
         options["OnlinePay_Alipay_UserNumber"] = new OptionValue(this.tbAlipayNumber.Text);
         options["OnlinePay_Alipay_MD5Key"] = new OptionValue(this.tbAlipayKey.Text);
         options["OnlinePay_Alipay_PayFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbAlipayPayFormalitiesFeesScale.Text, 0.0));
         options["OnlinePayOut_Alipay_MD5Key"] = new OptionValue(this.tbAlipayOutKey.Text);
         options["OnlinePayOut_Alipay_DistillFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbAlipayDistillFormalitiesFeesScale.Text, 0.0));
         options["OnlinePay_Alipay_Status_ON"] = new OptionValue(this.cbAlipayON.Checked);
         options["OnlinePay_Alipay_ForUserDistill_UserName"] = new OptionValue(this.tbOnlinePay_Alipay_ForUserDistill_UserName.Text);
         options["OnlinePay_Alipay_ForUserDistill_UserNumber"] = new OptionValue(this.tbOnlinePay_Alipay_ForUserDistill_UserNumber.Text);
         options["OnlinePay_Alipay_ForUserDistill_MD5Key"] = new OptionValue(this.tbOnlinePay_Alipay_ForUserDistill_MD5Key.Text);
         options["OnlinePay_Alipay_ForUserDistill_MD5Key_ForPayOut"] = new OptionValue(this.tbOnlinePay_Alipay_ForUserDistill_MD5Key_ForPayOut.Text);
         options["OnlinePay_Alipay_ForUserDistill_Status_ON"] = new OptionValue(this.cbOnlinePay_Alipay_ForUserDistill_Status_ON.Checked);
         options["OnlinePay_99Bill_UserName"] = new OptionValue(this.tb99BillName.Text);
         options["OnlinePay_99Bill_UserNumber"] = new OptionValue(this.tb99BillNumber.Text);
         options["OnlinePay_99Bill_MD5Key"] = new OptionValue(this.tb99BillKey.Text);
         options["OnlinePay_99Bill_PayFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tb99BillPayFormalitiesFeesScale.Text, 0.0));
         options["OnlinePayOut_99Bill_MD5Key"] = new OptionValue(this.tb99BillOutKey.Text);
         options["OnlinePay_99Bill_QueryMD5Key"] = new OptionValue(this.tb99BillQueryKey.Text);
         options["OnlinePayOut_99Bill_DistillFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tb99BillDistillFormalitiesFeesScale.Text, 0.0));
         options["OnlinePay_99Bill_Status_ON"] = new OptionValue(this.cb99BillON.Checked);
         options["OnlinePay_Tenpay_UserName"] = new OptionValue(this.tbTenpayName.Text);
         options["OnlinePay_Tenpay_UserNumber"] = new OptionValue(this.tbTenpayNumber.Text);
         options["OnlinePay_Tenpay_MD5Key"] = new OptionValue(this.tbTenpayKey.Text);
         options["OnlinePay_Tenpay_PayFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbTenpayPayFormalitiesFeesScale.Text, 0.0));
         options["OnlinePayOut_Tenpay_MD5Key"] = new OptionValue(this.tbTenpayOutKey.Text);
         options["OnlinePayOut_Tenpay_DistillFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbTenpayDistillFormalitiesFeesScale.Text, 0.0));
         options["OnlinePay_Tenpay_Status_ON"] = new OptionValue(this.cbTenpayON.Checked);
         options["OnlinePay_CBPayMent_UserName"] = new OptionValue(this.tbCBPayMentName.Text);
         options["OnlinePay_CBPayMent_UserNumber"] = new OptionValue(this.tbCBPayMentNumber.Text);
         options["OnlinePay_CBPayMent_MD5Key"] = new OptionValue(this.tbCBPayMentKey.Text);
         options["OnlinePay_CBPayMent_PayFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbCBPayMentPayFormalitiesFeesScale.Text, 0.0));
         options["OnlinePayOut_CBPayMent_MD5Key"] = new OptionValue(this.tbCBPayMentOutKey.Text);
         options["OnlinePayOut_CBPayMent_DistillFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbCBPayMentDistillFormalitiesFeesScale.Text, 0.0));
         options["OnlinePay_CBPayMent_Status_ON"] = new OptionValue(this.cbCBPayMentON.Checked);
         options["OnlinePay_YeePay_UserName"] = new OptionValue(this.tbYeePayName.Text);
         options["OnlinePay_YeePay_UserNumber"] = new OptionValue(this.tbYeePayNumber.Text);
         options["OnlinePay_YeePay_MD5Key"] = new OptionValue(this.tbYeePayKey.Text);
         options["OnlinePay_YeePayy_PayFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbYeePayFormalitiesFeesScale.Text, 0.0));
         options["OnlinePayOut_YeePay_MD5Key"] = new OptionValue(this.tbYeePayOutKey.Text);
         options["OnlinePayOut_YeePay_DistillFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbYeePayDistillFormalitiesFeesScale.Text, 0.0));
         options["OnlinePay_YeePay_Status_ON"] = new OptionValue(this.cbYeePayON.Checked);
         options["OnlinePay_007Ka_FormalitiesFees"] = new OptionValue(this.tb007Ka_FormalitiesFees.Text);
         options["OnlinePay_007Ka_MerAccount"] = new OptionValue(this.tb007Ka_MerAccount.Text);
         options["OnlinePay_007Ka_MerchantId"] = new OptionValue(this.tb007Ka_MerchantId.Text);
         options["OnlinePay_007Ka_Status_ON"] = new OptionValue(this.cb007KaON.Checked);
     }
     catch (Exception exception)
     {
         PF.GoError(1, exception.Message, "Admin_OnlinePayGateway");
         return;
     }
     JavaScript.Alert(this.Page, "设置保存成功。");
 }
예제 #23
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SystemOptions so = new SystemOptions();

        ElectronTicket_ZCW_Status_ON = so["ElectronTicket_ZCW_Status_ON"].ToBoolean(false);
        ElectronTicket_ZCW_Getway = so["ElectronTicket_ZCW_Getway"].ToString("");
        ElectronTicket_ZCW_UserName = so["ElectronTicket_ZCW_UserName"].ToString("");
        ElectronTicket_ZCW_UserPassword = so["ElectronTicket_ZCW_UserPassword"].ToString("");
        ElectronTicket_ZCW_IP = so["ElectronTicket_ZCW_IP"].ToString("").Trim();

        if (!ElectronTicket_ZCW_Status_ON)
        {
            this.Response.End();

            return;
        }

        if (!this.IsPostBack)
        {
            if (!String.IsNullOrEmpty(ElectronTicket_ZCW_IP))
            {
                ElectronTicket_ZCW_IP = "," + ElectronTicket_ZCW_IP + ",";

                if (ElectronTicket_ZCW_IP.IndexOf("," + GetClientIPAddress() + ",") < 0)
                {
                    new Log("ElectronTicket\\ZCW").Write("电子票异常客户端 IP 请求。" + GetClientIPAddress());

                    this.Response.End();

                    return;
                }
            }

            string request;
            using (Stream MyStream = Request.InputStream)
            {
                byte[] _tmpData = new byte[MyStream.Length];
                MyStream.Read(_tmpData, 0, _tmpData.Length);
                request = Encoding.UTF8.GetString(_tmpData);
            }

            string transactiontype = "";

            new Log("ElectronTicket\\ZCW").Write(request);

            if (!ValidMessage(request, ref transactiontype))
            {
                new Log("ElectronTicket\\ZCW").Write("校验码错误:" + request);

                Response.Write("校验码错误");
                Response.End();

                return;
            }

            Receive(transactiontype, request);
        }
    }
예제 #24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SystemOptions so = new SystemOptions();

        ElectronTicket_ZCW_Status_ON    = so["ElectronTicket_ZCW_Status_ON"].ToBoolean(false);
        ElectronTicket_ZCW_Getway       = so["ElectronTicket_ZCW_Getway"].ToString("");
        ElectronTicket_ZCW_UserName     = so["ElectronTicket_ZCW_UserName"].ToString("");
        ElectronTicket_ZCW_UserPassword = so["ElectronTicket_ZCW_UserPassword"].ToString("");
        ElectronTicket_ZCW_IP           = so["ElectronTicket_ZCW_IP"].ToString("").Trim();

        if (!ElectronTicket_ZCW_Status_ON)
        {
            this.Response.End();

            return;
        }

        if (!this.IsPostBack)
        {
            if (!String.IsNullOrEmpty(ElectronTicket_ZCW_IP))
            {
                ElectronTicket_ZCW_IP = "," + ElectronTicket_ZCW_IP + ",";

                if (ElectronTicket_ZCW_IP.IndexOf("," + GetClientIPAddress() + ",") < 0)
                {
                    new Log("ElectronTicket\\ZCW").Write("电子票异常客户端 IP 请求。" + GetClientIPAddress());

                    this.Response.End();

                    return;
                }
            }

            string request;
            using (Stream MyStream = Request.InputStream)
            {
                byte[] _tmpData = new byte[MyStream.Length];
                MyStream.Read(_tmpData, 0, _tmpData.Length);
                request = Encoding.UTF8.GetString(_tmpData);
            }

            string transactiontype = "";

            new Log("ElectronTicket\\ZCW").Write(request);

            if (!ValidMessage(request, ref transactiontype))
            {
                new Log("ElectronTicket\\ZCW").Write("校验码错误:" + request);

                Response.Write("校验码错误");
                Response.End();

                return;
            }

            Receive(transactiontype, request);
        }
    }
예제 #25
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.IsPostBack)
     {
         tbKey.Text = PF.GetMID();
         SystemOptions so = new SystemOptions();
         tbKeyOK.Attributes.Add("value", so["SerialNumberForShoveSoft_MHB"].Value.ToString());
     }
 }
    private void BindDataForElectronTicket()
    {
        this.ddlElectronTicket.Items.Clear();
        SystemOptions options = new SystemOptions();

        if (options["ElectronTicket_HPCQ_Status_ON"].ToBoolean(false))
        {
            this.ddlElectronTicket.Items.Add(new ListItem("深圳恒朋-重庆福彩中心", "101"));
        }
    }
예제 #27
0
    private void BindDataForElectronTicket()
    {
        ddlElectronTicket.Items.Clear();
        SystemOptions so = new SystemOptions();

        ddlElectronTicket.Items.Add(new ListItem("向大赢家电子票中心", "101"));
        ddlElectronTicket.Items.Add(new ListItem("中民卓彩竞彩票中心", "102"));
        ddlElectronTicket.Items.Add(new ListItem("中民卓彩体彩票中心", "103"));
        ddlElectronTicket.Items.Add(new ListItem("中民卓彩福彩票中心", "104"));
    }
 public PathDescriptorProvider(IApiDescriptionGroupCollectionProvider provider,
                               IOptionsMonitor <SystemOptions> optionsMonitor)
 {
     this.Options = optionsMonitor.CurrentValue;
     optionsMonitor.OnChange(option =>
     {
         this.Options = option;
     });
     this._provider = provider;
     this.Scan();
 }
예제 #29
0
        public static void writeToFile(SystemOptions options, String path, XmlSerializer type, Boolean overwrite)
        {
            if (overwrite == false)
            {
                return;
            }

            serializerObject = type;
            writeFileStream  = new StreamWriter(path);

            serializerObject.Serialize(writeFileStream, options);
            writeFileStream.Close();
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     SystemOptions options = new SystemOptions();
     if (options["SystemVersionType"].ToInt(3) >= 3)
     {
         PF.GoError(3, "对不起,您没有足够的权限访问此页面", base.GetType().BaseType.FullName);
     }
     else if (!base.IsPostBack)
     {
         this.BindData();
         this.btnOK.Visible = base._User.Competences.IsOwnedCompetences(Competences.BuildCompetencesList(new string[] { "Options" }));
     }
 }
 private void BindData()
 {
     SystemOptions options = new SystemOptions();
     this.tb1.Text = options["ElectronTicket_HPCQ_Getway"].ToString("");
     this.tb2.Text = options["ElectronTicket_HPCQ_UserName"].ToString("");
     this.tb3.Attributes.Add("value", options["ElectronTicket_HPCQ_UserPassword"].ToString(""));
     ControlExt.SetDownListBoxTextFromValue(this.ddlNotFull1, options["ElectronTicket_HPCQ_NotFull"].ToString("1"));
     this.cb1.Checked = options["ElectronTicket_HPCQ_Status_ON"].ToBoolean(false);
     this.tb4.Text = options["ElectronTicket_Shove_UserName"].ToString("");
     this.tb5.Attributes.Add("value", options["ElectronTicket_Shove_UserPassword"].ToString(""));
     ControlExt.SetDownListBoxTextFromValue(this.ddlNotFull2, options["ElectronTicket_Shove_NotFull"].ToString("1"));
     this.cb2.Checked = options["ElectronTicket_Shove_Status_ON"].ToBoolean(false);
 }
예제 #32
0
        private void SetOption(SystemOptions options)
        {
            if (options?.Id.IsNullOrWhiteSpace() ?? false)
            {
                this._logging.Warn($"PermissionGroup = null,Enable single application mode");
            }
            else
            {
                this._logging.Info($"PermissionGroup = {options.Id},Enable multiple application mode");
            }

            this.Options = options;
        }
예제 #33
0
        public static void writeToFile(SystemOptions options, String path, XmlSerializer type)
        {
            if (File.Exists(path))
            {
                return;
            }

            serializerObject = type;
            writeFileStream  = new StreamWriter(path);

            serializerObject.Serialize(writeFileStream, options);
            writeFileStream.Close();
        }
예제 #34
0
 protected void Page_Load(object sender, EventArgs e)
 {
     SystemOptions options = new SystemOptions();
     this.MerID = options["OnlinePay_007Ka_MerchantId"].ToString("").Trim();
     this.MerAccount = options["OnlinePay_007Ka_MerAccount"].ToString("").Trim();
     this.OrderID = Utility.GetRequest("OrderID");
     this.key = options["OnlinePay_007Ka_Key"].ToString("").Trim();
     this.MerURL = Utility.GetUrl() + "/Home/Room/OnlinePay/007ka/QueryResult.aspx";
     this.Attach = this.MerURL;
     this.SettingOrderInfo();
     this.Sign = this.GetMD5(this.Orderinfo + "|" + this.key);
     string str = HttpUtility.UrlEncode(PF.GetHtml("http://www.007ka.cn/interface/cardpay/query.php?Orderinfo=" + this.Orderinfo + "&Sign=" + this.Sign, "GBK", 1));
     base.Response.Redirect("QueryResult.aspx?Orderinfo=" + str, true);
 }
예제 #35
0
    protected void Application_Start(Object sender, EventArgs e)
    {
        string        MID = PF.GetMID();
        SystemOptions so  = new SystemOptions();

        if (so["SerialNumberForShoveSoft_MHB"].Value.ToString() != Shove._Security.Encrypt.NoUnEncryptString(PF.GetCallCert(), MID, "SLS-", 5, 5, 0))
        {
            Application[CacheKey.IsSystemRegister] = false;
        }
        else
        {
            Application[CacheKey.IsSystemRegister] = true;
        }
    }
    private void BindData()
    {
        SystemOptions options = new SystemOptions();

        this.tb1.Text = options["ElectronTicket_HPCQ_Getway"].ToString("");
        this.tb2.Text = options["ElectronTicket_HPCQ_UserName"].ToString("");
        this.tb3.Attributes.Add("value", options["ElectronTicket_HPCQ_UserPassword"].ToString(""));
        ControlExt.SetDownListBoxTextFromValue(this.ddlNotFull1, options["ElectronTicket_HPCQ_NotFull"].ToString("1"));
        this.cb1.Checked = options["ElectronTicket_HPCQ_Status_ON"].ToBoolean(false);
        this.tb4.Text    = options["ElectronTicket_Shove_UserName"].ToString("");
        this.tb5.Attributes.Add("value", options["ElectronTicket_Shove_UserPassword"].ToString(""));
        ControlExt.SetDownListBoxTextFromValue(this.ddlNotFull2, options["ElectronTicket_Shove_NotFull"].ToString("1"));
        this.cb2.Checked = options["ElectronTicket_Shove_Status_ON"].ToBoolean(false);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        SystemOptions options = new SystemOptions();

        if (options["SystemVersionType"].ToInt(3) >= 3)
        {
            PF.GoError(3, "对不起,您没有足够的权限访问此页面", base.GetType().BaseType.FullName);
        }
        else if (!base.IsPostBack)
        {
            this.BindData();
            this.btnOK.Visible = base._User.Competences.IsOwnedCompetences(Competences.BuildCompetencesList(new string[] { "Options" }));
        }
    }
    private void BindData()
    {
        SystemOptions options = new SystemOptions();

        this.tbAlipayName.Text   = options["OnlinePay_Alipay_UserName"].ToString("");
        this.tbAlipayNumber.Text = options["OnlinePay_Alipay_UserNumber"].ToString("");
        this.tbAlipayKey.Text    = options["OnlinePay_Alipay_MD5Key"].ToString("");
        this.tbAlipayPayFormalitiesFeesScale.Text = options["OnlinePay_Alipay_PayFormalitiesFeesScale"].ToString("0.00");
        this.tbAlipayOutKey.Text = options["OnlinePayOut_Alipay_MD5Key"].ToString("");
        this.tbAlipayDistillFormalitiesFeesScale.Text = options["OnlinePayOut_Alipay_DistillFormalitiesFeesScale"].ToString("0.00");
        this.cbAlipayON.Checked = options["OnlinePay_Alipay_Status_ON"].ToBoolean(false);
        this.tbOnlinePay_Alipay_ForUserDistill_UserName.Text         = options["OnlinePay_Alipay_ForUserDistill_UserName"].ToString("");
        this.tbOnlinePay_Alipay_ForUserDistill_UserNumber.Text       = options["OnlinePay_Alipay_ForUserDistill_UserNumber"].ToString("");
        this.tbOnlinePay_Alipay_ForUserDistill_MD5Key.Text           = options["OnlinePay_Alipay_ForUserDistill_MD5Key"].ToString("");
        this.tbOnlinePay_Alipay_ForUserDistill_MD5Key_ForPayOut.Text = options["OnlinePay_Alipay_ForUserDistill_MD5Key_ForPayOut"].ToString("");
        this.cbOnlinePay_Alipay_ForUserDistill_Status_ON.Checked     = options["OnlinePay_Alipay_ForUserDistill_Status_ON"].ToBoolean(false);
        this.tb99BillName.Text   = options["OnlinePay_99Bill_UserName"].ToString("");
        this.tb99BillNumber.Text = options["OnlinePay_99Bill_UserNumber"].ToString("");
        this.tb99BillKey.Text    = options["OnlinePay_99Bill_MD5Key"].ToString("");
        this.tb99BillPayFormalitiesFeesScale.Text = options["OnlinePay_99Bill_PayFormalitiesFeesScale"].ToString("0.00");
        this.tb99BillOutKey.Text   = options["OnlinePayOut_99Bill_MD5Key"].ToString("");
        this.tb99BillQueryKey.Text = options["OnlinePay_99Bill_QueryMD5Key"].ToString("");
        this.tb99BillDistillFormalitiesFeesScale.Text = options["OnlinePayOut_99Bill_DistillFormalitiesFeesScale"].ToString("0.00");
        this.cb99BillON.Checked  = options["OnlinePay_99Bill_Status_ON"].ToBoolean(false);
        this.tbTenpayName.Text   = options["OnlinePay_Tenpay_UserName"].ToString("");
        this.tbTenpayNumber.Text = options["OnlinePay_Tenpay_UserNumber"].ToString("");
        this.tbTenpayKey.Text    = options["OnlinePay_Tenpay_MD5Key"].ToString("");
        this.tbTenpayPayFormalitiesFeesScale.Text = options["OnlinePay_Tenpay_PayFormalitiesFeesScale"].ToString("0.00");
        this.tbTenpayOutKey.Text = options["OnlinePayOut_Tenpay_MD5Key"].ToString("");
        this.tbTenpayDistillFormalitiesFeesScale.Text = options["OnlinePayOut_Tenpay_DistillFormalitiesFeesScale"].ToString("0.00");
        this.cbTenpayON.Checked     = options["OnlinePay_Tenpay_Status_ON"].ToBoolean(false);
        this.tbCBPayMentName.Text   = options["OnlinePay_CBPayMent_UserName"].ToString("");
        this.tbCBPayMentNumber.Text = options["OnlinePay_CBPayMent_UserNumber"].ToString("");
        this.tbCBPayMentKey.Text    = options["OnlinePay_CBPayMent_MD5Key"].ToString("");
        this.tbCBPayMentPayFormalitiesFeesScale.Text = options["OnlinePay_CBPayMent_PayFormalitiesFeesScale"].ToString("0.00");
        this.tbCBPayMentOutKey.Text = options["OnlinePayOut_CBPayMent_MD5Key"].ToString("");
        this.tbCBPayMentDistillFormalitiesFeesScale.Text = options["OnlinePayOut_CBPayMent_DistillFormalitiesFeesScale"].ToString("0.00");
        this.cbCBPayMentON.Checked                    = options["OnlinePay_CBPayMent_Status_ON"].ToBoolean(false);
        this.tbYeePayName.Text                        = options["OnlinePay_YeePay_UserName"].ToString("");
        this.tbYeePayNumber.Text                      = options["OnlinePay_YeePay_UserNumber"].ToString("");
        this.tbYeePayKey.Text                         = options["OnlinePay_YeePay_MD5Key"].ToString("");
        this.tbYeePayFormalitiesFeesScale.Text        = options["OnlinePay_YeePay_PayFormalitiesFeesScale"].ToString("0.00");
        this.tbYeePayOutKey.Text                      = options["OnlinePayOut_YeePay_MD5Key"].ToString("");
        this.tbYeePayDistillFormalitiesFeesScale.Text = options["OnlinePayOut_YeePay_DistillFormalitiesFeesScale"].ToString("0.00");
        this.cbYeePayON.Checked                       = options["OnlinePay_YeePay_Status_ON"].ToBoolean(false);
        this.tb007Ka_FormalitiesFees.Text             = options["OnlinePay_007Ka_FormalitiesFees"].ToString("0.00");
        this.tb007Ka_MerAccount.Text                  = options["OnlinePay_007Ka_MerAccount"].ToString("");
        this.tb007Ka_MerchantId.Text                  = options["OnlinePay_007Ka_MerchantId"].ToString("");
        this.cb007KaON.Checked                        = options["OnlinePay_007Ka_Status_ON"].ToBoolean(false);
    }
예제 #39
0
 protected void Page_Load(object sender, EventArgs e)
 {
     SystemOptions options = new SystemOptions();
     string key = options["MemberSharing_Alipay_MD5"].ToString("");
     string str2 = Utility.GetUrl() + "/Home/Room/Receive.aspx?" + HttpUtility.UrlEncode("BuyID=" + base.Request["BuyID"]);
     string gateway = options["MemberSharing_Alipay_Gateway"].ToString("");
     string str4 = "utf-8";
     string service = "user_authentication";
     string str6 = "MD5";
     string partner = options["MemberSharing_Alipay_UserNumber"].ToString("");
     string returnUrl = str2;
     string url = new Shove.Alipay.Alipay().CreatUrl(gateway, service, partner, str6, key, str2, str4, returnUrl);
     base.Response.Redirect(url, true);
 }
예제 #40
0
 protected void btnOK_Click(object sender, EventArgs e)
 {
     try
     {
         SystemOptions options = new SystemOptions();
         options["SerialNumberForShoveSoft_MHB"] = new OptionValue(this.tbKeyOK.Text);
     }
     catch (Exception exception)
     {
         PF.GoError(1, exception.Message, "Admin_SoftKey.aspx");
         return;
     }
     JavaScript.Alert(this.Page, "注册成功。");
 }
예제 #41
0
 protected void btnOK_Click(object sender, EventArgs e)
 {
     try
     {
         SystemOptions options = new SystemOptions();
         options["SerialNumberForShoveSoft_MHB"] = new OptionValue(this.tbKeyOK.Text);
     }
     catch (Exception exception)
     {
         PF.GoError(1, exception.Message, "Admin_SoftKey.aspx");
         return;
     }
     JavaScript.Alert(this.Page, "注册成功。");
 }
예제 #42
0
    //生成请求
    public void SettingParams()
    {
        SystemOptions so = new SystemOptions();

        //请求网关
        requestUrl = so["MemberSharing_Tencent_Gateway"].ToString("").Trim();

        //签名类型
        sign_type = "md5";

        //签名
        key = so["MemberSharing_Tencent_MD5"].ToString("").Trim();

        //对于商户:使用和支付时一样的key,可以登录财付通商户系统修改。
        sign_encrypt_keyid = "0";

        //字符编码格式
        input_charset = "GBK";

        //服务名称
        service = "login";

        //商户编号
        chnid = so["MemberSharing_Tencent_UserNumber"].ToString("").Trim();

        //chnid类型
        chtype = "0";

        //服务器通知返回接口
        redirect_url = Shove._Web.Utility.GetUrl() + "/Home/Room/TencentReceive.aspx";

        //自定义参数
        attach = redirect_url;

        //时间戳
        tmstamp = GetTmstamp();
        Dictionary <string, string> dict = new Dictionary <string, string>();

        dict.Add("sign_type", sign_type);
        dict.Add("sign_encrypt_keyid", sign_encrypt_keyid);
        dict.Add("input_charset", input_charset);
        dict.Add("service", service);
        dict.Add("chnid", chnid);
        dict.Add("chtype", chtype);
        dict.Add("redirect_url", redirect_url);
        dict.Add("attach", attach);
        dict.Add("tmstamp", tmstamp.ToString());
        sign = GetSign(key, input_charset, dict);
    }
예제 #43
0
    //生成请求
    public void SettingParams()
    {
        SystemOptions so = new SystemOptions();

        //请求网关
        requestUrl = so["MemberSharing_Tencent_Gateway"].ToString("").Trim();

        //签名类型
        sign_type = "md5";

        //签名
        key = so["MemberSharing_Tencent_MD5"].ToString("").Trim();

        //对于商户:使用和支付时一样的key,可以登录财付通商户系统修改。
        sign_encrypt_keyid = "0";

        //字符编码格式
        input_charset = "GBK";

        //服务名称
        service = "login";

        //商户编号
        chnid = so["MemberSharing_Tencent_UserNumber"].ToString("").Trim();

        //chnid类型
        chtype = "0";

        //服务器通知返回接口
        redirect_url = Shove._Web.Utility.GetUrl() + "/Home/Room/TencentReceive.aspx";

        //自定义参数
        attach =redirect_url;

        //时间戳
        tmstamp = GetTmstamp();
        Dictionary<string, string> dict = new Dictionary<string, string>();
        dict.Add("sign_type", sign_type);
        dict.Add("sign_encrypt_keyid", sign_encrypt_keyid);
        dict.Add("input_charset", input_charset);
        dict.Add("service", service);
        dict.Add("chnid", chnid);
        dict.Add("chtype", chtype);
        dict.Add("redirect_url", redirect_url);
        dict.Add("attach", attach);
        dict.Add("tmstamp", tmstamp.ToString());
        sign=GetSign(key, input_charset,dict);
    }
예제 #44
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SystemOptions so = new SystemOptions();

        ElectronTicket_HPJX_Status_ON = so["ElectronTicket_HPJX_Status_ON"].ToBoolean(false);
        ElectronTicket_HPJX_Getway = so["ElectronTicket_HPJX_Getway"].ToString("");
        ElectronTicket_HPJX_UserName = so["ElectronTicket_HPJX_UserName"].ToString("");
        ElectronTicket_HPJX_UserPassword = so["ElectronTicket_HPJX_UserPassword"].ToString("");
        ElectronTicket_HPJX_IP = so["ElectronTicket_HPJX_IP"].ToString("").Trim();
        ElectronTicket_HPJX_Pay_Getway = so["ElectronTicket_HPJX_PayGetway"].ToString("").Trim();

        if (!ElectronTicket_HPJX_Status_ON)
        {
            this.Response.End();

            return;
        }

        if (!this.IsPostBack)
        {
            if (!String.IsNullOrEmpty(ElectronTicket_HPJX_IP))
            {
                ElectronTicket_HPJX_IP = "," + ElectronTicket_HPJX_IP + ",";

                if (ElectronTicket_HPJX_IP.IndexOf("," + GetClientIPAddress() + ",") < 0)
                {
                    new Log("ElectronTicket\\HPJX").Write("电子票异常客户端 IP 请求。" + GetClientIPAddress());

                    this.Response.End();

                    return;
                }
            }

            TransType = Shove._Web.Utility.GetRequest("transType");
            TransMessage = Shove._Web.Utility.GetRequest("transMessage");

            WriteElectronTicketLog(false, TransType, "transType=" + TransType + "&transMessage=" + TransMessage);

            if ((TransType != "") && (TransMessage != ""))
            {
                if (ValidMessage(TransType, TransMessage))
                {
                    Receive(TransType, TransMessage);
                }
            }
        }
    }
예제 #45
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SystemOptions so=new SystemOptions ();
        MerID = so["OnlinePay_007Ka_MerchantId"].ToString("").Trim();
        MerAccount = so["OnlinePay_007Ka_MerAccount"].ToString("").Trim();
        OrderID =Shove._Web.Utility.GetRequest("OrderID");
        key = so["OnlinePay_007Ka_Key"].ToString("").Trim();
        MerURL = Shove._Web.Utility.GetUrl() + "/Home/Room/OnlinePay/007ka/QueryResult.aspx";
        Attach = MerURL;
        SettingOrderInfo();
        Sign = GetMD5(Orderinfo+"|"+key);

        string return_Orderinfo = PF.GetHtml("http://www.007ka.cn/interface/cardpay/query.php?Orderinfo=" + Orderinfo + "&Sign=" + Sign, "GBK", 1);
        return_Orderinfo=System.Web.HttpUtility.UrlEncode(return_Orderinfo);
        Response.Redirect("QueryResult.aspx?Orderinfo=" + return_Orderinfo, true);
    }
예제 #46
0
 protected void Page_Load(object sender, EventArgs e)
 {
     SystemOptions options = new SystemOptions();
     this.ElectronTicket_HPCQ_Status_ON = options["ElectronTicket_HPCQ_Status_ON"].ToBoolean(false);
     this.ElectronTicket_HPCQ_Getway = options["ElectronTicket_HPCQ_Getway"].ToString("");
     this.ElectronTicket_HPCQ_UserName = options["ElectronTicket_HPCQ_UserName"].ToString("");
     this.ElectronTicket_HPCQ_UserPassword = options["ElectronTicket_HPCQ_UserPassword"].ToString("");
     if (this.ElectronTicket_HPCQ_Status_ON && !base.IsPostBack)
     {
         this.TransType = Utility.GetRequest("transType");
         this.TransMessage = Utility.GetRequest("transMessage");
         if (((this.TransType != "") && (this.TransMessage != "")) && this.ValidMessage(this.TransType, this.TransMessage))
         {
             this.Receive(this.TransType, this.TransMessage);
         }
     }
 }
예제 #47
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SystemOptions so = new SystemOptions();

        ElectronTicket_CTTCSD_Status_ON = so["ElectronTicket_CTTCSD_Status_ON"].ToBoolean(false);
        ElectronTicket_CTTCSD_Getway = so["ElectronTicket_CTTCSD_Getway"].ToString("");
        ElectronTicket_CTTCSD_DownloadGetway = so["ElectronTicket_CTTCSD_DownloadGetway"].ToString("");
        ElectronTicket_CTTCSD_UserName = so["ElectronTicket_CTTCSD_UserName"].ToString("");
        ElectronTicket_CTTCSD_UserPassword = so["ElectronTicket_CTTCSD_UserPassword"].ToString("");

        //if (!ElectronTicket_CTTCSD_Status_ON)
        //{
        //    return;
        //}

        if (!this.IsPostBack)
        {
            string request;

            using (Stream MyStream = Request.InputStream)
            {
                byte[] _tmpData = new byte[MyStream.Length];
                MyStream.Read(_tmpData, 0, _tmpData.Length);
                request = Encoding.UTF8.GetString(_tmpData);
            }

            string transactiontype = "";
            string Body = "";

            new Log("ElectronTicket\\CTTCSD").Write(System.Web.HttpUtility.UrlDecode(request));

            if (!ValidMessage(request, ref transactiontype, ref Body))
            {
                new Log("ElectronTicket\\CTTCSD").Write("校验码错误:" + request);

                Response.Write("校验码错误");
                Response.End();

                return;
            }

            Receive(transactiontype, Body);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            lbName.Text = _User.Name;
            lbName1.Text = _User.Name;
            lbBalance.Text = _User.Balance.ToString("N");

            string Type = Shove._Web.Utility.GetRequest("Type");
            int LotteryID = Shove._Convert.StrToInt( Shove._Web.Utility.GetRequest("LotteryID"),5);
            string SchemeID = Shove._Web.Utility.GetRequest("SchemeID");
            string Money = Shove._Web.Utility.GetRequest("Money");

            SystemOptions so = new SystemOptions();
            lbScore.Text = (Shove._Convert.StrToDouble(_Site.SiteOptions["Opt_ScoringExchangeRate"].ToString("1"), 1) * Shove._Convert.StrToDouble(Money, 0)).ToString("N");

            if (Type == "2")
            {
                lbType.Text = "追号";
                lbType1.Text = "[继续追号]";
                Look.Visible = false;
            }
            if (Type == "3")
            {
                lbType.Text = "入伙";
                lbType1.Text = "[继续入伙]";
            }

            if (Type == "3")
            {
                Buy.HRef = "Scheme.aspx?id="+SchemeID;
            }
            else
            {
                Buy.HRef = "../../Lottery/Buy_" + Lotteries[LotteryID] + ".aspx";
            }

            Look.HRef = "Scheme.aspx?id="+SchemeID;
            URL = Buy.HRef;
            script = "window.setInterval('DisplayTimer()', 1000);";
        }
    }
 protected void btnOK_Click(object sender, EventArgs e)
 {
     SystemOptions options = new SystemOptions();
     options["ElectronTicket_HPCQ_Getway"] = new OptionValue(this.tb1.Text);
     options["ElectronTicket_HPCQ_UserName"] = new OptionValue(this.tb2.Text);
     options["ElectronTicket_HPCQ_UserPassword"] = new OptionValue(this.tb3.Text);
     options["ElectronTicket_HPCQ_Status_ON"] = new OptionValue(this.cb1.Checked);
     options["ElectronTicket_HPCQ_NotFull"] = new OptionValue(this.ddlNotFull1.SelectedValue);
     options["ElectronTicket_Shove_UserName"] = new OptionValue(this.tb4.Text);
     options["ElectronTicket_Shove_UserPassword"] = new OptionValue(this.tb5.Text);
     options["ElectronTicket_Shove_Status_ON"] = new OptionValue(this.cb2.Checked);
     options["ElectronTicket_Shove_NotFull"] = new OptionValue(this.ddlNotFull2.SelectedValue);
     for (int i = 0; i < this.g.Rows.Count; i++)
     {
         DropDownList list = (DropDownList)this.g.Rows[i].Cells[1].FindControl("ddlElectronTicket");
         MSSQL.ExecuteNonQuery("update T_Lotteries set PrintOutType = " + list.SelectedValue + " where [ID] = " + this.g.Rows[i].Cells[2].Text, new MSSQL.Parameter[0]);
     }
     this.tb3.Attributes.Add("value", this.tb3.Text);
     this.tb5.Attributes.Add("value", this.tb5.Text);
     JavaScript.Alert(this.Page, "站点资料已经保存成功。");
 }
예제 #50
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (base.Request.QueryString.Count < 1)
     {
         JavaScript.Alert(this.Page, "接口调用失败,请重新登录。", "../../Home/Web/Default.aspx");
     }
     else
     {
         SystemOptions options = new SystemOptions();
         string str = "http://notify.alipay.com/trade/notify_query.do?";
         string str2 = options["MemberSharing_Alipay_UserNumber"].ToString("");
         str = str + "partner=" + str2 + "&notify_id=" + base.Request.QueryString["notify_id"];
         if (this.Get_Http(str, 0x1d4c0) == "false")
         {
             JavaScript.Alert(this.Page, "接口调用失败,请重新登录。", "../../Home/Web/Default.aspx");
         }
         else
         {
             string url = base.Request.Url.AbsoluteUri.Replace("/MemberSharing/Alipay/Receive.aspx?", "/Home/Web/UserRegisterForAlipayMemberSharing.aspx?");
             base.Response.Redirect(url, true);
         }
     }
 }
예제 #51
0
    private void BindData()
    {
        SystemOptions so = new SystemOptions();
        //恒朋江西电子票参数
        tb1.Text = so["ElectronTicket_HPJX_Getway"].ToString("");
        tb2.Text = so["ElectronTicket_HPJX_UserName"].ToString("");
        tb3.Attributes.Add("value", so["ElectronTicket_HPJX_UserPassword"].ToString(""));

        cb1.Checked = so["ElectronTicket_HPJX_Status_ON"].ToBoolean(false);

        //恒朋上海电子票参数
        tb_HPSH_Getway.Text = so["ElectronTicket_HPSH_Getway"].ToString("");
        tb_AgentID.Text = so["ElectronTicket_HPSH_UserName"].ToString("");
        tb_AgentPwd.Attributes.Add("value", so["ElectronTicket_HPSH_UserPassword"].ToString(""));

        cb_HPSH.Checked = so["ElectronTicket_HPSH_Status_ON"].ToBoolean(false);

        //恒朋上海电子票参数
        tb_HPSD_Getway.Text = so["ElectronTicket_HPSD_Getway"].ToString("");
        tb_HPSD_AgentID.Text = so["ElectronTicket_HPSD_UserName"].ToString("");
        tb_HPSD_AgentPwd.Attributes.Add("value", so["ElectronTicket_HPSD_UserPassword"].ToString(""));

        cb_HPSD.Checked = so["ElectronTicket_HPSD_Status_ON"].ToBoolean(false);
    }
예제 #52
0
파일: Open.aspx.cs 프로젝트: ichari/ichari
    protected void btnGO_Step1_Click(object sender, EventArgs e)
    {
        btnGO_Step1.AlertText = "";

        if (ddlLottery.SelectedValue == SLS.Lottery.ZCDC.sID)
        {
            Shove._Web.JavaScript.Alert(this.Page, "足彩单场不支持分步开奖。");

            return;
        }

        tbWinNumber.Text = Shove._Convert.ToDBC(tbWinNumber.Text.Trim().Replace(" ", " ")).Trim();

        if (!new SLS.Lottery()[int.Parse(ddlLottery.SelectedValue)].AnalyseWinNumber(tbWinNumber.Text))
        {
            Shove._Web.JavaScript.Alert(this.Page, "开奖号码不正确!");

            return;
        }

        SystemOptions so = new SystemOptions();
        bool isCompareWinMoneyNoWithFax = so["isCompareWinMoneyNoWithFax"].ToBoolean(true);

        string WinListXML = "<WinLists>";

        double[] WinMoneyList = new double[g.Rows.Count * 2];

        for (int i = 0; i < g.Rows.Count; i++)
        {
            WinMoneyList[i * 2] = Shove._Convert.StrToDouble(((TextBox)g.Rows[i].Cells[1].FindControl("tbMoney")).Text, 0);
            WinMoneyList[i * 2 + 1] = Shove._Convert.StrToDouble(((TextBox)g.Rows[i].Cells[2].FindControl("tbMoneyNoWithTax")).Text, 0);

            if (WinMoneyList[i * 2] < 0)
            {
                Shove._Web.JavaScript.Alert(this.Page, "第 " + (i + 1).ToString() + " 项奖金输入错误!");

                return;
            }

            if (WinMoneyList[i * 2] < WinMoneyList[i * 2 + 1])
            {
                if (isCompareWinMoneyNoWithFax)
                {
                    Shove._Web.JavaScript.Alert(this.Page, "第 " + (i + 1).ToString() + " 项税后奖金输入错误(不能大于税前奖金)!");

                    return;
                }
            }

            WinListXML += "<WinList defaultMoney=\"" + WinMoneyList[i * 2].ToString() + "\" DefaultMoneyNoWithTax=\"" + WinMoneyList[i * 2 + 1].ToString() + "\"/>";
        }

        WinListXML += "</WinLists>";

        DataTable dtIsuseBonuses = new DAL.Tables.T_IsuseBonuses().Open("", "IsuseID = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue), "");

        if (dtIsuseBonuses == null)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().BaseType.FullName);

            return;
        }

        if (dtIsuseBonuses.Rows.Count < 1)
        {
            int ReturnValue = -1;
            string ReturnDescription = "";


            int Result = DAL.Procedures.P_IsuseBonusesAdd(Shove._Convert.StrToLong(ddlIsuse.SelectedValue, 0), _User.ID, WinListXML, ref ReturnValue, ref ReturnDescription);

            if (Result < 0)
            {
                PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().BaseType.FullName);

                return;
            }

            if (ReturnValue < 0)
            {
                Shove._Web.JavaScript.Alert(this.Page, ReturnDescription);

                return;
            }

            Shove._Web.JavaScript.Alert(this.Page, "请下一位管理员继续开奖!");

            return;
        }

        if (dtIsuseBonuses.Rows[0]["UserID"].ToString() == _User.ID.ToString())
        {
            Shove._Web.JavaScript.Alert(this.Page, "请下一位管理员继续开奖!");

            return;
        }

        for (int i = 0; i < dtIsuseBonuses.Rows.Count; i++)
        {
            if ((WinMoneyList[i * 2] != Shove._Convert.StrToDouble(dtIsuseBonuses.Rows[i]["defaultMoney"].ToString(), 0)) || (WinMoneyList[i * 2 + 1] != Shove._Convert.StrToDouble(dtIsuseBonuses.Rows[i]["DefaultMoneyNoWithTax"].ToString(), 0)))
            {
                DAL.Tables.T_IsuseBonuses T_IsuseBonuses = new DAL.Tables.T_IsuseBonuses();
                T_IsuseBonuses.Delete("IsuseID = " + ddlIsuse.SelectedValue);

                Shove._Web.JavaScript.Alert(this.Page, "两次奖项输入不一致,请联系上一次开奖操作员!");

                return;
            }
        }

        DataTable dt = new DAL.Tables.T_Schemes().Open("* ", "IsuseID = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue) + " and isOpened = 0 and Buyed = 1", "[ID]");

        if (dt == null)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().BaseType.FullName);

            return;
        }

        StringBuilder sb = new StringBuilder();

        string NoWinSchemeID = "";

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            string LotteryNumber = dt.Rows[i]["LotteryNumber"].ToString();
            string Description = "";
            double WinMoneyNoWithTax = 0;


            double WinMoney = 0;

            try
            {
                WinMoney = new SLS.Lottery()[int.Parse(ddlLottery.SelectedValue)].ComputeWin(LotteryNumber, tbWinNumber.Text.Trim(), ref Description, ref WinMoneyNoWithTax, int.Parse(dt.Rows[i]["PlayTypeID"].ToString()), WinMoneyList);
            }
            catch
            {
                WinMoney = 0;

                new Log("System").Write("方案 ID:" + dt.Rows[i]["ID"].ToString() + " 算奖出现错误!");
            }

            if (WinMoney == 0)
            {
                NoWinSchemeID += dt.Rows[i]["ID"].ToString()  + ",";

                continue;
            }

            sb.Append("update T_Schemes set EditWinMoney = ").Append(WinMoney * Shove._Convert.StrToInt(dt.Rows[i]["Multiple"].ToString(), 1))
                .Append(", EditWinMoneyNoWithTax = ").Append(WinMoneyNoWithTax * Shove._Convert.StrToInt(dt.Rows[i]["Multiple"].ToString(), 1))
                .Append(", WinDescription = '").Append(Description).Append("'")
                .Append(" where [ID] = ").AppendLine(dt.Rows[i]["ID"].ToString());
        }

        Shove.Database.MSSQL.ExecuteNonQuery(sb.ToString(), new Shove.Database.MSSQL.Parameter[0]);

        if (NoWinSchemeID.EndsWith(","))
        {
            NoWinSchemeID = NoWinSchemeID.Substring(0, NoWinSchemeID.Length - 1);
        }

        if (!string.IsNullOrEmpty(NoWinSchemeID))
        {
            StringBuilder sb1 = new StringBuilder();

            sb1.Append("update T_Schemes set EditWinMoney = 0")
                .Append(", EditWinMoneyNoWithTax = 0, isOpened = 1 , OpenOperatorID=" + _User.ID.ToString())
                .Append(", WinDescription = ''")
                .Append(" where [ID] in (" + NoWinSchemeID + ")");

            Shove.Database.MSSQL.ExecuteNonQuery(sb1.ToString(), new Shove.Database.MSSQL.Parameter[0]);
        }

        dt = new DAL.Tables.T_Schemes().Open("top 1 * ", "IsuseID = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue) + " and isOpened = 0 and Buyed = 1 and WinDescription is null", "[ID]");

        if (dt == null)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().BaseType.FullName);

            return;
        }

        Step1IsOpen = (dt.Rows.Count > 0);

        btnGO_Step1.Enabled = Step1IsOpen;
        btnGO_Step2.Enabled = (!Step1IsOpen);
        btnGO_Step3.Enabled = ((!Step1IsOpen) && (!Step2IsOpen));

        string Message = "请再次执行第一步";

        if (!Step1IsOpen)
        {
            Message = "开奖步骤一已经完成,请执行第二步.";
        }

        Shove._Web.JavaScript.Alert(this.Page, Message);
    }
예제 #53
0
파일: Open.aspx.cs 프로젝트: ichari/ichari
    protected void btnGO_Step2_Click(object sender, EventArgs e)
    {
        btnGO_Step1.AlertText = "";

        if (ddlLottery.SelectedValue == SLS.Lottery.ZCDC.sID)
        {
            Shove._Web.JavaScript.Alert(this.Page, "足彩单场不支持分步开奖。");

            return;
        }

        tbWinNumber.Text = Shove._Convert.ToDBC(tbWinNumber.Text.Trim().Replace(" ", " ")).Trim();

        if (!new SLS.Lottery()[int.Parse(ddlLottery.SelectedValue)].AnalyseWinNumber(tbWinNumber.Text))
        {
            Shove._Web.JavaScript.Alert(this.Page, "开奖号码不正确!");

            return;
        }

        SystemOptions so = new SystemOptions();
        bool isCompareWinMoneyNoWithFax = so["isCompareWinMoneyNoWithFax"].ToBoolean(true);

        double[] WinMoneyList = new double[g.Rows.Count * 2];

        for (int i = 0; i < g.Rows.Count; i++)
        {
            WinMoneyList[i * 2] = Shove._Convert.StrToDouble(((TextBox)g.Rows[i].Cells[1].FindControl("tbMoney")).Text, 0);
            WinMoneyList[i * 2 + 1] = Shove._Convert.StrToDouble(((TextBox)g.Rows[i].Cells[2].FindControl("tbMoneyNoWithTax")).Text, 0);

            if (WinMoneyList[i * 2] < 0)
            {
                Shove._Web.JavaScript.Alert(this.Page, "第 " + (i + 1).ToString() + " 项奖金输入错误!");

                return;
            }

            if (WinMoneyList[i * 2] < WinMoneyList[i * 2 + 1])
            {
                if (isCompareWinMoneyNoWithFax)
                {
                    Shove._Web.JavaScript.Alert(this.Page, "第 " + (i + 1).ToString() + " 项税后奖金输入错误(不能大于税前奖金)!");

                    return;
                }
            }
        }

        if (Shove._Convert.ToTextCode(tbOpenAffiche.Value.Trim()) == "")
        {
            Shove._Web.JavaScript.Alert(this.Page, "请输入开奖公告!");

            return;
        }

        DataTable dt = new DAL.Tables.T_ElectronTicketAgentSchemes().Open("*", "IsuseID = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue) + " and WinMoney is null and state = 1", "[ID]");

        if (dt == null)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().BaseType.FullName);

            return;
        }

        DAL.Tables.T_ElectronTicketAgentSchemes t_ElectronTicketAgentSchemes = new DAL.Tables.T_ElectronTicketAgentSchemes();

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            string LotteryNumber = dt.Rows[i]["LotteryNumber"].ToString();
            string Description = "";
            double WinMoneyNoWithTax = 0;

            double WinMoney = new SLS.Lottery()[int.Parse(ddlLottery.SelectedValue)].ComputeWin(LotteryNumber, tbWinNumber.Text.Trim(), ref Description, ref WinMoneyNoWithTax, int.Parse(dt.Rows[i]["PlayTypeID"].ToString()), WinMoneyList);

            t_ElectronTicketAgentSchemes.WinMoney.Value = WinMoney * Shove._Convert.StrToInt(dt.Rows[i]["Multiple"].ToString(), 1);
            t_ElectronTicketAgentSchemes.WinMoneyWithoutTax.Value = WinMoneyNoWithTax * Shove._Convert.StrToInt(dt.Rows[i]["Multiple"].ToString(), 1);
            t_ElectronTicketAgentSchemes.WinDescription.Value = Description;

            t_ElectronTicketAgentSchemes.Update("[ID] =" + dt.Rows[i]["ID"].ToString());
        }

        dt = new DAL.Tables.T_ElectronTicketAgentSchemes().Open("top 1 * ", "IsuseID = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue) + " and state = 1 and WinMoney is null", "[ID]");

        if (dt == null)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().BaseType.FullName);

            return;
        }

        Step2IsOpen = (dt.Rows.Count > 0);

        btnGO_Step2.Enabled = Step2IsOpen;
        btnGO_Step3.Enabled = (!Step2IsOpen);

        string Message = "请再次执行第二步";

        if (!Step2IsOpen)
        {
            Message = "开奖步骤二已经完成,请执行第三步.";
        }

        Shove._Web.JavaScript.Alert(this.Page, Message);
    }
예제 #54
0
파일: Send.aspx.cs 프로젝트: ichari/ichari
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            double payMoney = Shove._Convert.StrToDouble(Shove._Web.Utility.GetRequest("PayMoney"), 0);
            string bankPay = Shove._Web.Utility.GetRequest("bankPay");
            string buyID = Shove._Web.Utility.GetRequest("BuyID");
            SystemOptions so = new SystemOptions();

            //管理员和会员的充值的最低金额不一样
            if (_User.Competences.CompetencesList.IndexOf(Competences.Administrator) > 0)
            {
                if (payMoney < 0.01)
                {
                    Response.Write("<script type=\"text/javascript\">alert(\"请输入正确的充值金额!再提交,谢谢!\"); window.close();</script>");

                    return;
                }
            }
            else
            {
                if (payMoney < 0.01)
                {
                    Response.Write("<script type=\"text/javascript\">alert(\"请输入正确的充值金额!再提交,谢谢!\"); window.close();</script>");

                    return;
                }
            }


            //手续费用
            double formalitiesFeesScale = so["OnlinePay_99Bill_PayFormalitiesFeesScale"].ToDouble(0) / 100;
            double formalitiesFees = Math.Round(payMoney * formalitiesFeesScale, 2);

            if (formalitiesFeesScale > 0.09)//手续费比例有误
            {
                PF.GoError(ErrorNumber.DataReadWrite, "手续费比例有误", this.GetType().BaseType.FullName);
                return;
            }
            //最后的充值额
            payMoney += formalitiesFees;

            long newPayNumber = -1;
            string returnDescription = "";
            //产生内部充值编号
            if (DAL.Procedures.P_GetNewPayNumber(_Site.ID, _User.ID, "99Bill_" + bankPay, (payMoney - formalitiesFees), formalitiesFees, ref newPayNumber, ref returnDescription) < 0)
            {
                PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().BaseType.FullName);

                return;
            }

            if ((newPayNumber < 0) || (returnDescription != ""))
            {
                PF.GoError(ErrorNumber.Unknow, returnDescription, this.GetType().BaseType.FullName);

                return;
            }

            //快钱接口请求参数
            string inputCharset = "";
            string pageUrl = "";
            string bgUrl = "";
            string version = "";
            string language = "";
            string signType = "";
            string merchantAcctId = "";

            string payerName = "";
            string payerContactType = "";
            string payerContact = "";
            string orderId = "";
            string orderAmount = "";
            string orderTime = "";
            string productName = "";

            string productNum = "";
            string productId = "";
            string productDesc = "";
            string ext1 = "";

            string ext2 = "";
            string payType = "";
            string bankId = "";
            string redoFlag = "";
            string pid = "";
            string signMsg = "";


            //人民币网关密钥
            ///区分大小写.请与快钱联系索取
            string key = so["OnlinePay_99Bill_MD5Key"].Value.ToString();

            //字符集.固定选择值。可为空。
            ///只能选择1、2、3.
            ///1代表UTF-8; 2代表GBK; 3代表gb2312
            ///默认值为1
            inputCharset = "1";

            //接受支付结果的页面地址.与[bgUrl]不能同时为空。必须是绝对地址。
            ///如果[bgUrl]为空,快钱将支付结果Post到[pageUrl]对应的地址。
            ///如果[bgUrl]不为空,并且[bgUrl]页面指定的<redirecturl>地址不为空,则转向到<redirecturl>对应的地址
            pageUrl = "";

            //服务器接受支付结果的后台地址.[bgUrl]与[pageUrl]不能同时为空。必须是绝对地址。
            ///快钱通过服务器连接的方式将交易结果发送到[bgUrl]对应的页面地址,在商户处理完成后输出的<result>如果为1,页面会转向到<redirecturl>对应的地址。
            ///如果快钱未接收到<redirecturl>对应的地址,快钱将把支付结果post到[pageUrl]对应的页面。
            bgUrl = Shove._Web.Utility.GetUrl() + "/Home/Room/OnlinePay/99Bill/Receive.aspx";

            //网关版本.固定值
            ///快钱会根据版本号来调用对应的接口处理程序。
            ///本代码版本号固定为v2.0
            version = "v2.0";

            //语言种类.固定选择值。
            ///只能选择1、2、3
            ///1代表中文;2代表英文
            ///默认值为1
            language = "1";

            //签名类型.固定值
            ///1代表MD5签名
            ///当前版本固定为1
            signType = "1";

            //人民币网关账户号
            ///请登录快钱系统获取用户编号,用户编号后加01即为人民币网关账户号。
            merchantAcctId = so["OnlinePay_99Bill_UserNumber"].Value.ToString();

            //支付人姓名
            ///可为中文或英文字符
            payerName = _User.Name;

            //支付人联系方式类型.固定选择值
            ///只能选择1
            ///1代表Email
            payerContactType = "1";

            //支付人联系方式
            ///只能选择Email或手机号
            payerContact = "";

            //商户订单号
            ///由字母、数字、或[-][_]组成
            orderId = newPayNumber.ToString();//内部充值编号

            //订单金额
            ///以分为单位,必须是整型数字
            ///比方2,代表0.02元
            ///商品总金额,以分为单位(传过的是以元为单位).
            long total_fee = long.Parse((payMoney * 100).ToString());//!!!!!!!!!!!!!!!!!!!!!------注意单位是分----!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            orderAmount = total_fee.ToString();

            //订单提交时间
            ///14位数字。年[4位]月[2位]日[2位]时[2位]分[2位]秒[2位]
            ///如;20080101010101
            orderTime = DateTime.Now.ToString("yyyyMMddHHmmss");

            //商品名称
            ///可为中文或英文字符
            productName = "购彩预付款";

            //商品数量
            ///可为空,非空时必须为数字
            productNum = "1";

            //商品代码
            ///可为字符或者数字
            productId = "200599";

            //商品描述
            productDesc = "";

            //扩展字段1
            ///在支付结束后原样返回给商户
            ///交易标识(用户ID+投注ID+充值方式编号)
            string attachInfo = Shove._Security.Encrypt.EncryptString(PF.GetCallCert(), _User.ID.ToString() + "|" + bankPay + "|" + buyID);
            ext1 = attachInfo;

            //扩展字段2
            ///在支付结束后原样返回给商户
            ext2 = "";

            //支付方式.固定选择值
            ///只能选择00、10、11、12、13、14
            ///00:组合支付(网关支付页面显示快钱支持的各种支付方式,推荐使用)10:银行卡支付(网关支付页面只显示银行卡支付).11:电话银行支付(网关支付页面只显示电话支付).12:快钱账户支付(网关支付页面只显示快钱账户支付).13:线下支付(网关支付页面只显示线下支付方式).14:B2B支付(网关支付页面只显示B2B支付,但需要向快钱申请开通才能使用)
            payType = "00";

            //银行代码
            ///实现直接跳转到银行页面去支付,只在payType=10时才需设置参数
            ///具体代码参见 接口文档银行代码列表
            bankId = "";

            if (bankPay != "KQ")
            {
                //支付方式.固定选择值
                ///只能选择00、10、11、12、13、14
                ///00:组合支付(网关支付页面显示快钱支持的各种支付方式,推荐使用)10:银行卡支付(网关支付页面只显示银行卡支付).11:电话银行支付(网关支付页面只显示电话支付).12:快钱账户支付(网关支付页面只显示快钱账户支付).13:线下支付(网关支付页面只显示线下支付方式).14:B2B支付(网关支付页面只显示B2B支付,但需要向快钱申请开通才能使用)
                payType = "10";

                //银行代码
                ///实现直接跳转到银行页面去支付,只在payType=10时才需设置参数
                ///具体代码参见 接口文档银行代码列表
                bankId = bankPay;
            }

            //同一订单禁止重复提交标志
            ///固定选择值: 1、0
            ///1代表同一订单号只允许提交1次;0表示同一订单号在没有支付成功的前提下可重复提交多次。默认为0建议实物购物车结算类商户采用0;虚拟产品类商户采用1
            redoFlag = "1";

            //快钱的合作伙伴的账户号
            ///如未和快钱签订代理合作协议,不需要填写本参数
            pid = "";


            #region 验证参数是否齐全
            if (string.IsNullOrEmpty(merchantAcctId) || string.IsNullOrEmpty(ext1) || string.IsNullOrEmpty(orderId))
            {
                Response.Write("<script type=\"text/javascript\">alert(\"参数不齐全,无法充值!\"); window.close();</script>");

                return;
            }
            #endregion

            //生成加密签名串
            ///请务必按照如下顺序和规则组成加密串!
            String signMsgVal = "";
            signMsgVal = appendParam(signMsgVal, "inputCharset", inputCharset);
            signMsgVal = appendParam(signMsgVal, "pageUrl", pageUrl);
            signMsgVal = appendParam(signMsgVal, "bgUrl", bgUrl);
            signMsgVal = appendParam(signMsgVal, "version", version);
            signMsgVal = appendParam(signMsgVal, "language", language);
            signMsgVal = appendParam(signMsgVal, "signType", signType);
            signMsgVal = appendParam(signMsgVal, "merchantAcctId", merchantAcctId);
            signMsgVal = appendParam(signMsgVal, "payerName", payerName);
            signMsgVal = appendParam(signMsgVal, "payerContactType", payerContactType);
            signMsgVal = appendParam(signMsgVal, "payerContact", payerContact);
            signMsgVal = appendParam(signMsgVal, "orderId", orderId);
            signMsgVal = appendParam(signMsgVal, "orderAmount", orderAmount);
            signMsgVal = appendParam(signMsgVal, "orderTime", orderTime);
            signMsgVal = appendParam(signMsgVal, "productName", productName);
            signMsgVal = appendParam(signMsgVal, "productNum", productNum);
            signMsgVal = appendParam(signMsgVal, "productId", productId);
            signMsgVal = appendParam(signMsgVal, "productDesc", productDesc);
            signMsgVal = appendParam(signMsgVal, "ext1", ext1);
            signMsgVal = appendParam(signMsgVal, "ext2", ext2);
            signMsgVal = appendParam(signMsgVal, "payType", payType);
            signMsgVal = appendParam(signMsgVal, "bankId", bankId);
            signMsgVal = appendParam(signMsgVal, "redoFlag", redoFlag);
            signMsgVal = appendParam(signMsgVal, "pid", pid);
            signMsgVal = appendParam(signMsgVal, "key", key);

            //如果在web.config文件中设置了编码方式,例如<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>(如未设则默认为utf-8),
            //那么,inputCharset的取值应与已设置的编码方式相一致;
            //同时,GetMD5()方法中所传递的编码方式也必须与此保持一致。
            signMsg = GetMD5(signMsgVal, "utf-8").ToUpper();



            //生成调用接口的URL
            string requestURL = "";
            ///生成请求参数键值串
            requestURL = appendParam(requestURL, "inputCharset", inputCharset);
            requestURL = appendParam(requestURL, "pageUrl", pageUrl);
            requestURL = appendParam(requestURL, "bgUrl", bgUrl);
            requestURL = appendParam(requestURL, "version", version);
            requestURL = appendParam(requestURL, "language", language);
            requestURL = appendParam(requestURL, "signType", signType);
            requestURL = appendParam(requestURL, "merchantAcctId", merchantAcctId);
            requestURL = appendParam(requestURL, "payerName", HttpUtility.UrlEncode(payerName));
            requestURL = appendParam(requestURL, "payerContactType", payerContactType);
            requestURL = appendParam(requestURL, "payerContact", payerContact);
            requestURL = appendParam(requestURL, "orderId", orderId);
            requestURL = appendParam(requestURL, "orderAmount", orderAmount);
            requestURL = appendParam(requestURL, "orderTime", orderTime);
            requestURL = appendParam(requestURL, "productName", HttpUtility.UrlEncode(productName));
            requestURL = appendParam(requestURL, "productNum", productNum);
            requestURL = appendParam(requestURL, "productId", productId);
            requestURL = appendParam(requestURL, "productDesc", productDesc);
            requestURL = appendParam(requestURL, "ext1", ext1);
            requestURL = appendParam(requestURL, "ext2", ext2);
            requestURL = appendParam(requestURL, "payType", payType);
            requestURL = appendParam(requestURL, "bankId", bankId);
            requestURL = appendParam(requestURL, "redoFlag", redoFlag);
            requestURL = appendParam(requestURL, "pid", pid);

            requestURL = "https://www.99bill.com/gateway/recvMerchantInfoAction.htm?" + requestURL + "&signMsg=" + signMsg;
            new Log("OnlinePay").Write("快钱冲值请求:" + requestURL);

            this.Response.Write("<script language='javascript'>window.top.location.href='" + requestURL + "'</script>");

        }
    }
예제 #55
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         double num = _Convert.StrToDouble(Utility.GetRequest("PayMoney"), 0.0);
         string request = Utility.GetRequest("bankPay");
         string str2 = Utility.GetRequest("BuyID");
         SystemOptions options = new SystemOptions();
         if (base._User.Competences.CompetencesList.IndexOf("Administrator") > 0)
         {
             if (num < 0.01)
             {
                 base.Response.Write("<script type=\"text/javascript\">alert(\"请输入正确的充值金额!再提交,谢谢!\"); window.close();</script>");
                 return;
             }
         }
         else if (num < 0.01)
         {
             base.Response.Write("<script type=\"text/javascript\">alert(\"请输入正确的充值金额!再提交,谢谢!\"); window.close();</script>");
             return;
         }
         double num2 = options["OnlinePay_99Bill_PayFormalitiesFeesScale"].ToDouble(0.0) / 100.0;
         double formalitiesFees = Math.Round((double)(num * num2), 2);
         if (num2 > 0.09)
         {
             PF.GoError(4, "手续费比例有误", base.GetType().BaseType.FullName);
         }
         else
         {
             num += formalitiesFees;
             long newPayNumber = -1L;
             string returnDescription = "";
             if (Procedures.P_GetNewPayNumber(base._Site.ID, base._User.ID, "99Bill_" + request, num - formalitiesFees, formalitiesFees, ref newPayNumber, ref returnDescription) < 0)
             {
                 PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName);
             }
             else if ((newPayNumber < 0L) || (returnDescription != ""))
             {
                 PF.GoError(1, returnDescription, base.GetType().BaseType.FullName);
             }
             else
             {
                 string paramValue = "";
                 string str5 = "";
                 string str6 = "";
                 string str7 = "";
                 string str8 = "";
                 string str9 = "";
                 string str10 = "";
                 string name = "";
                 string str12 = "";
                 string str13 = "";
                 string str14 = "";
                 string str15 = "";
                 string str16 = "";
                 string str17 = "";
                 string str18 = "";
                 string str19 = "";
                 string str20 = "";
                 string str21 = "";
                 string str22 = "";
                 string str23 = "";
                 string str24 = "";
                 string str25 = "";
                 string str26 = "";
                 string str27 = "";
                 string str28 = options["OnlinePay_99Bill_MD5Key"].Value.ToString();
                 paramValue = "1";
                 str5 = "";
                 str6 = Utility.GetUrl() + "/Home/Room/OnlinePay/99Bill/Receive.aspx";
                 str7 = "v2.0";
                 str8 = "1";
                 str9 = "1";
                 str10 = options["OnlinePay_99Bill_UserNumber"].Value.ToString();
                 name = base._User.Name;
                 str12 = "1";
                 str13 = "";
                 str14 = newPayNumber.ToString();
                 double num5 = num * 100.0;
                 str15 = long.Parse(num5.ToString()).ToString();
                 str16 = DateTime.Now.ToString("yyyyMMddHHmmss");
                 str17 = "购彩预付款";
                 str18 = "1";
                 str19 = "200599";
                 str20 = "";
                 str21 = Encrypt.EncryptString(PF.GetCallCert(), base._User.ID.ToString() + "|" + request + "|" + str2);
                 str22 = "";
                 str23 = "00";
                 str24 = "";
                 if (request != "KQ")
                 {
                     str23 = "10";
                     str24 = request;
                 }
                 str25 = "1";
                 str26 = "";
                 if ((string.IsNullOrEmpty(str10) || string.IsNullOrEmpty(str21)) || string.IsNullOrEmpty(str14))
                 {
                     base.Response.Write("<script type=\"text/javascript\">alert(\"参数不齐全,无法充值!\"); window.close();</script>");
                 }
                 else
                 {
                     string returnStr = "";
                     returnStr = this.appendParam(returnStr, "inputCharset", paramValue);
                     returnStr = this.appendParam(returnStr, "pageUrl", str5);
                     returnStr = this.appendParam(returnStr, "bgUrl", str6);
                     returnStr = this.appendParam(returnStr, "version", str7);
                     returnStr = this.appendParam(returnStr, "language", str8);
                     returnStr = this.appendParam(returnStr, "signType", str9);
                     returnStr = this.appendParam(returnStr, "merchantAcctId", str10);
                     returnStr = this.appendParam(returnStr, "payerName", name);
                     returnStr = this.appendParam(returnStr, "payerContactType", str12);
                     returnStr = this.appendParam(returnStr, "payerContact", str13);
                     returnStr = this.appendParam(returnStr, "orderId", str14);
                     returnStr = this.appendParam(returnStr, "orderAmount", str15);
                     returnStr = this.appendParam(returnStr, "orderTime", str16);
                     returnStr = this.appendParam(returnStr, "productName", str17);
                     returnStr = this.appendParam(returnStr, "productNum", str18);
                     returnStr = this.appendParam(returnStr, "productId", str19);
                     returnStr = this.appendParam(returnStr, "productDesc", str20);
                     returnStr = this.appendParam(returnStr, "ext1", str21);
                     returnStr = this.appendParam(returnStr, "ext2", str22);
                     returnStr = this.appendParam(returnStr, "payType", str23);
                     returnStr = this.appendParam(returnStr, "bankId", str24);
                     returnStr = this.appendParam(returnStr, "redoFlag", str25);
                     returnStr = this.appendParam(returnStr, "pid", str26);
                     str27 = GetMD5(this.appendParam(returnStr, "key", str28), "utf-8").ToUpper();
                     string str31 = "";
                     str31 = this.appendParam(str31, "inputCharset", paramValue);
                     str31 = this.appendParam(str31, "pageUrl", str5);
                     str31 = this.appendParam(str31, "bgUrl", str6);
                     str31 = this.appendParam(str31, "version", str7);
                     str31 = this.appendParam(str31, "language", str8);
                     str31 = this.appendParam(str31, "signType", str9);
                     str31 = this.appendParam(str31, "merchantAcctId", str10);
                     str31 = this.appendParam(str31, "payerName", HttpUtility.UrlEncode(name));
                     str31 = this.appendParam(str31, "payerContactType", str12);
                     str31 = this.appendParam(str31, "payerContact", str13);
                     str31 = this.appendParam(str31, "orderId", str14);
                     str31 = this.appendParam(str31, "orderAmount", str15);
                     str31 = this.appendParam(str31, "orderTime", str16);
                     str31 = this.appendParam(str31, "productName", HttpUtility.UrlEncode(str17));
                     str31 = this.appendParam(str31, "productNum", str18);
                     str31 = this.appendParam(str31, "productId", str19);
                     str31 = this.appendParam(str31, "productDesc", str20);
                     str31 = this.appendParam(str31, "ext1", str21);
                     str31 = this.appendParam(str31, "ext2", str22);
                     str31 = this.appendParam(str31, "payType", str23);
                     str31 = this.appendParam(str31, "bankId", str24);
                     str31 = this.appendParam(str31, "redoFlag", str25);
                     str31 = this.appendParam(str31, "pid", str26);
                     str31 = "https://www.99bill.com/gateway/recvMerchantInfoAction.htm?" + str31 + "&signMsg=" + str27;
                     new Log("OnlinePay").Write("快钱冲值请求:" + str31);
                     base.Response.Write("<script language='javascript'>window.top.location.href='" + str31 + "'</script>");
                 }
             }
         }
     }
 }
예제 #56
0
    protected void OnlinePaymentAlipayToAlipay(int Count, double SumMoney, string Body, string UserDistillIDs)
    {
        //业务参数赋值;
        SystemOptions sysOptions = new SystemOptions();
        partner = sysOptions["OnlinePay_Alipay_ForUserDistill_UserNumber"].ToString("");		//partner		合作伙伴ID			保留字段
        key = sysOptions["OnlinePay_Alipay_ForUserDistill_MD5Key_ForPayOut"].ToString("");            //partner账户的支付宝安全校验码
        //**************e******************************************
        string email = sysOptions["OnlinePay_Alipay_ForUserDistill_UserName"].ToString("");         //付款人账号

        //未知@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
        string account_name = "深圳天维掌通技术有限公司"; //PublicFunction.GetOptionsAsString("OnlinePayOut_Alipay_RealityName", "");		//	账户真实姓名 

        string gateway = "https://www.alipay.com/cooperate/gateway.do?";//'支付接口'支付接口
        string _input_charset = "utf-8";
        string service = "batch_trans_notify";
        string sign_type = "MD5";

        DateTime dtNow = DateTime.Now;
        string pay_date = dtNow.ToString("yyyyMMdd");   // 付款日期   //注意格式

        //*******************************************************
        System.Random rad = new Random();
        string Num = rad.Next(1, 99).ToString();
        Num = Num.PadLeft(2, '0');
        string batch_no = dtNow.ToString("yyyyMMddhhmmss") + Num;	    //批量付款订单号 日期(20070412)+16位序列号
        string batch_fee = SumMoney.ToString();                         //总金额					0.01~50000.00
        string batch_num = Count.ToString();                            //批次号即该次付款总笔数
        //*********************************************************
        string detail_data = Body; //注意格式多条用"|" 隔开 //"0039411^[email protected]^周长军^0.01^test|0039491^[email protected]^谢凯^0.01^263"
        string notify_url = Shove._Web.Utility.GetUrl() + "/Admin/OnlinePayment/Alipay/AlipayNotify.aspx"; //服务器通知返回接口

        //把上传的支付明细写入数据库(FileName)和更新状态
        int returnValue = 0;
        string returnDecription = "";
        if (DAL.Procedures.P_UserDistillPayByAlipay(_User.ID, batch_no, UserDistillIDs, 1, ref returnValue, ref returnDecription) < 0)
        {
            DAL.Procedures.P_UserDistillPayByAlipayWriteLog("提款ID:" + UserDistillIDs + "写入数据库(FileName)和更新状态失败。");
        }
        if (returnDecription != "")
        {
            Shove._Web.JavaScript.Alert(this.Page, "数据更新错误:" + returnDecription);
        }

        Shove.Alipay.Alipay ap = new Shove.Alipay.Alipay();
        string aliay_url = ap.CreatUrl(
             gateway,
             service,
             partner,
             sign_type,
             batch_no,
             account_name,
             batch_fee,
             batch_num,
             email,
             pay_date,
             detail_data,
             key,
             notify_url,
             _input_charset
            );

        Response.Redirect(aliay_url, true);                                        //可以采用表单(post)传递数据

        return;
    }
예제 #57
0
    protected void OnlinePaymentAlipayToBank(int Count, double SumMoney, string Body, string UserDistillIDs)
    {
        //业务参数赋值;
        SystemOptions sysOptions = new SystemOptions();
        partner = sysOptions["OnlinePay_Alipay_ForUserDistill_UserNumber"].ToString("");//OnlinePayOut_Alipay_UserNumber		//partner		合作伙伴ID			保留字段
        key = sysOptions["OnlinePay_Alipay_ForUserDistill_MD5Key"].ToString("");   //OnlinePayOut_Alipay_MD5Key //partner账户的支付宝安全校验码

        gateway = sysOptions["MemberSharing_Alipay_Gateway"].ToString("");  //"https://www.alipay.com/cooperate/gateway.do";
        service = "bptb_pay_file";
        sign_type = "MD5";
        _input_charset = "GB2312";                                                  //编码类型
        file_digest_type = "MD5";                                                   //文件摘要算法
        biz_type = "d_sale";                                                        //业务类型

        agentID = sysOptions["OnlinePay_Alipay_ForUserDistill_UserNumber"].ToString("");// "2088001456282873";

        Shove.Alipay.Alipay ap = new Shove.Alipay.Alipay();

        DateTime dtNow = DateTime.Now;

        string FileName = "";
        string FileAddr = "";
        string ZipFileName = "";
        string ZipFileAddr = "";

        int i = 0;

        if ((Body != "") && (Count > 0) && (SumMoney > 0))
        {
            string strDateTime = dtNow.ToString("yyyyMMdd");

            #region     CSV文件标准格式

            //日期,总金额,总笔数,支付宝帐号(Email)
            //20080418,10,1,[email protected]
            //商户流水号,收款银行户名,收款银行帐号,收款开户银行,收款银行所在省份,收款银行所在市,收款支行名称,金额,对公对私标志,备注
            //2007052801,韦吴石,6221885511000609058,工商银行,广东省,深圳市,工商银行深圳宝安分行,10,2,2132

            #endregion

            string headStr = "日期,总金额,总笔数,支付宝帐号(Email)\r\n";
            headStr += strDateTime + "," + SumMoney.ToString() + "," + Count.ToString() + "," + partner + "\r\n";
            headStr += "商户流水号,收款银行户名,收款银行帐号,收款开户银行,收款银行所在省份,收款银行所在市,收款支行名称,金额,对公对私标志,备注\r\n";
            Body = headStr + Body;

            System.Random rad = new Random();
            string Num = rad.Next(1, 999).ToString();
            Num = Num + dtNow.Hour.ToString() + dtNow.Minute.ToString() + dtNow.Second.ToString();
            Num = Num.PadLeft(9, '0');

            FileName = "PAPX_" + strDateTime + "_P" + Num + ".csv".ToLower();
            FileAddr = MapPath("../App_Log/Admin/AlipayPayment/PABX/" + FileName).ToLower();
            ZipFileName = "PAPX_" + strDateTime + "_P" + Num + ".Zip".ToLower();
            ZipFileAddr = MapPath("../App_Log/Admin/AlipayPayment/PABX/" + ZipFileName).ToLower();

            if (!System.IO.File.Exists(FileAddr))
            {
                try
                {
                    //File.WriteAllText(FileAddr, Body);
                    if (!Shove._IO.File.WriteFile(FileAddr, Body))
                    {
                        DAL.Procedures.P_UserDistillPayByAlipayWriteLog("CSV文件写入失败:" + FileAddr);

                        Shove._Web.JavaScript.Alert(this.Page, "CSV文件写入失败");

                        return;
                    }

                }
                catch
                {
                    DAL.Procedures.P_UserDistillPayByAlipayWriteLog("CSV文件写入异常:" + FileAddr);
                    Shove._Web.JavaScript.Alert(this.Page, "CSV文件写入异常");

                    return;
                }
            }
            else
            {
                Shove._Web.JavaScript.Alert(this.Page, "文件写已存在");

                return;
            }

            if (System.IO.File.Exists(FileAddr))
            {
                if (!System.IO.File.Exists(ZipFileAddr))
                {
                    try
                    {
                        Shove._IO.File.Compress(FileAddr, ZipFileAddr);
                    }
                    catch
                    {

                        DAL.Procedures.P_UserDistillPayByAlipayWriteLog("文件压缩出现异常:" + FileAddr);
                        Shove._Web.JavaScript.Alert(this.Page, "文件压缩出现异常");
                        return;
                    }
                }

            }
            else
            {

                DAL.Procedures.P_UserDistillPayByAlipayWriteLog("CSV文件不存在(1):" + FileAddr);
                Shove._Web.JavaScript.Alert(this.Page, "CSV文件不存在");

                return;
            }
        }

        if (!System.IO.File.Exists(ZipFileAddr))
        {

            DAL.Procedures.P_UserDistillPayByAlipayWriteLog("ZIP文件不存在(2):" + FileAddr);
            Shove._Web.JavaScript.Alert(this.Page, "ZIP文件不存在");

            return;
        }

        byte[] Date = System.IO.File.ReadAllBytes(ZipFileAddr);
        digest_bptb_pay_file = Shove.Alipay.Alipay.GetMD5(Date, _input_charset);

        string[] Sortedstr = ap.GetUploadParams
            (
            service,
            _input_charset,
            partner,
            file_digest_type,
            biz_type,
            agentID
            );                                                                      //签名

        // 读文件流
        FileStream fs = new FileStream(ZipFileAddr, FileMode.Open, FileAccess.Read, FileShare.Read);

        // 这部分需要完善
        string ContentType = "application/octet-stream";
        byte[] fileBytes = new byte[fs.Length];
        fs.Read(fileBytes, 0, Convert.ToInt32(fs.Length));
        fs.Close();

        // 生成需要上传的二进制数组
        CreateBytes cb = new Shove.Alipay.CreateBytes();
        // 所有表单数据
        ArrayList bytesArray = new ArrayList();
        // 普通表单
        string[] fields = new string[Sortedstr.Length + 1];

        char[] delimiterChars = { '=' };

        for (i = 0; i < Sortedstr.Length; i++)
        {
            string fieldName = Sortedstr[i].Split(delimiterChars)[0];
            string fieldValue = Sortedstr[i].Split(delimiterChars)[1];

            bytesArray.Add(cb.CreateFieldData(fieldName, fieldValue));
            fields[i] = fieldName + "=" + fieldValue;
        }

        bytesArray.Add(cb.CreateFieldData("digest_bptb_pay_file", digest_bptb_pay_file));
        fields[i] = "digest_bptb_pay_file=" + digest_bptb_pay_file;
        sign = AlipayCommon.GetSign(fields, key).Trim();
        bytesArray.Add(cb.CreateFieldData("sign", sign));
        bytesArray.Add(cb.CreateFieldData("sign_type", "MD5"));

        // 文件表单
        bytesArray.Add(cb.CreateFieldData("bptb_pay_file", ZipFileAddr, ContentType, fileBytes));

        // 合成所有表单并生成二进制数组
        byte[] bytes = cb.JoinBytes(bytesArray);

        // 返回的内容
        byte[] responseBytes;
        // 上传到指定Url        
        bool uploaded = cb.UploadData(gateway, bytes, out responseBytes);
        if (!uploaded)
        {

            DAL.Procedures.P_UserDistillPayByAlipayWriteLog("上传到指定Url失败:" + FileAddr);
            try
            {
                File.Delete(FileAddr);
                File.Delete(ZipFileAddr);
            }
            catch
            {
            }
            Shove._Web.JavaScript.Alert(this.Page, "上传支付数据到指定Url失败!");

            return;
        }

        string UploadResult = System.Text.Encoding.Default.GetString(responseBytes);

        if (UploadResult.IndexOf("上传成功") >= 0)
        {
            //把上传的支付明细写入数据库(FileName)和更新状态
            int returnValue = 0;
            string returnDecription = "";
            if (DAL.Procedures.P_UserDistillPayByAlipay(_User.ID, ZipFileName, UserDistillIDs, 2, ref returnValue, ref returnDecription) < 0)
            {
                DAL.Procedures.P_UserDistillPayByAlipayWriteLog("提款ID:" + UserDistillIDs + "写入数据库(FileName)和更新状态失败。");
            }
            if (returnDecription != "")
            {
                DAL.Procedures.P_UserDistillPayByAlipayWriteLog("把上传的支付明细写入数据库(FileName)和更新状态出错:" + returnDecription);
                Shove._Web.JavaScript.Alert(this.Page, "出错:" + returnDecription);
                BindData(true);
                return;
            }

            Shove._Web.JavaScript.Alert(this.Page, UploadResult + "银行处理需要到明天才有结果,请耐心等待处理结果!");

            BindData(true);
        }
        else
        {

            DAL.Procedures.P_UserDistillPayByAlipayWriteLog("上传支付到银行明细失败:" + UploadResult);
            Shove._Web.JavaScript.Alert(this.Page, UploadResult.Replace("\n", "").Replace("\r", ""));
        }

    }
예제 #58
0
파일: Member.cs 프로젝트: ichari/ichari
        public string BuildLoginUrl()
        {
            new Log("bbb").Write("----------------1");

            SystemOptions so = new SystemOptions();

            string key = so["MemberSharing_Alipay_MD5"].ToString("");
            string return_url = Shove._Web.Utility.GetUrl() + "/MemberSharing/Alipay/Receive.aspx"; //服务器通知返回接口
            string gateway = "https://mapi.alipay.com/gateway.do";             //支付接口
            string _input_charset = "utf-8";
            string service = "alipay.auth.authorize";
            string sign_type = "MD5";
            string partner = so["MemberSharing_Alipay_UserNumber"].ToString("");          //卖家商户号
            string target_service = "user.auth.quick.login";

            Alipay.Gateway.Utility ap = new Alipay.Gateway.Utility();
            string aliay_url = ap.CreatUrl(
                gateway,
                service,
                partner,
                sign_type,
                key,
                return_url,
                _input_charset,
                target_service
            );

            new Log("bbb").Write(aliay_url);

            return aliay_url; //utility.CreateLoginUrl(Gateway, Partner, SignType, ReturnUrl, Key, InputCharset, parameters);

        }
예제 #59
0
파일: Member.cs 프로젝트: ichari/ichari
        public long Query(string Account, ref string RealityName)
        {
            SystemOptions so = new SystemOptions();

            string gateway = so["MemberRegister_Alipay_Gateway"].ToString("");
            string service = "user_query";
            string partner = so["MemberRegister_Alipay_UserNumber"].ToString("");  //卖家商户号
            string Key = so["MemberRegister_Alipay_MD5"].ToString("");
            string _input_charset = "utf-8";
            string sign_type = "MD5";

            if ((gateway == "") || (partner == "") || (Key == ""))
            {
                return -1;
            }

            Utility utility = new Utility();

            string aliay_url = utility.Createurl(gateway, service, partner, Key, sign_type, _input_charset, "email", Account);

            string AlipayResult = "";

            try
            {
                AlipayResult = PF.GetHtml(aliay_url, "utf-8", 20);
            }
            catch
            {
                return -2;
            }

            if (string.IsNullOrEmpty(AlipayResult))
            {
                return -3;
            }

            XmlDocument XmlDoc = new XmlDocument();

            try
            {
                XmlDoc.Load(new StringReader(AlipayResult));
            }
            catch
            {
                return -4;
            }

            System.Xml.XmlNodeList nodesIs_success = XmlDoc.GetElementsByTagName("is_success");

            if ((nodesIs_success == null) || (nodesIs_success.Count < 1))
            {
                return -5;
            }

            string is_success = nodesIs_success[0].InnerText;

            if (is_success.ToUpper() != "T")
            {
                return -6;
            }

            System.Xml.XmlNodeList nodesUserID = XmlDoc.GetElementsByTagName("user_id");

            if ((nodesUserID == null) || (nodesUserID.Count < 1))
            {
                return -7;
            }

            System.Xml.XmlNodeList nodesUserRealityName = XmlDoc.GetElementsByTagName("real_name");

            if ((nodesUserRealityName != null) && (nodesUserRealityName.Count >= 1))
            {
                RealityName = nodesUserRealityName[0].InnerText;
            }
            else
            {
                RealityName = "";
            }

            return Shove._Convert.StrToLong(nodesUserID[0].InnerText, -8);
        }
예제 #60
0
    /// <summary>
    /// 查询快钱冲记录是否冲值成功
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected bool   Check99BillPay(long payNumber,ref string DealID, ref string  ErrorMessage)
    {
        SystemOptions so = new SystemOptions();
        string key = so["OnlinePay_99Bill_QueryMD5Key"].Value.ToString();
        string myMerchantAcctId = so["OnlinePay_99Bill_UserNumber"].Value.ToString();
        
        #region 构造请求付款数组
        //生成请求对象
        //GatewayOrderQueryRequest orderQueryRequest = new GatewayOrderQueryRequest();
        Interface99Bill.GatewayOrderQueryRequest orderQueryRequest = new Interface99Bill.GatewayOrderQueryRequest();
        //orderQueryRequest.

        //字符集
        //固定值:1
        //1代表UTF-8 
        orderQueryRequest.inputCharset = "1";

        //查询接口版本
        //固定值:v2.0
        //注意为小写字母
        orderQueryRequest.version = "v2.0";

        //签名类型
        //固定值:1
        //1代表MD5加密签名方式
        orderQueryRequest.signType = 1;

        //人民币账号
        //数字串
        //本参数用来指定接收款项的快钱用户的人民币账号
        orderQueryRequest.merchantAcctId = myMerchantAcctId;

        //查询方式
        //固定选择值:0、1
        //0按商户订单号单笔查询(返回该订单信息)
        //1按交易结束时间批量查询(只返回成功订单)
        orderQueryRequest.queryType = 0;

        //查询模式
        //固定值:1
        //1代表简单查询(返回基本订单信息)
        orderQueryRequest.queryMode = 1;

        //交易开始时间
        //数字串,一共14位
        //格式为:年[4位]月[2位]日[2位]时[2位]分[2位]秒[2位],例如:20071117020101
        //orderQueryRequest.startTime ="";// PayDateTime.ToString("yyyyMMddHHmmss");// "20080303000000";

        //交易结束时间
        //数字串,一共14位
        //格式为:年[4位]月[2位]日[2位]时[2位]分[2位]秒[2位],例如:20071117020101
        //orderQueryRequest.endTime = "";// PayDateTime.AddDays(1).ToString("yyyyMMddHHmmss");// 查询从冲时间起一天内的

        //请求记录集页码
        //数字串
        //在查询结果数据总量很大时,快钱会将支付结果分多次返回。本参数表示商户需要得到的记录集页码。
        //默认为1,表示第1页。
        orderQueryRequest.requestPage = "1";

        //商户订单号
        //字符串
        //只允许使用字母、数字、- 、_,并以字母或数字开头
        orderQueryRequest.orderId = payNumber.ToString();

        //构造签名字符串
        string tempMac = "inputCharset=" + orderQueryRequest.inputCharset +
                        "&version=" + orderQueryRequest.version +
                        "&signType=" + orderQueryRequest.signType +
                        "&merchantAcctId=" + orderQueryRequest.merchantAcctId +
                        "&queryType=" + orderQueryRequest.queryType +
                        "&queryMode=" + orderQueryRequest.queryMode +
                        //"&startTime=" + orderQueryRequest.startTime +
                        //"&endTime=" + orderQueryRequest.endTime +
                        "&requestPage=" + orderQueryRequest.requestPage +
                        "&orderId=" + orderQueryRequest.orderId +
                        "&key=" + key;

        orderQueryRequest.signMsg = GetMD5(tempMac, "utf-8").ToUpper();

        #endregion 构造请求付款数组

        //GatewayOrderQueryService orderQueryService = new GatewayOrderQueryService();
        Interface99Bill.GatewayOrderQueryService  orderQueryService = new Interface99Bill.GatewayOrderQueryService();


        //调用gatewayOrderQuery()方法
        Interface99Bill.GatewayOrderQueryResponse orderQueryResponse = orderQueryService.gatewayOrderQuery(orderQueryRequest);

        if (orderQueryResponse.errCode != "")//返回接口的错误码
        {

            //return false;
        }

        //打印支付结果数据
        if (orderQueryResponse != null)
        {

            string msgSginSource = "";

            //网关版本
            //固定值:v2.0
            //与提交时的查询版本号保持一致
            msgSginSource += "version=" + orderQueryResponse.version;

            //签名类型
            //固定值:1
            //与提交时的签名类型保持一致
            msgSginSource += "&signType=" + orderQueryResponse.signType;

            //人民币账号
            msgSginSource += "&merchantAcctId=" + orderQueryResponse.merchantAcctId;
            //错误代码
            msgSginSource +=string.IsNullOrEmpty(orderQueryResponse.errCode)? "": "&errCode=" + orderQueryResponse.errCode;
            //记录集当前页码
            msgSginSource += string.IsNullOrEmpty(orderQueryResponse.currentPage) ? "" : "&currentPage=" + orderQueryResponse.currentPage;
            //记录集总页码
            msgSginSource += string.IsNullOrEmpty(orderQueryResponse.pageCount) ? "" : "&pageCount=" + orderQueryResponse.pageCount;
            //记录集当页条数
            msgSginSource += string.IsNullOrEmpty(orderQueryResponse.pageSize) ? "" : "&pageSize=" + orderQueryResponse.pageSize;
            //记录集总条数
            msgSginSource += string.IsNullOrEmpty(orderQueryResponse.recordCount) ? "" : "&recordCount=" + orderQueryResponse.recordCount;
            msgSginSource += "&key="+key;

            string myMsgSign = GetMD5(msgSginSource, "utf-8").ToUpper();
            //签名验证			
            if (myMsgSign != orderQueryResponse.signMsg)
            {
                ErrorMessage= "[快钱]查询结果数据签名验证失败.";

                return false;
            }

            if (orderQueryResponse.orders == null || orderQueryResponse.orders.Length == 0)
            {
                ErrorMessage = "[快钱]没有此支付成功记录.";

                return false;
            }

            if(orderQueryResponse.orders.Length==1)
            {
                //商户订单号
                string msgSginSource2="";
                msgSginSource2+="orderId="+orderQueryResponse.orders[0].orderId;

                //商户订单金额,(整型数字)以分为单位
                msgSginSource2+="&orderAmount="+orderQueryResponse.orders[0].orderAmount;


                //商户订单提交时间, 数字串, 与提交订单时的商户订单提交时间保持一致
                msgSginSource2+="&orderTime="+orderQueryResponse.orders[0].orderTime;

                //快钱交易时间//数字串//快钱接收该笔交易并进行处理的最后时间。//格式为:年[4位]月[2位]日[2位]时[2位]分[2位]秒[2位],例如:20071117020101
                msgSginSource2+="&dealTime="+orderQueryResponse.orders[0].dealTime;

                //处理结果//固定选择值:10、11、20//10:支付成功//只返回支付成功的记录
                 msgSginSource2+="&payResult="+orderQueryResponse.orders[0].payResult;

                //支付方式//固定选择值:00、10、11、12、13、14//10:银行卡支付//11:电话银行支付//12:快钱人民币账户支付//13:线下支付//14:B2B支付
                msgSginSource2+="&payType="+orderQueryResponse.orders[0].payType;

                //订单实际支付金额 整型数字  返回在使用优惠券等情况后,用户实际支付的金额  以分为单位。比方10元,提交时金额应为1000
                msgSginSource2+="&payAmount="+orderQueryResponse.orders[0].payAmount;

                //费用  数字串  快钱收取商户的手续费,单位为分。
                msgSginSource2+="&fee="+orderQueryResponse.orders[0].fee;

                //快钱交易号 数字串 该交易在快钱系统中对应的交易号d;
                msgSginSource2 +="&dealId="+orderQueryResponse.orders[0].dealId;

                msgSginSource2 += "&key="+key;

                string myMsgInfo = GetMD5(msgSginSource2, "utf-8").ToUpper();
                //签名验证			
                if (myMsgInfo != orderQueryResponse.orders[0].signInfo)
                {
                    ErrorMessage = "[快钱]查询支付记录的签名验证失败." + msgSginSource2;

                    return false;
                }
                
                if(orderQueryResponse.orders[0].orderId != payNumber.ToString())//比较返回的结果支付号与当前支付号
                {
                    ErrorMessage = "[快钱]返回的订单号不一致." + msgSginSource2;

                    return false;
                }

                if (orderQueryResponse.orders[0].payResult != "10")
                {
                    ErrorMessage = "[快钱]此支付记录没有成功.";
                    return false;
                }
                else
                {
                    DealID = orderQueryResponse.orders[0].dealId;//快钱交易号
                    return true;
                }
            }

            
        }

        ErrorMessage = "[快钱]未知原因";
        return false;
    }