Esempio n. 1
0
        /*跳转到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());
        }
Esempio n. 2
0
        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"]
            });
        }