The Personal Discount System — hereinafter PDS — is aimed to maintain a base of personal payment and discount cards, and manage the work with different elements of the loyalty system, such as discounts, bonuses, savings, etc.
Details of PDS installation and configuration are described in the Installing and Configuring PDS article.
Before reading this article, please follow the instructions from Installing and Configuring PDS and start PDS as independent software.
Card Server Settings
The CARDSERV version should be 5.08 — version 14 protocol — or later. If the Farcards card repeater is used, its version should be at least 3.02
Standard installation and configuration of the card server is described in the Installing and Configuring PDS article.
After CARDSERV standard installation and configuration, to connect the system to r_keeper 7, do the following:
- Copy the following files from the \bin\For cardserv directory of the distribution kit of the corresponding r_keeper 7 version — a zip archive from the standalone folder at FTP — to the working directory of the card server:
- netk.ini — file located in the \bin\For cardsserv\ini\ directory
cardsserv.ini — a prepared file located in the \bin\For cardsserv\ini\ directory. This file is adapted exclusively for the connection of the card server with r_keeper. If there is no connection with r_keeper 7, then use this file.
If there is no corresponding archive in the standalone\ folder of the r_keeper 7 version, but there is a cash desk installer RK7_Cash_Setup_7.5.X.exe, the set of libraries must be taken from the directory specified during installation, and be sure to click the "Add" button after choosing the path to save the pds_netk.dll.
- Edit CARDSERV.INI — the configuration file of the card server:
Add the pds_netk.dll link library to the [LinkDLL] section for interaction with r_keeper 7:
[LinkDLL] ... 3 = pds_netkCODE
Add the [pds_netk] section with the parameters of the pds_netk.dll library:
[pds_netk] NetServerName=PDS_CARDSERVER_1 ;; card server network name, the same name must be specified in the PDS interface properties on the cash server, find the details below ERRORLOG=pds_netk.stk ;; log file name ININAME=netk.ini ;; name of a separate configuration file with protocol and netkern settings, optional parameter PROTOCOLS=netkprot\*.dll ;; netkern protocol library search mask, used if ININAME parameter is not specified Timeout=120000 ;; timeout in milliseconds, the maximum allowed time for the server to execute a request; before pds_netk version 5, the default value was 10000 ;; starting from version 10 (22.214.171.124) the parameter value is ignored, there is no timeout on the server; only the timeout is checked, which is configurable ;; in the properties of the PDS driver/interface for the cash server DebugMessages=0 ;; if set to 1, logs basic information on all queriesCODE
- Start the card server as an application — the using /desktop key — and check the status of the loaded link libraries on the Protocols tab.
Remember that the RTCP protocol is required for the interaction between the card server and the card editor.
An example of loaded link libraries on the card server version 7.22.02:
PCards Card Editor Settings
Standard installation and configuration of the card editor are described in Installing and Configuring PDS.
The card editor — PCards.exe — and the r_keeper 7 cash server midserv.exe use configuration files with the same name — RKEEPER.INI, so they should be installed in different directories. If you need to install applications in one directory, you should use a different configuration file for the cash server and force the name of this file to be specified on the command line when you start the cash server.
After PCards standard installation and configuration, to connect the system to r_keeper 7, do the following:
- From the \bin\For cardserv directory of the distribution kit of the corresponding r_keeper 7 version, copy the following files to the working directory of the card editor:
- netk.ini — an optional file, located in \bin\For cardserv\ini\ directory
- rkeeper.ini — a prepared file located in \bin\For cardsserv\ini\ directory
This file is adapted exclusively for the connection of the card editor with r_keeper 7. If there is no connection with r_keeper 6, use this file.
Pcget.dll is an interface library for Pcards.exe, used to authorize users and receive data on discounts and bonuses from the r_keeper 7 system. To obtain information on discounts and bonuses, specify the network name of the reference server in the [PCGET] section.
- Edit RKEEPER.INI — the configuration file of the card editor
Add the [PCGET] section with the parameters of the Pcget.dll library:
[PCGET] Server = RK7_REF_SRV - the name of the RK7 reference server Client = PCARDS_CLIENT1 - the unique client name ShowMarkups = 0 – to load(1) or not(0) markups to the list of discounts LastLoginName= - the name of the last user who logged into the card editor, is filled in automaticallyCODE
Add the [NETKERN] section for network settings — see Supported Protocols and Network Configuration for more details.
[NETKERN] PROTOCOLS= tcpsoc.dllCODE
Add the [TCPDNS] section with parameters specifying the location of the r_keeper 7 system reference server:
[TCPDNS] RK7_REF_SRV = AAA.BBB.CCC.DDD:1234 - where AAA.BBB.CCC.DDD is the IP address of the machine on which the reference server is running, and 1234 is the port of the reference server.CODE
Launch the card editor. If the database is new, then use the following login details: user = ucs, password = ucs.
The rights in the card editor are editable for the role, so you need to give all rights to the Administrator group. To do this, go to the File > Users reference, select a role and allow all operations.
Next, you need to check the availability of discounts and bonuses in the client data editing mode. Read more about how to add a client and a card in the user manual.
Settings in r_keeper 7
Manager Station Settings
- Launch the manager station, open the Settings > Parameters menu and go to the Installation > Link with other systems > Personal cards > PDS Server name section
In the properties of the PDS server name parameter, in the Basic section, specify the name of the card server in the String line. This name should match the value of the NetServerName parameter from CARDSERV.INI, but is not an optional condition.
Setting the PDS server name parameter is not relevant when using several PDS interfaces on one cash server. The priority of this server name is lower than that of the name specified in the interface properties on the cash server, as in the figure below.
In the Service > Stations and Devices menu, select the required cash server, and add the PDS Interface on the Drivers tab
In the interface properties, specify the name of the card server — the PDS Server name parameter, the value of which should correspond to the value of the NetServerName parameter from the card server configuration file — CARDSERV.INI
If necessary, fill in or configure other interface parameters:
Currency Rate Class Code = 1 — PDS currency rate class code. 1 — national currency class
Tax Code = 1 — tax code
Call Timeout = 120 — timeout for accessing the PDS server in seconds.
Maximal Discount Value=0 = Discount limit spent totally — interpretation of the discount limit zero value returned by the card server
Discount limit spent totally — the default value. No limits — to ignore the discount limit.
Defaulter Type Code as = Defaulter type code — interpretation of the defaulter code:
Defaulter type code — use this parameter as the defaulter type code, it is the default value. Currency subaccount base — the addition to the subaccount number, i.e. for different numbers — codes — will be added to the subaccount number for different cards.
In the Service > Interfaces menu, select the PDS logical interface and check the established correspondences for cash servers and PDS interfaces, then restart the cash server.
Properties of the PDS logical interface:
- In the Service > Device Signals Processing > MCR Algorithms and edit the following properties of the PDS MCR algorithm:
- Scope — select Interface
Object — select the preinstalled PDS logical interface
The MCR algorithm parameter is a string containing the card code in decimal form. If the reader transmits the code in hexadecimal form, it should be converted to a decimal using the inttostr and strtoint functions, f.ex.:
- It is allowed to use employee cards as PDS cards. In this case, there should be two MCR algorithms:
- One with the Interface scope
- Other with the Employee scope
In the MCR order editor, the Employee algorithm will be ignored if the temporary registration form is not entered.
For more information about MCR algorithms, see the Setup of MCR Algorithms article.
PDS Cards Payments and Replenishment at r_keeper 7 Cash Desk
To be able to pay and replenish PDS cards at the r_keeper 7 cash desk, do the following:
- Launch the manager station, open the Options > Parameters menu and go to the section Station parameters > Order editing > Calc/Pay order
- Select the Pay by payment card parameter and select Ask for the Value property
In the Money > Currencies menu, select the currency for the PDS and specify the PDS logical interface in the Interface property, also set 0 value for the Transaction Code property
The Interface section is only available for dealers
Currency properties for the PDS
The Interface Required parameter is absent in r_keeper version 126.96.36.1990 and late
In the Money > Discounts and Markups menu, create an amount markup that will be used when replenishing the card. Set 0 value for the Transaction Code property
The Interface section is only available for dealers
In the Money > Reasons of deposit/collect money menu, create a new reason and fill in the following properties:
Card Deposit Reason — Fiscal
Cash in Reason — Yes
Markup — select the markup created in the previous step.
- In order for the paid amounts not to be shown in the fiscal register as a deposit, specify a different printer or select Do not print in the Main Printer Class property of the Card Deposit printing scheme
- To print the Card Balance and Withdrawal of money from client card layouts, make copies of these layouts, then set the TRAINING flag in the properties
Read the card at the cash station in the order editing mode. A window with information on the card and its owner should appear.
If the client has a photo in the card editor, but it is not displayed at the cash desk, it is necessary to enable the PDS Show card image parameter in Options > Parameters > [All] > [Installation] > [Link with other systems] > [Personal cards] in the manager station.
Debugging Interaction of r_keeper 7 Cash Server via PDS Protocol
In some cases, it may be necessary to debug — by means of extended logging — the interaction of the r_keeper 7 cash server MIDSERV via the PDS protocol — Farcards, Cardserv.
Initial Conditions for Using Debugging:
- The pds_netk.dll version should be at least 188.8.131.52. The current version of the library can be taken from any current binary distribution kit of r_keeper 7 in the \bin\For cardsserv directory
- When updating pds_netk.dll, it is recommended to also update a set of related libraries: errors32.dll, Netkern.dll, etc. — see the full list above
- Libraries should be updated in all working directories where they are used: RK7, Cardserv, Farcards, etc.
To enable debugging, you need to:
Add the DebugMessages=1 parameter in the [pds_netk] section of the FARCARDS.INI and/or CARDSERV.INI configuration file:
[pds_netk] ... DebugMessages=1 ...CODE
Add the DebugMessages=34 parameter in the [Config] section of the RKEEPER.INI cash server configuration file:
[config] ... DebugMessages=34 ...CODE
Restart all applications: cash server, Farcards, Cardserv, etc.
Extended logging will be recorded in the pds_netk.stk file.
If necessary, send the debug results, f.ex. to the support service. In addition to the pds_netk.stk file, you will also need the logs of the cash station — cash.stk, cash server — midsrv.stk, Farcards — Farcards.LOG and/or Cardserv — Cardserv.log.