Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //支付成功前,统一跳转到此页面
        code = Request.QueryString["code"]; //支付接口编号
        type = Request.QueryString["type"]; //支付类型, OD为订单
        num  = Request.QueryString["num"];  //相应的单号

        BLL.Pay.PayEntity entity = new BLL.Pay.PayEntity(code);
        //在线支付的,跳转到指定支付页
        if (code == "01")
        {
            if (!string.IsNullOrEmpty(entity.sendURL))
            {
                string key = BLL.Pay.PayHepler.dataEncrypt(num + type + code);
                string url = entity.sendURL + "?code=" + code
                             + "&num=" + num + "&type=" + type + "&key=" + key;
                Response.Redirect(entity.sendURL + "?code=" + code
                                  + "&num=" + num + "&type=" + type + "&key=" + key);
                Response.End();
            }
            else
            {
                //非在线支付的,直接输出内容
                Response.Write(entity.content);
                Response.End();
            }
        }
        else if (code == "02")
        {
            PayType paytype = PayTypeFac.getPayType(type, num);//生成一个支付类型
            payaccount = entity.payAccount;
            amount     = paytype.amount * 100;
        }
    }
Esempio n. 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //支付完成后,统一跳转到此页面
        string code   = Request.QueryString["code"]; //支付接口编号
        string type   = Request.QueryString["type"]; //支付类型, OD为订单
        string num    = Request.QueryString["num"];  //相应的单号
        string key    = Request.QueryString["key"];  //MD5 Sign
        string status = Request.QueryString["status"];

        BLL.Pay.PayEntity entity = new BLL.Pay.PayEntity(code);

        if (status == "success")
        {
            CSA.HC.Common.AlertAndRedirect(entity.Name + "支付成功,我们会及时处理!", "../default.aspx");
        }
        else
        {
            CSA.HC.Common.AlertAndRedirect(entity.Name + "支付失败,请联系管理员!", "../default.aspx");
        }
    }