You are on page 1of 3

IQ – R-Keeper interface description

Targets:
1. Write off the points from visitors' accounts in IQ-management when making a transaction in R-
Keeper.
2. Calculation of the discount to the visitor for services depending on the status of the visitor in IQ-
management.

Tasks:
1. Receiving visitor data from IQ-Management (status, points, photo, id).
2. Checking on the Micros side the sufficient number of points from IQ-Management for writing off
3. Write off the points in the IQ system
4. Calculating on the R-Keeper side the discount depending on the status of the visitor.

Implementation:
DB API was implemented in the IQ-Management system:

• Function 1: Gives Status, Points, Photo and ID of visitor from the IQ-Management based on the
RFID card code.
• Function 2: Write off the points of visitor in IQ-Management based on the visitor's ID.

Interface diagram:
Operating procedure:
DB API Description:

IQ-Management uses DBMS Oracle.


R-Keeper use DBMS MS SQL.
MS SQL can make DB-link to Oracle.

Connection for testing:

• Host: 138.201.22.197
• Port: 1521
• SID: XE
• User: bonus_user
• Pass: v8436!NST

Description of procedures and functions:

1. The procedure for identifying the player and requesting the number of points

PROCEDURE get_client (
in_card_id IN VARCHAR, -- ID from RFID player's card
out_client_n OUT NUMBER, -- Player's ID
out_card_num OUT VARCHAR, -- Player's number of card
out_sirname OUT VARCHAR, --Player's lastname
out_name OUT VARCHAR, --Player's name
out_secname OUT VARCHAR, --Player's middlename
out_bonus OUT NUMBER, -- Amount of points
out_status OUT NUMBER, -- Player's status
out_discount OUT NUMBER, -- Player's discount
out_photo OUT BLOB -- Player's photo
);

2. Procedure for writing off Points

PROCEDURE set_bonus_operation (
in_client_n IN NUMBER, -- Player's ID
in_amount IN NUMBER, -- Amount for write off (with minus)
in_dsc IN VARCHAR DEFAULT NULL, --Description of operation
in_bonus_typ IN NUMBER DEFAULT 8763, -- Type of operation
in_discount IN NUMBER DEFAULT NULL, -- Discount of operation
in_work_place IN VARCHAR DEFAULT NULL, -- Workplace ID
int_result OUT NUMBER, -- Result transaction
out_transaction_id OUT ROWID -- Transaction id
);

Player’s cards encoding rules:

• Format: PXXXXXXXXX, P - Text prefix, X - Digit 0 - 9.


• The record is stored in sector 1, block 0.
• The record is stored between 0 and 10 bytes in ASCII-code.
• This sector must be protected against reading and recording by the key А: DB 23 1D 67 16 9A

You might also like