Ejemplo n.º 1
0
        public COMConcertLibrary.ConcertErrMsg Ticket(uint timeout, out COMConcertLibrary.SerialPortReceive result)
        {
            Log.Info("Printing ticket...");
            var paymentMode = COMConcertLibrary.PAYMENT_MODE_EFT_HANDLING;
            var paymentType = COMConcertLibrary.PAYMENT_TYPE_SALE;

            var dataToSend = new COMConcertLibrary.SerialPortSend(1, 0, true,
                                                                  paymentMode, paymentType, 826 /*GBP*/, "TICKET", false, true);

            result = new COMConcertLibrary.SerialPortReceive();

            return(COMConcertLibrary.ConcertTransaction_(ref dataToSend, ref result, timeout));
        }
Ejemplo n.º 2
0
        public COMConcertLibrary.ConcertErrMsg Reverse(string transactionNumber, uint timeout, out COMConcertLibrary.SerialPortReceive result)
        {
            Log.Info($"Executing reverse");

            var paymentMode = COMConcertLibrary.PAYMENT_MODE_EFT_HANDLING;

            var dataToSend = new COMConcertLibrary.SerialPortSend(1, 0, true,
                                                                  paymentMode, 0, 826 /*GBP*/, $"REV{transactionNumber}", false, true);

            result = new COMConcertLibrary.SerialPortReceive();

            return(COMConcertLibrary.ConcertTransaction_(ref dataToSend, ref result, timeout));
        }
Ejemplo n.º 3
0
        public COMConcertLibrary.ConcertErrMsg Refund(int amount, uint timeout, bool forceOnline, out COMConcertLibrary.SerialPortReceive result)
        {
            Log.Info($"Executing refund - Amount: {amount}");

            var paymentMode = COMConcertLibrary.PAYMENT_MODE_EFT_HANDLING;
            var paymentType = COMConcertLibrary.PAYMENT_TYPE_REFUND;

            var dataToSend = new COMConcertLibrary.SerialPortSend(1, amount, true,
                                                                  paymentMode, paymentType, 826 /*GBP*/, null, false, true);

            result = new COMConcertLibrary.SerialPortReceive();

            return(COMConcertLibrary.ConcertTransaction_(ref dataToSend, ref result, timeout));
        }
Ejemplo n.º 4
0
        public COMConcertLibrary.ConcertErrMsg EndOfDayReport(uint timeout, out COMConcertLibrary.SerialPortReceive result)
        {
            Log.Info("Printing end of day report...");

            var paymentMode = COMConcertLibrary.PAYMENT_MODE_EFT_HANDLING;
            var paymentType = COMConcertLibrary.PAYMENT_TYPE_SALE;

            var dataToSend = new COMConcertLibrary.SerialPortSend(1, 0, true,
                                                                  paymentMode, paymentType, 826 /*GBP*/, "EOD", false, true);

            result = new COMConcertLibrary.SerialPortReceive();

            var transactionResult = COMConcertLibrary.ConcertTransaction_(ref dataToSend, ref result, timeout);

            if (transactionResult != COMConcertLibrary.ConcertErrMsg.None)
            {
                return(transactionResult);
            }

            dataToSend = new COMConcertLibrary.SerialPortSend(1, 0, true,
                                                              paymentMode, paymentType, 826 /*GBP*/, "REPORT", false, true);

            return(COMConcertLibrary.ConcertTransaction_(ref dataToSend, ref result, timeout));
        }