Exemplo n.º 1
0
 /// <summary>
 /// 新增代扣记录
 /// </summary>
 public static void InsertAutoPay(AutoPay auto)
 {
     using (var command = Factory.CreateCommand())
     {
         var request = string.Format("订单号:{0},代扣账号:{1},代扣方式:{2}",
                                     auto.OrderId, auto.PayAccountNo, auto.PayType.GetDescription());
         var response          = string.Empty;
         var autoPayRepository = Factory.CreateAutoPayRepository(command);
         try
         {
             autoPayRepository.Insert(auto);
             response = "处理成功";
         }
         catch (Exception ex)
         {
             LogService.SaveExceptionLog(ex, "添加代扣记录: " + request);
             response = "处理失败 " + ex.Message;
         }
         var tradementLog = new Log.Domain.TradementLog
         {
             OrderId  = auto.OrderId,
             Request  = request,
             Response = response,
             Time     = DateTime.Now,
             Remark   = "添加代扣记录",
         };
         LogService.SaveTradementLog(tradementLog);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// 创建请求处理器
        /// </summary>
        public static RequestProcessor CreateProcessor(RequestContext context)
        {
            RequestProcessor processor = null;

            if (context.Service == "PNRImportWithoutPat")
            {
                processor = new PNRImportWithoutPat();
            }
            else if (context.Service == "PNRImport")
            {
                processor = new PNRImport();
            }
            else if (context.Service == "ProduceOrder")
            {
                processor = new ProduceOrder();
            }
            else if (context.Service == "ProduceOrder2")
            {
                processor = new ProduceOrder2();
            }
            else if (context.Service == "ApplyRefund")
            {
                processor = new ApplyRefund();
            }
            else if (context.Service == "ApplyPostpone")
            {
                processor = new ApplyPostpone();
            }
            else if (context.Service == "OrderPay")
            {
                processor = new PayOrder();
            }
            else if (context.Service == "PayOrderByPayType")
            {
                processor = new PayOrderByPayType();
            }
            else if (context.Service == "PayApplyform")
            {
                processor = new PayApplyform();
            }
            else if (context.Service == "PayApplyformByPayType")
            {
                processor = new PayApplyformByPayType();
            }
            else if (context.Service == "QueryOrder")
            {
                processor = new QueryOrder();
            }
            else if (context.Service == "QueryApplyform")
            {
                processor = new QueryApplyform();
            }
            else if (context.Service == "QueryFlights")
            {
                processor = new QueryFlights();
            }
            else if (context.Service == "QueryFlightStop")
            {
                processor = new QueryFlightStop();
            }
            else if (context.Service == "QueryFlight")
            {
                processor = new QueryFlight();
            }
            else if (context.Service == "AutoPay")
            {
                processor = new AutoPay();
            }
            else if (context.Service == "ManualPay")
            {
                processor = new ManualPay();
            }
            if (processor != null)
            {
                processor.Context = context;
            }
            return(processor);
        }