コード例 #1
0
        /// <summary>
        /// <para>Reads the smartcard identity, and returns it to the javascript application.</para>
        /// <para>This is a public method, called by the smartcard processing in the CloudPOS javascript application.</para>
        /// </summary>
        /// <returns>The Smartcard ID</returns>
        public string readCardIdentity() // no args
        {
            var cardIdentity = SmartCardApi.ReadCardIdentity();

            // Debug.Print("cardIdentity = " + cardIdentity);
            return(cardIdentity);
        }
コード例 #2
0
        /// <summary>
        /// <para>Checks to see whether a smartcard is currently being presented in front of the SmartCard reader.</para>
        /// <para>This is a public method, called by the smartcard processing in the CloudPOS javascript application.</para>
        /// </summary>
        /// <returns><c>true</c> if a card is present, or <c>false</c> if not.</returns>
        public bool isCardPresent() // no args
        {
            var cardPresent = SmartCardApi.IsCardPresent();

            // Debug.Print("cardPresent = " + cardPresent);
            return(cardPresent);
        }
コード例 #3
0
        /// <summary>
        /// <para>Performs a sequence of smartcard commands to unlock, read, and write sectors on the card.</para>
        /// <para>This is a public method, called by the smartcard processing in the CloudPOS javascript application.</para>
        /// </summary>
        /// <param name="cardActions">A sequence of smartcard commands</param>
        /// <returns>A sequence of results for each of the actions in <paramref name="cardActions"/></returns>
        public string executeCardActions(string cardActions)
        {
            // Debug.Print("cardActions = " + cardActions);
            var results = SmartCardApi.ProcessCardActions(cardActions);

            // Debug.Print("    results = " + results);
            return(results);
        }
コード例 #4
0
        /// <summary>
        /// <para>Returns the version number of the Smartcard API.</para>
        /// <para>This is a public method, which may bee called by the smartcard processing in the CloudPOS javascript application.</para>/
        /// </summary>
        /// <returns>Version number</returns>
        public int getSmartcardPluginVersionNo() // no args
        {
            var version = SmartCardApi.GetSmartcardPluginVersionNo();

            return(version);
        }