Beispiel #1
0
 private void EnableCardPaymentMode()
 {
     this._cardDeviceResponse               = (CardDeviceResponse)null;
     this.cardPaymentPanel.Visible          = true;
     this.messageLabel.Text                 = "Payment by credit or debit card";
     this.pinpadLabel.Text                  = "Initialising payment, please wait...";
     this.loadingCircle1.Active             = true;
     ((Control)this.loadingCircle1).Visible = true;
     this.cancelCardButton.Visible          = true;
 }
Beispiel #2
0
 private void StartCardPayment()
 {
     try
     {
         this.EnableCardPaymentMode();
         this.ResetCoinMechanism();
         this.RestartCloseFormTimer();
         if (Devices.CardDevice == null)
         {
             Devices.CardDevice = new CardDevice();
         }
         this._cardDevice        = Devices.CardDevice;
         this._cardDevice.Cancel = false;
         this.ShowInsertCardMessage();
         this._cardDevice.WaitInsertCard();
         Console.WriteLine("After Card Insert");
         if (!this._cardDevice.Cancel)
         {
             this.ShowFollowInstructionsMessage_DeactivateLoadingCircle();
             this._cardDeviceResponse = this._cardDevice.WaitForPayment(this._parkingPermitInfo.Amount);
         }
         Console.WriteLine("After Card Transaction");
         if (!this._cardDevice.CardIsRemoved)
         {
             this.ShowRemoveCardMessage();
             this._cardDevice.WaitRemoveCard();
         }
         Console.WriteLine("After Card Removal");
         if (this._cardDeviceResponse != null)
         {
             this.RespondToCardDeviceActivity();
         }
         else
         {
             this.HandleFailedCardTransaction();
         }
         Console.WriteLine("Card Payment End");
     }
     catch (Exception ex)
     {
         if (this._cardDevice.Cancel)
         {
             return;
         }
         Log.Write(ex);
         this.OpenCreditCardErrorForm();
     }
 }
Beispiel #3
0
 public frmThankYou(
     ParkingPermitInfo parkingPermit,
     string displayOption,
     bool updateSuccessful,
     CardDeviceResponse response)
 {
     Utilites.WriteToLog("frmThankYou entered");
     this.m_receiptID = "A" + DateTime.Now.ToString("MMHH") + Environment.GetEnvironmentVariable("RSSITECODE") + DateTime.Now.ToString("ddmmyy");
     if (string.IsNullOrEmpty(this.ThankYouCode))
     {
         this.ThankYouCode = Settings.Default.ThankYouCode;
     }
     this.InitializeComponent();
     this.Region = Region.FromHrgn(frmThankYou.CreateRoundRectRgn(0, 0, this.Width - 10, this.Height - 10, 20, 20));
     this.m_ParkingPermit.copy(parkingPermit);
     this.m_DisplayOption = displayOption;
     this.m_PaidInFull    = updateSuccessful;
     if (this.ThankYouCode == null)
     {
         this.ThankYouCode = "NONE";
     }
     this.m_responseFile = response;
     Utilites.WriteToLog("frmThankYou exited");
 }