示例#1
0
 private void PaymentByCard()
 {
     PerformAction(async() =>
     {
         try
         {
             var tenderSummary = new TenderSummary();
             if (!string.IsNullOrEmpty(_swipedCardNumber))
             {
                 tenderSummary = await _checkoutBusinessLogic.
                                 PaymentByCard(_tenderCode, Amount, _transactionType,
                                               Helper.EncodeToBase64(_swipedCardNumber), _poNumber);
             }
             else if (_cardSwipeInformation != null)
             {
                 tenderSummary = await _checkoutBusinessLogic.
                                 PaymentByCard(_tenderCode, Amount, _transactionType,
                                               Helper.EncodeToBase64(CardNumber), _poNumber);
                 _cardSwipeInformation = null;
             }
             else
             {
                 tenderSummary = await _checkoutBusinessLogic.UpdateTender(_tenderCode, null, _transactionType);
             }
             _swipedCardNumber = string.Empty;
             NavigateToTender();
             MessengerInstance.Send(tenderSummary, "UpdateTenderSummary");
         }
         finally
         {
             _timer.Stop();
             Log.Info(string.Format("Time taken in saving profile prompt and payment by card call is {0}ms ",
                                    _timer.ElapsedMilliseconds));
         }
     });
 }
示例#2
0
 public CheckoutSummary()
 {
     SaleSummary   = new SaleSummary();
     TenderSummary = new TenderSummary();
 }