예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            AlipayFreezeNotifyModel           model = new AlipayFreezeNotifyModel();
            SortedDictionary <string, string> sPara = AlipayCoreHelper.GetRequestPost(Request.Form);
            string tmpPara = AlipayCoreHelper.GetPreSignStr(sPara);

            Log.Inf("[Alipay_FreezeNotify_Request]:" + tmpPara + "|" + Request.Form["sign"]);

            if (sPara != null && sPara.Count > 0)
            {
                model.Sign   = Request.Form["sign"];
                model.Amount = Request.Form["amount"];
                model.Freeze_Out_Order_No = Request.Form["freeze_out_order_no"];
                model.Notify_Id           = Request.Form["notify_id"];
                model.Notify_Time         = Request.Form["notify_time"];
                model.Notify_Type         = Request.Form["notify_type"];
                model.Pay_Date            = Request.Form["pay_date"];
                model.Result_Code         = Request.Form["result_code"];
                model.Status        = Request.Form["status"];
                model.Trade_No      = Request.Form["trade_no"];
                model.User_Id       = Request.Form["user_id"];
                model.User_Logon_Id = Request.Form["user_logon_id"];
                model.sPara         = sPara;

                TradePayResponse result = payNotifyClient.AlipayFreezeNotify(model);
                Log.Inf("[Alipay_FreezeNotify_Response]:" + SerializerHelper.SerializerToXml <TradePayResponse>(result));

                if (!(result.Status == "-1"))
                {
                    string[] data = result.RequestUrl.Split('|');

                    if (!(string.IsNullOrEmpty(data[0]) || string.IsNullOrEmpty(data[1])))
                    {
                        string tmp = HttpHelper.PostData(data[0], data[1]);
                    }
                    Response.Write("success");
                }
                else
                {
                    Response.Write("fail");
                }
            }
            else
            {
                Response.Write("无通知参数");
            }
        }
예제 #2
0
        /// <summary>
        /// 支付宝冻结异步通知
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public TradePayResponse AlipayFreezeNotify(AlipayFreezeNotifyModel model)
        {
            TradePayResponse response = new TradePayResponse();

            return(response);
        }