コード例 #1
0
 public void Process(CreditCardProcessingData creditCardProcessingData)
 {
     InteractionService.UserIntraction.BlurMainWindow();
     SelectedTicket            = creditCardProcessingData.Ticket;
     _viewModel.CanPreAuth     = !PreauthDataCache.ContainsKey(SelectedTicket.Id);
     _viewModel.TenderedAmount = creditCardProcessingData.TenderedAmount;
     _viewModel.Gratuity       = (creditCardProcessingData.TenderedAmount * Settings.GratuityRate) / 100;
     _viewModel.AuthCode       = "";
     _view = new ExternalProcessorView(_viewModel);
     _view.ShowDialog();
 }
コード例 #2
0
 public void Process(CreditCardProcessingData creditCardProcessingData)
 {
     InteractionService.UserIntraction.BlurMainWindow();
     SelectedTicket            = creditCardProcessingData.Ticket;
     _viewModel.CanPreAuth     = true;
     _viewModel.TenderedAmount = creditCardProcessingData.TenderedAmount;
     _viewModel.Gratuity       = (creditCardProcessingData.TenderedAmount * Settings.GratuityRate) / 100;
     _view = new FdProcessorView(_viewModel);
     _view.FdTransactionType.SelectedIndex = 0;
     _viewModel.AuthCode = "";
     _view.ShowDialog();
 }
コード例 #3
0
        public void Process(CreditCardProcessingData creditCardProcessingData)
        {
            // get operator response
            var userEntry = InteractionService.UserIntraction.GetStringFromUser(Name, _settings.DisplayMessage);

            // publish processing result
            var result = new CreditCardProcessingResult()
            {
                Amount      = creditCardProcessingData.TenderedAmount,
                ProcessType = userEntry.Length > 0 ? ProcessType.Force : ProcessType.Cancel
            };

            result.PublishEvent(EventTopicNames.PaymentProcessed);
        }
コード例 #4
0
 private void SubmitPayment(PaymentType paymentType)
 {
     if (paymentType == PaymentType.CreditCard && CreditCardProcessingService.CanProcessCreditCards)
     {
         if (SelectedTicket.Id == 0)
         {
             var result = AppServices.MainDataContext.CloseTicket();
             AppServices.MainDataContext.OpenTicket(result.TicketId);
         }
         var ccpd = new CreditCardProcessingData
         {
             TenderedAmount = GetTenderedValue(),
             Ticket         = AppServices.MainDataContext.SelectedTicket
         };
         CreditCardProcessingService.Process(ccpd);
         return;
     }
     ProcessPayment(paymentType);
 }