public Task Handle(PayCompleted message, IMessageHandlerContext context) { _logger.Info($"PayCompleted message recived, reservation id: {message.ReservationId}"); Data.IsPaid = true; return(ProcessOrder(context)); }
/// <summary> /// 显示支付成功界面 /// </summary> /// <returns></returns> public static bool?ShowPay() { PayCompleted pay = new PayCompleted(); pay.Owner = Application.Current.MainWindow; pay.ShowDialog(); return(pay.IsOK); }
public Task Handle(PayInvoice message, IMessageHandlerContext context) { _logger.Info($"(PayInvoice command recived, invoive id: {message.InvoiceId}"); var @event = new PayCompleted(); @event.ReservationId = message.ReservationId; @event.ApartmentsId = message.ApartmentsId; @event.InvoiceId = message.InvoiceId; _logger.Info($"(PayCompleted event sending, invoive id: {message.InvoiceId}, reservation id: {message.ReservationId}"); return(context.Publish(@event)); }
/// <summary> /// 显示支付成功界面 /// </summary> public static bool?ShowPayWindow() { bool?result = false; try { Application.Current.Dispatcher.Invoke(new Action(() => { var pay = new PayCompleted { Owner = Application.Current.MainWindow }; pay.ShowDialog(); result = pay.IsOK; })); } catch (Exception exx) { Logger.WriteLog(LogType.ERROR, exx.Message, exx); } return(result); }