2.9      Smart Cards Format

2.9.1      Master Card

Name: wCompanyCode

Bytes: 2

Description:

The code which represents the company who owns this block. The company code in the member card .and staff card created by the quota of this master card will be the same as this code.

 

Name: wIdentifier

Bytes: 2

Description:

The code which indicates this block contains master card information.

 

Name: dwMasterID

Bytes: 4

Description:

The card ID of the first member card, which will be formatted by the quota obtained from master card.

The range with in dwMasterID and dwMasterID + byCardX100*100 is globally unit unique (unique across different company.)

Limit: 0-4,294,967,295

 

Name: dwNextMemberID

Bytes: 4

Description:

The card ID of the next member card, which will be formatted by the quota obtained from master card. It will be increased whenever any quota is obtained from the master card. Actual quota left in the card is calculated by

(byCardX100 * 100 - (dwNextMemberID - dwMasterID))

Limit: 0-4,294,967,295

 

Name: byCardX100

Bytes: 1

Description:

The card formatting quota of this master card. The actual quota is one hundred times the value in this field. This field is not changed by the Terminal.

Limit: 0-255. I.e. A Master can initialize at most 25,500 cards.

 

Name: abyMaxCardValue

Bytes: 3

Description:

It limits the maximum member card prepaid amount that can be operated or reloaded in the terminal reading this master card.

The most significant bit of this field tells the Terminal whether or not to regard the actual prepaid amount is 1/100 as much as that stored in the field. If the bit is set to 0, the value in the field of prepaid amount is regarded as 100 as much as the actual value, so that it can store the value in the precision of two decimal places. If the bit is set to 1, the actual value of prepaid mount is regarded as equal to the integral representation of the field. In some countries whose currency does not have decimal place, system integrator can consider not to use decimal places in the card in order to have a larger maximum prepaid value.

Limit:

When MSb is set to 0: 0-83886.07

When MSb is set to 1: 0-8388607

 

 

Name: abyDESKey

Bytes: 8

Description:

A 64 bit encryption key for encrypting the data stored in member card using DES3 encryption algorithm.

 

Name: abyKeyA

Bytes: 6

Description:

Key A for accessing the Member cards using Mifare Classic card

 

Name: abyKeyB

Bytes: 8

Description:

Key B for accessing the Member cards using Mifare Classic card

 

2.9.2      Member Card

Block for storing the basic information which is the same among Ultralight Mifare card and classic card:

Name: wCompanyCode

Bytes: 2

Description:

The code which represents the company who owns this block. The company code in the member card .and staff card created by the quota of this master card will be the same as this code.

 

Name: wExpiryDay

Bytes: 2

Description:

The date when the card expire. Its format is Year (7bit) Month (4 bit) Day (5bit)

This field has three formats to operate in the four modes of operation of expiry day.

1. No Expiry Day:

Format: The whole field set to zero.

2. Relative Month Fixed Month

Format: The Day field is set to zero

3. Expiry date extended from last visit.

   Format: Year, month and day is set to the exact date of expiry.

 

Name: dwMemberID

Bytes: 4

Description:

The unique member ID of the card. This value is assigned during card initialization. The member ID is globally unique among all cards issued in all different companies.

Limit: 0-4,294,967,295

 

Name: dwAccSpending

Bytes: 4

Description:

The accumulated spending. The most significant bit of this field tells the Terminal whether or not to regard the actual prepaid amount is 1/100 as much as that stored in the field. If the bit is set to 0, the value in the field of prepaid amount is regarded as 100 as much as the actual value, so that it can store the value in the precision of two decimal places. If the bit is set to 1, the actual value of prepaid mount is regarded as equal to the integral representation of the field. In some countries whose currency does not have decimal place, system integrator can consider not to use decimal places in the card in order to have a larger maximum prepaid value.

Limit:

When MSb is set to 0: 0-21,474,836.47

When MSb is set to 1: 0-2,147,483,647

 

Name: wMemberInfo

Bytes: 2

Description:

 

Purpose of flag MSB B[15-12] of wMemberInfo:

 

B[15] for storing if the memberInfo is already transmitted to iBonus Terminal

B[15] is set when, MemberInfo data is newly saved of modified and not yet read by iBonus Terminal. When the memberInfo is read by iBonus Terminal B[15] is unset.

 

B[14] is for storing whether the user's information is valid

It determines whether the language preference and the user's information are valid.

 

B[13-12] are for storing the language preference on iBonus display unit.

When B[13]=0 and B[12]=0 iBonus default language is preferred

When B[13]=1 and B[12]=0 iBonus alternate language 1 is preferred

When B[13]=0 and B[12]=1 iBonus alternate language 2 is preferred

When B[13]=1 and B[12]=1 iBonus alternate language 3 is preferred

 

 

The space left [11-0] in the member's card can let you add.

3 questions with 9-16 choices

or 4 questions with 5-8 choices

or 6 questions with 3-4 choices

or 12 questions with 2 choices

 

B[0] is the LSb of wMemberInfo

 

- The answers for the questions are stored from the LSB of wMemberInfo.

 

- For each question, at most 16 choices, which occupy 4 bits in wMemberInfo, are allowed.

- For each question, at least 2 choices, which occupy 1 bit in wMemberInfo, are allowed.

- If there are n choices in a question, ceiling (log2 (n)) bit are occupied.

- If the answer for a question with choice (1.. n) is x, x-1 is stored in the corresponding bitwise position.

- 0s are padded if the bit is not occupied by any questions.

 

 

