/*跳转到PayPal中支付。*/ public ActionResult PostPay() { Pay PayPal = new Pay(Request.Form["url"]); PayPal.PostPay(new PayPalObj() { business = Request.Form["business"], item_name = Request.Form["item_name"], quantity = Request.Form["quantity"], amount = Request.Form["amount"], currency_code = Request.Form["currency_code"], return_url = Request.Form["return"], notify_url = Request.Form["notify_url"], cancel_return = Request.Form["cancel_return"], charset = Request.Form["charset"] }); return(View()); }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } Pay PayPal = new Pay(Request.Form["url"]); PayPal.PostPay(new PayPalObj() { business = Request.Form["business"], item_name = Request.Form["item_name"], quantity = Request.Form["quantity"], amount = Request.Form["amount"], currency_code = Request.Form["currency_code"], return_url = Request.Form["return"], notify_url = Request.Form["notify_url"], cancel_return = Request.Form["cancel_return"], charset = Request.Form["charset"] }); }