Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         Dictionary <string, string> parametersAll = bllPay.GetRequestParameter();
         string json = JsonConvert.SerializeObject(parametersAll);
         WritePayLog(json);
         //商户订单号
         string outTradeNo = parametersAll["out_trade_no"];
         //支付宝交易号
         string tradeNo = parametersAll["trade_no"];
         //交易状态
         string tradeStatus = parametersAll["trade_status"];
         //支付宝开放平台应用Id
         string app_id    = parametersAll["app_id"];
         string baseUrl   = HttpContext.Current.Request.Url.Authority;
         string msg       = "";
         bool   payResult = bllPay.AliPayAppMallNotify(tradeStatus, app_id, tradeNo, outTradeNo, parametersAll, baseUrl, out msg);
         if (payResult)
         {
             Response.Write(successStr);
         }
         else
         {
             //Tolog(msg);
             Response.Write(failStr);
         }
     }
     catch (Exception)
     {
         Response.Write("fail");
     }
 }