예제 #1
0
        public void Process(HttpRequest request, HttpResponse response)
        {
            Logger.WriteLog(LogType.INFO, request.Url.ToString());
            string orderid  = request.QueryString["orderId"];
            string outPayNo = request.QueryString["payNo"];
            string remark   = request.QueryString["remark"];
            string payway   = request.QueryString["payWay"];
            var    model    = businessmanRepository.FindAll(x => x.Code == remark).FirstOrDefault();

            if (model == null)
            {
                return;
            }
            var buyModel = model.BuyDetails.Where(p => p.PayNo == orderid).FirstOrDefault();

            if (buyModel != null && string.IsNullOrEmpty(buyModel.OutPayNo))
            {
                model.SMSNotify(orderid, outPayNo, ExtHelper.GetPayMethod(payway));
                unitOfWorkRepository.PersistUpdateOf(model);
                unitOfWork.Commit();
            }
            response.WriteLine("success");

            if (string.Equals(remark, "BankOrPlatform", StringComparison.OrdinalIgnoreCase))
            {
            }
        }
예제 #2
0
        public void Process(HttpRequest request, HttpResponse response)
        {
            Logger.WriteLog(LogType.INFO, request.Url.ToString());
            string orderid     = request.QueryString["orderId"];
            string outPayNo    = request.QueryString["payNo"];
            string remark      = request.QueryString["remark"];
            string price       = request.QueryString["price"];    //交易金额
            string currentTime = request.QueryString["currentTime"];
            string isRefund    = request.QueryString["isRefund"]; //退款标志(0=支付1=退款)
            string signature   = request.QueryString["signature"];
            string payway      = request.QueryString["payWay"];   //支付方式
            int    saleorderid = orderid.Substring(2).ToInt();

            if (isRefund == "1")
            {
                int refundId = remark.ToInt();

                /*
                 * orderid:退款单ID
                 * remark:退票单ID
                 * price:金额
                 */
                if (SaleOrderRefund(refundId, price, orderid))
                {
                    response.WriteLine("success");
                }
                return;
            }
            var model = afterSaleOrderRepository.FindAll(p => p.Id == saleorderid).FirstOrDefault();

            if (model == null)
            {
                Logger.WriteLog(LogType.INFO, string.Format("改签支付售后订单ID:{0}不存在", saleorderid));
                return;
            }
            ChangeOrder changeOrder = null;

            if (model is ChangeOrder)
            {
                changeOrder = model as ChangeOrder;
            }
            if (changeOrder == null)
            {
                Logger.WriteLog(LogType.INFO, string.Format("售后订单ID:{0}不是改签类型", saleorderid));
                return;
            }
            if (changeOrder.ProcessStatus != EnumTfgProcessStatus.ProcessingWaitPay)
            {
                return;
            }
            changeOrder.OutPayNo      = outPayNo;
            changeOrder.PayTime       = DateTime.Now;
            changeOrder.PayStatus     = EnumChangePayStatus.Payed;
            changeOrder.ProcessStatus = EnumTfgProcessStatus.WaitIssue;
            changeOrder.PayWay        = ExtHelper.GetPayMethod(payway);
            changeOrder.WriteLog(new OrderLog
            {
                IsShowLog         = true,
                OperationContent  = "订单改签支付完成,等待出票",
                OperationDatetime = DateTime.Now,
                OperationPerson   = "系统"
            });
            unitOfWorkRepository.PersistUpdateOf(changeOrder);
            unitOfWork.Commit();
            response.WriteLine("success");
        }