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();
 }
        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);
        }
 public static void Process(CreditCardProcessingData ccpd)
 {
     GetDefaultProcessor().Process(ccpd);
 }
Esempio n. 4
0
 private void OnMakeCreditCardPaymentExecute(string obj)
 {
     if (CreditCardProcessingService.CanProcessCreditCards)
     {
         var ccpd = new CreditCardProcessingData
         {
             TenderedAmount = AppServices.MainDataContext.SelectedTicket.GetRemainingAmount(),
             Ticket = AppServices.MainDataContext.SelectedTicket
         };
         CreditCardProcessingService.Process(ccpd);
         return;
     }
     TicketViewModel.PaySelectedTicket(PaymentType.CreditCard);
     CloseTicket();
 }
Esempio n. 5
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);
 }
 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();
 }
Esempio n. 7
0
 public static void Process(CreditCardProcessingData ccpd)
 {
     GetDefaultProcessor().Process(ccpd);
 }