Exemplo n.º 1
0
        /// <summary>
        /// Read Credit card data
        /// </summary>
        /// <param name="trackDebug"></param>
        /// <returns></returns>
        protected CreditCardTrackData ReadCreditCardTrackData(out string trackDebug)
        {
            string error  = "";
            string tracks = SerialPortService.ReadExisting(Settings.ComPort, Settings.ComBaudRate, Settings.ComReadTimeout, ref error);

            if (!String.IsNullOrEmpty(tracks))
            {
                trackDebug = "Track1:" + tracks;
                var trackData = ParseSwipeData(tracks);
                if (trackData != null)
                {
                    return(trackData);
                }
            }
            trackDebug = "Track1:" + error;

            return(null);
        }