Ejemplo 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);
    }
Ejemplo 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);
    }
Ejemplo n.º 3
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);
    }