protected void Page_Load(object sender, EventArgs e)
        {
            log.Info(Request.Url.AbsoluteUri);
            LogRequestInfo(this.ReqParas);

            string key = AlipaySetting.Key; //填写自己的key
            string partner = AlipaySetting.Partner;//填写自己的Partner

            AliPay ap = new AliPay();
            string notifyid = ReqParas["notify_id"];
            Verify v = new Verify("notify_verify", partner, notifyid);
            ap.TradeClosed += new AliPay.ProcessNotifyEventHandler(ap_TradeClosed);
            ap.TradeFinished += new AliPay.ProcessNotifyEventHandler(ap_TradeFinished);
            ap.WaitBuyerConfirmGoods += new AliPay.ProcessNotifyEventHandler(ap_WaitBuyerConfirmGoods);
            ap.WaitBuyerPay += new AliPay.ProcessNotifyEventHandler(ap_WaitBuyerPay);
            ap.WaitSellerConfirmTrade += new AliPay.ProcessNotifyEventHandler(ap_WaitSellerConfirmTrade);
            ap.WaitSellerSendGoods += new AliPay.ProcessNotifyEventHandler(ap_WaitSellerSendGoods);
            ap.WaitSysConfirmPay += new AliPay.ProcessNotifyEventHandler(ap_WaitSysConfirmPay);
            ap.WaitSysPaySeller += new AliPay.ProcessNotifyEventHandler(ap_WaitSysPaySeller);
            ap.ModifyTradeBaseTotalFee += new AliPay.ProcessNotifyEventHandler(ap_ModifyTradeBaseTotalFee);
            ap.RefundClose += new AliPay.ProcessNotifyEventHandler(ap_RefundClose);
            ap.RefundSuccess += new AliPay.ProcessNotifyEventHandler(ap_RefundSuccess);
            ap.WaitSellerAgree += new AliPay.ProcessNotifyEventHandler(ap_WaitSellerAgree);
            ap.ProcessNotify(this, AlipaySetting.PushUrl, key, v, "utf-8");
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            CommOrderBll obll = new CommOrderBll();
            string orderId = Request.QueryString["orderId"];

            CommOrderModel model = obll.GetModel(orderId);
            List<CommOrderItemModel> items = obll.GetOrderItems(orderId);
            string subject = String.Join(",", (from s in items select s.ProductName).ToArray());
            int quantity = (from s in items select s.Quantity).Sum();
            string paymethod = (model.ShipMethod == ShipMethodType.EMS?"EMS":"Express");

            subject = String.IsNullOrEmpty(subject)?null:subject;
            string agent =null;
            string body = null;
            AliPay ap = new AliPay();
            StandardGoods bp = new StandardGoods(PayServiceType.trade_create_by_buyer.Key, AlipaySetting.Partner, AlipaySetting.NotifyUrl,AlipaySetting.ReturnUrl,
                agent,AlipaySetting.EncodeType,AlipaySetting.Key,AlipaySetting.SignType,subject,body,model.OrderId,
                model.Paysum, quantity, null,AlipaySetting.SellerEmail, null,null,null,null,
                "POST", model.ShipFee, LogisticsPayment.SELLER_PAY.Key, "1");

            bp.Notify_Url = AlipaySetting.NotifyUrl;
            bp.Return_Url = AlipaySetting.ReturnUrl;
            bp.Receive_Address = model.FullAddress;
            bp.Receive_Phone = model.RecieverPhone;
            bp.Receive_Zip = model.Postalcode;
            bp.Receive_Name = model.RecieverName;

            ap.CreateStandardTrade(AlipaySetting.PushUrl, bp, this);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            string key = AlipaySetting.Key; //填写自己的key
            string partner = AlipaySetting.Partner;//填写自己的Partner

            AliPay ap = new AliPay();
            string notifyid = Request.Form["notify_id"];
            Verify v = new Verify("notify_verify", partner, notifyid);
            ap.NotifyEvent += new AliPay.ProcessNotifyEventHandler(ap_NotifyEvent);
            ap.ProcessNotify(this, AlipaySetting.PushUrl, key, v, "utf-8");
            ap.CommonProcessNotify(this,AlipaySetting.VerifyUrl,AlipaySetting.Key,v,AlipaySetting.EncodeType);
        }