//进入支付宝支付 protected void Button1_Click(object sender, EventArgs e) { string out_trade_no = "2009052610093"; //业务参数赋值; string gateway = "https://www.alipay.com/cooperate/gateway.do?"; //'支付接口 string service = "create_direct_pay_by_user"; string partner = "2088102856886695"; //partner 合作伙伴ID 保留字段 string sign_type = "MD5"; string subject = "**购物网商品"; //subject 商品名称 string body = "**购物网"; //body 商品描述 string payment_type = "1"; //支付类型 string total_fee = "0.01"; //总金额 0.01~50000.00 string show_url = "www.163.com"; string seller_email = "cwb5t@163.com"; //卖家账号 string key = "7xlym97z460nh8psuidrslw7k3ow36cz"; //partner账户的支付宝安全校验码 string return_url = "http://www.**.com/Alipay_Return.aspx"; //服务器通知返回接口 string notify_url = "http://www.**.com/Alipay_Notify.aspx"; //服务器通知返回接口 string _input_charset = "utf-8"; AliPay ap = new AliPay(); string aliay_url = ap.CreatUrl( gateway, service, partner, sign_type, out_trade_no, subject, body, payment_type, total_fee, show_url, seller_email, key, return_url, _input_charset, notify_url ); Response.Redirect(aliay_url); }