Пример #1
0
        static void Main(string[] args)
        {
            IDeviceProtocol fp = (IDeviceProtocol) new cZekaProtocol();

            fp.Init("COM1");
            fp.StartReceipt(UcsFiscalReceiptTypeEnum.ucsFscRetFiscal, "1", "Operator", "0");
            fp.AddPLU("Product 1", 1.23, 5, 2);
            fp.AddPayment(UcsFiscalPaymentTypeEnum.ucsFscPmtCash, "Cash", 5);
            fp.EndReceipt();
        }
Пример #2
0
 /// <summary>
 /// Disposes of the wrapped transport.
 /// </summary>
 /// <param name="disposing">Whether to dispose managed resources.</param>
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (this.protocol != null)
         {
             this.protocol.Dispose();
             this.protocol = null;
         }
     }
 }
Пример #3
0
            /// <summary>
            /// Open connection between PC and the PaymentDevice.
            /// </summary>
            /// <param name="config">Case insensitive configuration parameters.</param>
            /// <returns>A task that can be awaited until the connection is opened.</returns>
            public Task OpenAsync(IDictionary <string, string> config)
            {
                this.languageCode = config.GetValueOrDefault(LanguageKey, string.Empty);
                this.protocol     = new VerifoneDeviceProtocol(config);

                this.protocol.CardSwipeEvent   += (sender, args) => this.CardSwipeEvent(sender, args);
                this.protocol.PinDataEvent     += (sender, args) => this.PinDataEvent(sender, args);
                this.protocol.SignatureEvent   += (sender, args) => this.SignatureEvent(sender, args);
                this.protocol.EnterKeypadEvent += this.HandleEnterKeyPadEvent;
                this.protocol.ButtonPressEvent += this.HandleButtonPressEvent;

                return(this.protocol.OpenAsync());
            }
Пример #4
0
 public ManualRekeyApplication(UdpProtocol udpProtocol, bool motVariant)
 {
     DeviceProtocol = new DataLinkIndependentProtocol(udpProtocol, motVariant);
     WithPreamble   = true;
     Mfid           = motVariant ? (byte)0x90 : (byte)0x00;
 }
Пример #5
0
 public ManualRekeyApplication(AdapterProtocol adapterProtocol)
 {
     DeviceProtocol = new ThreeWireProtocol(adapterProtocol);
     WithPreamble   = false;
     Mfid           = 0x00;
 }