예제 #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;
 }