Guest Account Card Type Properties

A card data when scanned or swiped contains the card ID and optionally characters that must be filtered out. In the Guest Card type wizard, the layout is used to filter out or strip these characters from the Card ID. Regular expressions are then used to match a card ID against a list of defined guest card types in the Banks (associated with the Release station).

The following table explains each of the fields on the Guest Card type wizard.

Field Description

Sample Card ID

Sample Card ID is the full card ID (raw card ID output) from a card reader.

To set up Sample Card ID, connect a USB card reader to your computer. Open a Text Editor, e.g. Notepad and scan or swipe your Sample Card. Copy the generated card ID to the Sample Card ID field.

Layout

A Sample Card ID may contain a long sequence of characters, for example a card ID may contain 16 digits and a bunch of special characters. Layout defines the pattern used to extract the required user ID (usually printed at the front of the card) from the Sample Card ID.

The following symbols are used to define the Guest Card type layout:

  • i - Represents the required user ID that will be extracted from the Sample Card Id
  • u - Represents unused characters - meaning the section of the Sample Card ID that will be stripped

Examples:

  • The layout uiiiiu would extract the user ID 1234 from the Sample Card ID ; 1234?.
  • The layout uuuuuuuuuuiiiiiiiu would extract the user ID 9991082 from the Sample card ID ;1234567899991082?

Regular Expression

Regular expression is the pattern used to match a card ID against a Guest Card type. For example, you have a card format that looks like this ;1234567899991082?

You can declare the regular expression as:

^;[0-9]{16}\?$

The regular expression will match any card ID that follows this pattern - a card ID that begins with a semicolon, followed by 16 digits, and ends with a question mark.

For more information about regular expressions, please refer to the "Regular Expressions format" section. You can also read regular expression tutorials from the Internet.

Resulting Card ID

The result after stripping unused characters from the Sample Card ID.

Example:

The following gives you an example of how to configure a Guest Card type given a card format. Let's say you have a Guest Card that when scanned reads:

;8964028454563816=2307?

In the Sample Card ID field, enter the full card ID;8964028454563816=2307?

Layout extracts the required User ID from the Sample Card ID. Let us assume that the required user ID is the underlined digits (5456381).

;8964028454563816=2307?

In most cases, only a few digits are card ID printed at the front of the card. This card ID is also the card ID that the Guest user will enter in the popup client whenever the Guest user prints. Hence, we are going to define the characters preceding the underlined digits and the characters after the underlined digits as unused (denoted by letter u).

and the 7 digits as user ID(denoted by letter i) . The layout will be:

uuuuuuuuuiiiiiiiuuuuuuu

Take note that the number of characters in the Sample Card ID and the Layout field should match. You will also notice that the Resulting Card ID shows the significant characters from the Layout field.

Regular Expression

Using the Sample Card ID format;8964028454563816=2307? , you can define the regular expression as:

^;[0-9]{16}\=[0-9]{4}\?$

The following table describes the regular expression above.

Regular Expression Description
^; The symbol ^ means to start at the beginning of the string. In the example, the Sample Card ID string starts with a semicolon.
[0-9]{16}

The expression [0-9] means any digits between 0 and 9.

The expression [0-9] {16} means 16 digits between 0 and 9.

\= The equal sign has a special meaning in regular expressions, therefore this character needs to be escaped, hence we have \=.
[0-9]{4} This expression means 4 digits between 0 and 9
\?$ The dollar ($) means to look at the end of the string. The backslash (\ ) represents escape sequence, which is used for special characters in regular expressions. The question mark has a special meaning in regular expressions; therefore this needs to be escaped using the backslash.