Example:

The question setting in an iBonus is

 

Question 1: 3 choices (say choice 1,2,3)

Question 2: 16 choices (say choice 1,2,3,...16)

Question 3: 2 choices (say choice 1,2)

Question 4: 8 choices (say choice 1,2,3,...8)

 

The answer for question 1 occupies 2 bits, that is B[0-1]

The answer for question 2 occupies 4 bits, that is B[2-5]

The answer for question 3 occupies 1 bits, that is B[6]

The answer for question 4 occupies 3 bits, that is B[7-9]

B[10-11] are not used in this case, and are padded with 0s.

 

If the answer of the question of the questions is as follows:

 

Question 1: choice 2

Question 2: choice 11

Question 3: choice 1

Question 4: choice 8

 

The following will be stored. (commas are used to separate the answer

for individual question)

 

01,2345,6,789,01

01,0101,0,111,00

 

Name: abyItemBonus

Bytes: 3

Description:

The bonus point of the redemption item chosen in iBonus Display.

Limit: 0-8388607

 

Name: abyDOB

Bytes: 3

Description:

Date of birth of the member.

Byte 0: day

Byte 1: month

Byte 2: year counting from 1900

 

Name: abyBalBonus

Bytes: 3

Description:

The bonus points left in this card.

Limit: 0-16,777,215

 

Name: abyBalPrepaid

Bytes: 3

Description:

The monetary value stored in this card. The most significant bit of this field tells the Terminal whether or not to regard the actual prepaid amount is 100th as much as that stored in the field. If the bit is set to 0, the value in the field of prepaid amount is regarded as 100 as much as the actual value, so that it can store the value in the precision of two decimal places. If the bit is set to 1, the actual value of prepaid mount is regarded as equal to the integral representation of the field. In some countries whose currency does not have decimal place, system integrator can consider not to use decimal places in the card in order to have a larger maximum prepaid value.

Limit:

When MSb is set to 0: 0-83886.07

When MSb is set to 1: 0-8388607

 

Name: abyItemDes

Bytes: 11

Description:

The name of the redemption item/ product.

abyItemDes[0] is a special character used for storing the quantity and identifying whether it is a redemption item or product.

Bit 7(MSb) abyItemDes[0] indicates that it is a product when it is set.

Bit 6 of abyItemDes[0] indicates that it is a redemption item when it is set.

Bit 6 and 7 of abyItemDes[0] is mutually exclusive.

Bit 0-4 of abyItemDes[0] stores the quantity.

abyItemDes[1..11] stores the item description.

Limit: 10 characters for description, maximum quantity: 31

 

Name: abyMemberName

Bytes: 10

Description:

Member’s name.

It can be stored as 10 ASCII characters or 16 digits.

It is normally used for storing characters. When entering member’s name in the Terminal, it can store up to 16 digits. The format becomes:

abyMemberName[0]=0x0

abyMemberName[1]=0x1

abyMemberName[2-9] is 64 bit integer.

Limit: 10 Characters or 16 digits stored in 64 bit integer.

 

Extended block for storing the information of the redemption item or product chosen in iBonus Display which facilitates multiple redemption.

Name: wCompanyCode

Bytes: 2

Description:

The code which represents the company who owns this block. The company code in the member card .and staff card created by the quota of this master card will be the same as this code.

 

Name: wIdentifier

Bytes: 2

Description:

The code which indicates this block contains Member card extended information.

 

Name: abyItemBonus (This field appears 3 times in this block)

Bytes: 3

Description:

The bonus point of the redemption item chosen in iBonus Display.

Limit: 0-8388607

 

Name: abyItemDes (This field appears 3 times in this block)

Bytes: 11

Description:

The name of the redemption item/ product.

abyItemDes[0] is a special character used for storing the quantity and identifying whether it is a redemption item or product.

Bit 7(MSb) abyItemDes[0] indicates that it is a product when it is set.

Bit 6 of abyItemDes[0] indicates that it is a redemption item when it is set.

Bit 6 and 7 of abyItemDes[0] is mutually exclusive.

Bit 0-4 of abyItemDes[0] stores the quantity.

abyItemDes[1..7] stores the item description.

Limit: 7 characters for description, maximum quantity: 31

 

2.9.3      Staff Card

Name: wCompanyCode

Bytes: 2

Description:

The code which represents the company who owns this block.

 

Name: wIdentifier

Bytes: 2

Description:

The code for telling that this block is storing the staff card data.

 

Name: dwStaffID

Bytes: 4

Description:

The unique staff ID. This value is assigned during card initialization. The member ID is globally unique among all cards issued in all different companies.

 

Name: abyBranchCode

Bytes: 5

Description:

The code which storing the code of the branch, in which the iBonus Terminal can be operated by this staff card.

Limit: 1-9999

 

Name: abyMaxTransaction

Bytes: 3

Description:

The maximum number of transaction where this staff can handle. The most significant bit of this field tells the Terminal whether or not to regard the actual prepaid amount is 100th as much as that stored in the field. If the bit is set to 0, the value in the field of prepaid amount is regarded as 100 as much as the actual value, so that it can store the value in the precision of two decimal places. If the bit is set to 1, the actual value of prepaid mount is regarded as equal to the integral representation of the field. In some countries whose currency does not have decimal place, system integrator can consider not to use decimal places in the card in order to have a larger the maximum prepaid value.

Limit:

When MSb is set to 0: 0-83886.07

When MSb is set to 1: 0-8388607