Exemplo n.º 1
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);
    }
Exemplo n.º 2
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);
    }
Exemplo n.º 3
0
    protected void AlipayPay(string defaultbank)
    {
        Alipay.Gateway.Utility ap = new Alipay.Gateway.Utility();
        string aliay_url          = "";

        partner = so["OnlinePay_Alipay_UserNumber"].ToString("");  //卖家商户号
        key     = so["OnlinePay_Alipay_MD5Key"].ToString("");


        aliay_url = ap.Createurl(
            gateway,
            service,
            partner,
            key,
            sign_type,
            _input_charset,
            "return_url",
            return_url,
            "notify_url",
            notify_url,
            "out_trade_no",
            out_trade_no,
            "subject",
            subject,
            "payment_type",
            payment_type,
            "total_fee",
            total_fee,
            "seller_email",
            seller_email,
            "body",
            body,
            "show_url",
            show_url,
            "defaultbank",
            defaultbank,
            "paymethod",
            paymethod
            );

        if (aliay_url == "")
        {
            Shove._Web.JavaScript.Alert(this.Page, "地址构建出现错误");

            return;
        }

        this.Response.Write("<script language='javascript'>window.top.location.href='" + aliay_url + "'</script>");
    }
Exemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SystemOptions so = new SystemOptions();

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

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

        Response.Redirect(ss.Trim(), true);
    }
Exemplo n.º 5
0
 protected void AlipayPay(string defaultbank)
 {
     Alipay.Gateway.Utility utility = new Alipay.Gateway.Utility();
     string str = "";
     this.partner = this.so["OnlinePay_Alipay_UserNumber"].ToString("");
     this.key = this.so["OnlinePay_Alipay_MD5Key"].ToString("");
     str = utility.Createurl(this.gateway, this.service, this.partner, this.key, this.sign_type, this._input_charset, new string[] {
         "return_url", this.return_url, "notify_url", this.notify_url, "out_trade_no", this.out_trade_no, "subject", this.subject, "payment_type", this.payment_type, "total_fee", this.total_fee, "seller_email", this.seller_email, "body", this.body,
         "show_url", this.show_url, "defaultbank", defaultbank, "paymethod", this.paymethod
      });
     if (str == "")
     {
         JavaScript.Alert(this.Page, "地址构建出现错误");
     }
     else
     {
         base.Response.Write("<script language='javascript'>window.top.location.href='" + str + "'</script>");
     }
 }
Exemplo n.º 6
0
    protected void BankClick(string bankPay)
    {
        Alipay.Gateway.Utility utility = new Alipay.Gateway.Utility();
        string str = "";

        this.partner = this.so["OnlinePay_Alipay_UserNumber1"].ToString("");
        this.key     = this.so["OnlinePay_Alipay_MD5Key1"].ToString("");
        str          = utility.Createurl(this.gateway, this.service, this.partner, this.key, this.sign_type, this._input_charset, new string[] {
            "return_url", this.return_url, "notify_url", this.notify_url, "out_trade_no", this.out_trade_no, "subject", this.subject, "payment_type", this.payment_type, "total_fee", this.total_fee, "seller_email", this.seller_email, "body", this.body,
            "defaultbank", bankPay, "paymethod", this.paymethod
        });
        if (str == "")
        {
            JavaScript.Alert(this.Page, "地址构建出现错误");
        }
        else
        {
            base.Response.Write("<script language='javascript'>window.top.location.href='" + str + "'</script>");
        }
    }
Exemplo n.º 7
0
    protected void AlipayPay(string defaultbank)
    {
        Alipay.Gateway.Utility ap = new Alipay.Gateway.Utility();
        string aliay_url = "";

        partner = so["OnlinePay_Alipay_UserNumber"].ToString("");  //卖家商户号
        key = so["OnlinePay_Alipay_MD5Key"].ToString("");


        aliay_url = ap.Createurl(
                gateway,
                service,
                partner,
                key,
                sign_type,
                _input_charset,
                "return_url",
                return_url,
                "notify_url",
                notify_url,
                "out_trade_no",
                out_trade_no,
                "subject",
                subject,
                "payment_type",
                payment_type,
                "total_fee",
                total_fee,
                "seller_email",
                seller_email,
                "body",
                body,
                "show_url",
                show_url,
                "defaultbank",
                defaultbank,
                "paymethod",
                paymethod
                );

        if (aliay_url == "")
        {
            Shove._Web.JavaScript.Alert(this.Page, "地址构建出现错误");

            return;
        }

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