Card data format string

The card reader delivers card data to Glink unformatted. Glink splits the data into an array of fields and uses the Card data format string to select and format one or more fields. This means that just a part of the magnetic card may be delivered to a host application. An empty Card data format string means deliver all the card data unformatted.

{n} is used as syntax to select field n. A format string like

  {0}{1}{2}
 
will select the first three fields.

Financial card data will be split into eight fields:

Field Length Type
{0} 19 PAN
{1} 26 NAME
{2} 2 YY
{3} 2 MM
{4} 3 Service code
{5} 8 Discretionary data
{6} 19 PAN (track 2)
{7} 15 Additional track 2

The format string {0}{1}{2} will select the PAN,NAME and YY fields and present them as a combined string.

A TAB character (\t) may be added to separate the fields:

  {0}\t{1}\t{2}
The fields may also be separated with spaces or text:
   {0} expire: 20{2}/{3}
will present the PAN field together with the expire date fields:
   1234567890123456789 expire: 2019/07

See also: Magnetic Stripe Card