Beruflich Dokumente
Kultur Dokumente
SUBJECT:
COMPANY:
NETS OY
COMMENTS :
DATE:
31.05.2013
VERSION:
1.7.08
1
Lumo
CONTENTS
CONTENTS ..........................................................................................................1
1
GENERAL .......................................................................................................4
1.1 CHANGE LOG................................................................................................. 4
1.2 GENERAL INFORMATION ABOUT THE INTERFACE ........................................................ 4
1.2.1
2.2
METHODS................................................................................................... 11
2
Lumo
2.3
2.3.1
2.3.2
2.3.3
2.3.4
2.3.5
2.3.6
2.3.7
2.3.8
2.3.9
2.3.10
2.3.11
2.3.12
2.3.13
2.3.14
2.3.15
2.3.16
2.3.17
2.3.18
2.3.19
2.3.20
OnBypassPINRequest ....................................................................................... 19
OnCheckIdentity ............................................................................................. 19
OnCheckSignature ........................................................................................... 20
OnIsCardPresent ............................................................................................. 20
OnHotCardAction ............................................................................................. 20
OnManualAuthorizationRequest ......................................................................... 20
OnPrintGenericReceipt ..................................................................................... 21
OnPrintTransactionReceipt ................................................................................ 21
OnPrintTransmissionReceipt .............................................................................. 21
OnRefundRequest ............................................................................................ 21
OnStatusUpdateReceived ................................................................................. 22
OnTransactionFinished ..................................................................................... 22
OnTransactionStateChanged ............................................................................. 22
OnVisualIdentificationRequest ........................................................................... 23
OnTerminalStateChanged ................................................................................. 23
OnGenericEvent .............................................................................................. 24
OnMgStripeReaden .......................................................................................... 24
OnBonusInformationReaden ............................................................................. 24
OnGotInput .................................................................................................... 24
OnResponseToAPI ........................................................................................... 25
3
Lumo
2.4
ENUMERATIONS............................................................................................ 25
2.4.1
2.4.2
2.4.3
2.4.4
2.4.5
2.4.6
2.4.7
CardEntryModes .............................................................................................. 25
TerminalDeviceTypes ....................................................................................... 25
TransactionBatchMethods ................................................................................. 26
TransactionTypes ............................................................................................ 26
TransactionState ............................................................................................. 26
TerminalStates ................................................................................................ 28
FailureInfo ...................................................................................................... 28
3.4.1
3.4.2
3.5.1
3.5.2
3.4
3.5
3.6
METHODS................................................................................................... 32
EVENTS ..................................................................................................... 33
EXAMPLE TRANSACTION .................................................................................. 34
USAGE ......................................................................................................... 41
5.1 EXAMPLE: STARTING IN WINDOWS .................................................................... 42
INSTALLATION ............................................................................................ 43
6.1 INSTALLATION ON WINDOWS ........................................................................... 43
4
Lumo
GENERAL
Version
Date
Name
1.06.00_v2
29.01.2013
Aka
1.07.00
13.02.2013
SS
1.07.02
25.02.2013
ET
1.07.03
23.3.2013
SS
1.07.04
15.4.2013
ET
1.07.05
23.4.2013
SS
1.07.06
15.5.2013
SS
1.07.07
22.5.2013
SS
1.07.08
31.5.2013
SS
5
Lumo
Interface consists of the TCP/IP Socket API. Socket interface is listening incoming request that
are XML formatted. Format of the XML is described in this document in chapter 3 as properties,
methods and events.
Interface for payment transaction can be used in two different modes.
a) Dialog made and developed by Nets Oy
Transaction is started with method MakeTransaction
b) Transaction flow is controlled by external program
Transaction is started with method StartTransaction
Option a) is easier way to achieve functionality for payments and it does not require any handling
for the events in the API. However, in this option the EMVLumoAgent shows the dialog, so this
might not be suitable if EMVLumoAgent is installed on a different PC than POS. Option b) requires
that all the events are handled by external program calling API. This means that you should
implement a dialog of your own to control the transaction. Instructions how to handle events are
documented in events chapter 2.3. See MakeTransaction (2.2.10) and StartTransaction (2.2.13)
methods.
You need to save receipts, filing code (archive id) and TransactionReceiverAN (settlement id)
after successful transaction. Filing code identifies transaction and it can be used to follow it. It is
also required for cancellation of the payment. Settlement id tells what type of card has been used
for transaction.
If it is required to get some information for back office systems about transactions or batches
that information may be extracted from the EmvHostOnline service. It is out of this documents
scope to explain that functionality.
There is also support for using EmvCard type of XML interface called "Dopay". Dopay protocol is
described in another document and it is only there for supporting old integrations.
All new implementations should be done using XML-API that offers a lot more options
and flexibility.
1.2.1 Notes on using payment terminals with USB cable
Payment terminals are normally connected to the system with the USB cable. If cable is
disconnected unexpectedly it cannot always be detected by the Lumo system. If it happens
during transaction, the transaction will be interrupted but you cannot know if it was
registered into device. You can use functions to check last transactions to see if it was
registered.
After USB disconnect is may be required to shut down all programs using port or call
CloseConnection() to release port. It may also be required to reboot device again to allow
access to port after disconnect.
Lumo application tries to reconnect terminal after reboot or power loss but there are some
cases caused by virtual USB serial port where virtual USB port is locked by OS and interface
cannot reconnect terminal.
6
Lumo
7
Lumo
LastSeen, date and time this device was last seen by the
system. Presented as formatted string value,
yyyyMMddHHmmss
LastUsed, date and time this device was last used by the
system. Presented as formatted string value,
yyyyMMddHHmmss
Example
<DeviceAddress>000190E63E19</DeviceAddress><DeviceName>PP03100
00077</DeviceName><Authenticated>False</Authenticated><Connected
>False</Connected><Remembered>False</Remembered><LastSeen>201
00527200708</LastSeen><LastUsed>00010101000000</LastUsed>
Example COM9
Example:
<FailureInfo><Code></Code><Description></Description><MerchantInfo
></MerchantInfo><Code>...</MerchantInfo></FailureInfo>
8
Lumo
Type of the terminal device. This may be set and saved outside of
the interface.
This value can be always ML30 even if the terminal is not ML30.
9
Lumo
State of terminal
If false socket is kept open until client closes it. This is the
preferred way to handle connection!
XML Example:
<?xml version=1.0 encoding=utf-8?><EMVLumo
xmlns=http://www.luottokunta.fi/EMVLumo><SetTCPDisconnect><Value>
False</Value></SetTCPDisconnect></EMVLumo>
In this case the merchant receipt will also have a place for
identification
10
Lumo
Message fields
Serial Unique serial number.
Version Software version of payment terminal
Type Terminal model and version
Merchant Merchant ID
POS POS ID
Terminal Terminal ID
Example:
<DeviceInfo>
<Serial>29501109000010591234</Serial>
<Version>v 1.4.952</Version>
<Type>ML30 v 1.4.952</Type>
<Merchant>111111111123</Merchant>
<POS>004</POS>
<Terminal>12C97004</Terminal>
</DeviceInfo>
11
Lumo
Value is stored in database and read from there. Initial value after
installation is false
Returns true
transcations
if
terminal
is
capable
of
handling
quasi
2.2 Methods
2.2.1 int BluetoothGetDevicesInRange (int MaxCountOfDevices, bool
IncludeAuthenticated, bool IncludeRemembered)
cash
12
Lumo
Parameters:
o
Parameters:
Parameters:
o
13
Lumo
Parameters:
o
14
Lumo
Message fields:
DoDisplay actual message
Clear Indicates whether terminals display should be cleared
before showing a message. Tag is allowed only once in DoDisplay
message. Boolean value.
RowText Text in rows. Multiple or zero RowText tags can be in one
DoDisplay message.
Row Row number for text. Integer value.
Inverse Inverse colors in message. Boolean value.
Alignment Allowed values are Left, Center and Right. Alignment
for row text.
Text Text shown in row.
Example:
<DoDisplay>
<Clear>true</Clear>
<RowText>
<Row>0</Row>
<Inverse>True</Inverse>
<Alignment>Left</Alignment>
<Text>Hello</Text>
</RowText>
<RowText>
<Row>0</Row>
<Inverse>False</Inverse>
<Alignment>Right</Alignment>
<Text>World!</Text>
</RowText>
</DoDisplay>
15
Lumo
Parameters:
o
Parameters:
o
Parameters:
transaction
receipts.
Message fields:
ReceiptType 0 if merchant receipt and 1 if customer receipt
ArchiveID Archive identifier
EventDate Receipts timestamp
Text Receipt text
16
Lumo
<ArchiveID>110105004002</ArchiveID>
<EventDate>5.1.2011 13:34:21</EventDate>
<Text>SELITE: OSTO\nKORTTI: VISA
CREDIT\nKYTTTAPA:LUOTTOKORTTI\nAID ID:
A0000000031010\nNUMERO: ............8298\nAVIITE:
110105004002\nTVR: 0000000000 TSI: E800\nYRITYS: 111111111997
KP: 4 TA: 5399\n--------------------------------------\nVELOITUS: 1.00
EUR\n--------------------------------------\nASIAKKAAN TOSITE: 05.01.2011
13:34:19\n</Text>
</Receipt>
</Receipts>
Example receipt:
AS.TUNNUS: 123456789012
NIMI: Test Customer
OSOITE: Teststreet 1
KAUPUNKI: 00100 Testtown
PUH.NRO: 1234567890
POS ID: 007
PANKKI: 010
TOIMIALAKOODI: 5399
OLETUSKIELI: fi
TUETUT KIELET: fisven
AUTOM. LH.AIKA: 16:38
AUTOM. LH. PLL: 0
LAITT. SARJANUMERO: 29501109000010598154
SOPIMUKSET:
LIITTYMTUN.: 100
SOP. NRO: 1111111
VARM. RAJA: 999999
LIITTYMTUN.: 040
SOP. NRO: 111111111997
VARM. RAJA: 999999
LIITTYMTUN.: 110
SOP. NRO: 9425821733
VARM. RAJA: 999999
LIITTYMTUN.: 120
SOP. NRO: 11111111
VARM. RAJA: 999999
17
Lumo
Begins to wait magnetic stripe data. When card has been swiped the
track2 data will be available.
It is possible to get data only for payment or loyalty cards that are
not in PCI scope.
Parameters:
o
2.2.25 bool GetAmountInput(int Line1, int Line2, int Line3, int Nextscreen, int
Timeout)
Parameters:
18
Lumo
CANCEL = 24
CLEAR = 8
ENTER = 13
F1 = 128
F2 = 129
F3 = 139
F4 = 141
Parameters:
o
2.2.27 bool GetNumberInput(int Line1, int Line2, int Line3, int Nextscreen, int
Timeout, bool Active)
Parameters:
o
Parameters:
o
19
Lumo
Cardholder can initiate this by pressing red button on the device and
merchant must accept bypass.
Parameters out:
o
2.3.2 OnCheckIdentity
No parameters.
20
Lumo
2.3.3 OnCheckSignature
2.3.4 OnIsCardPresent
Parameters out:
o
2.3.5 OnHotCardAction
Occurs when card is found on hotcard list with certain code that
requires action from merchant
Handled
via
HotCardActionHandler(int
Instructions, String Question, ref int Result)
Parameters in:
ActionCode,
String
Parameters out:
o
2.3.6 OnManualAuthorizationRequest
Parameters in:
o
Parameters out:
21
Lumo
2.3.7 OnPrintGenericReceipt
Parameters in:
o
2.3.8 OnPrintTransactionReceipt
Parameters in:
o
2.3.9 OnPrintTransmissionReceipt
Parameters in:
o
2.3.10 OnRefundRequest
Parameters out:
o
22
Lumo
2.3.11 OnStatusUpdateReceived
Parameters in:
o
2.3.12 OnTransactionFinished
Parameters in:
o
2.3.13 OnTransactionStateChanged
Parameters in:
o
23
Lumo
0 = Manual input
1 = Magnetic stripe
2 = Chip
2.3.14 OnVisualIdentificationRequest
Parameters in:
o
Parameters out:
o
2.3.15 OnTerminalStateChanged
Occurs when terminal changes its state, e.g. ML-30 does reboot
itself while updating its software. By this event API informs when
terminal is ready to use or when it does reboot.
Parameters in:
o
Parameters out:
o
None
24
Lumo
2.3.16 OnGenericEvent
2.3.17 OnMgStripeReaden
Occurs when track2 data has been read by magnetic stripe reader
with ReadMagStripe function call.
Parameters in:
o
String Track2
-
Parameters out:
o
None
2.3.18 OnBonusInformationReaden
Parameters in:
o
String PAN
Int BonusType
String SettlementInfo
String CustomerSegment
String Validity
2.3.19 OnGotInput
25
Lumo
Parameters in:
o
String Result
2.3.20 OnResponseToAPI
2.4 Enumerations
2.4.1 CardEntryModes
Members:
o
CombinedReader = 0
ManualEntry = 1
2.4.2 TerminalDeviceTypes
Members:
o
SagemML30 = 30
SagemML30COM = 31
SagemiCT250 = 221
SagemiWL250 = 240
SagemiWL250B = 242
SagemiWL250G = 245
SagemiPP350 = 321
26
Lumo
Sagem930 = 930
Sagem930B = 931
2.4.3 TransactionBatchMethods
Members:
o
NONE = 0
SendUnsentTransactions = 1
LockBatches = 2
GetReport = 3
NONE works as always; sends, locks and gets report from server.
GetReport gets all transmission reports from server which hasnt been
received before. (1.7 SP1)
2.4.4 TransactionTypes
Members:
o
Refund_Cancel = 1
CashWithdrawal = 2
Cashback = 3
Bonus = 6
SendTransactions = 8
2.4.5 TransactionState
Members:
o
o
o
o
InsertCard = 0 (0x00)
Chip card should be inserted in terminal OR
Card number should be entered in terminal
SearchingForCancellingTransaction = 1 (0x01)
Terminal is searching transaction to be cancelled
SelectLanguage = 16 (0x10)
Language selection
SelectApplication = 32 (0x20)
Application selection
27
Lumo
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
ReadingCard = 48 (0x30)
Terminal is reading card
EnterPin = 64 (0x40)
Payer is entering PIN
IncorrectPIN = 65 (0x41)
Payer entered incorrect PIN
LastPinTry = 66 (0x42)
Payer has last try for PIN entry
PinLocked = 67 (0x43)
Card PIN has been locked
PinEntryCompleted = 69 (0x45)
Payer has completed PIN entry
Authorizing = 80 (0x50)
Terminal is authorizing
RetryingAuthorization = 81 (0x51)
Retrying authorization for first time
RetryingAuthorization2 = 82 (0x52)
Retrying authorization for second time
CancellingAuthorization = 83 (0x53)
Cancelling authorization
CancellingAuthorization2 = 84 (0x54)
Trying retry cancelling authorization
CancellingAuthorization3 = 85 (0x55)
Trying retry cancelling authorization for second time
Authorized = 96 (0x60)
Authorization call has approved
PrintingReceipts = 112 (0x70)
Receipts are sent from terminal
Completed = 128 (0x80)
Transaction is completed
CompletedCardRemoved = 129 (0x81)
Card is removed from terminal (only in chip
transactions)
SendingBatches = 144 (0x90)
Batches are being sent
SendingBatchesDone = 145 (0x91)
Sending batches is completed
TransactionInterrupted = 240 (0xF0)
Transaction is interrupted
FallbackToMagStripe = 241 (0xF1)
Reading cards chip has failed and payer has to use
mag stripe reader
TransactionAlreadyCancelled = 242 (0xF2)
Refund or cancelling transaction has already been
done
ChecksumMismatch = 243 (0xF3)
Manual authorization codes checksum mismatches.
ReadyToReceiveSum = 245 (0xF5)
API is ready to start transaction with final sum
(PrepareTransaction)
Idle = 254 (0xFE)
Terminal is in idle state
Unknown = 255 (0xFF)
Terminal is in unknown state
28
Lumo
2.4.6 TerminalStates
State of terminal
Members:
o
NotInitialized = 0
TerminalRebooting = 1
TerminalInitialized = 6
TerminalSendingTransactionsDone = 5
TerminalInIdleState = 4
TerminalSendingTransactions = 3
Terminal is rebooting
TerminalReady = 2
ProcessingTransaction = 7
2.4.7 FailureInfo
NOT_SET = -1,
ACCEPTED = 0,
/// <summary>
/// All authorization declines are 100-999
/// </summary>
AUTHORIZATION_DECLINE = 100,
EXPIRED_CARD = 101,
AUTHORIZATION_DECLINE_TAKE_CARD = 200,
AUTHORIZATION_ERROR = 900,
AUTHORIZATION_NO_ONLINE_CONNECTION = 999,
DATA_NOT_READ = 1000,
CARD_REMOVED = 1001,
AGREEMENT_NOT_FOUND = 1002,
INVALID_PAN_LENGTH = 1003,
AUTHORIZATION_CODE_CHECKSUM_MISMATCH = 1004,
KEYING_IN_NOT_ALLOWED = 1005,
PURCHASE_MAX_LIMIT_EXCEEDED = 1006,
PURCHASE_MIN_LIMIT_EXCEEDED = 1007,
CASHWITHDRAWAL_NOT_ALLOWED = 1008,
CREDIT_PURCHASE_NOT_ALLOWED = 1009,
29
Lumo
INVALID_CARD = 1010,
NO_MATCHING_APPLICATIONS_ON_CHIP = 1011,
/// <summary>
/// If transaction is not found for cancellation with filing code and
/// user rejected refund.
/// </summary>
REFUND_FALLBACK_REJECTED = 1080,
/// <summary>
/// If user wants to cancel transaction and it has already been cancelled
/// </summary>
INVALID_CANCELLATION = 1081,
CANCELLATION_NOT_ALLOWED = 1082,
PARTIAL_CANCELLATION_NOT_ALLOWED = 1083,
REFUND_NOT_ALLOWED = 1084,
PARTIAL_REFUND_NOT_ALLOWED = 1085,
BLACKLIST_FAILURE = 1090,
CARD_ON_BLACKLIST_TAKE_CARD = 1091,
CARD_ON_BLACKLIST_CALL_POLICE = 1092,
CARD_ON_BLACKLIST = 1093,
ICC_DECLINE = 1100,
CARD_BLOCKED = 1200,
BLOCKED_APPLICATION = 1201,
AID_OUTDATED = 1800,
BIN_OUTDATED = 1801,
PUBLIC_KEYS_OUTDATED = 1802,
HOTCARD_OUTDATED = 1803,
CONFIG_OUTDATED = 1804,
CONFIG_INVALID_OR_NOT_FOUND = 1805,
SERIAL_NBR_ERROR = 1806,
HOTCARD_NOT_FOUND = 1807,
TRANSLATION_OUTDATED = 1808,
CANCEL_ON_TERMINAL = 1900,
CANCEL_ON_API = 1901,
PIN_BYPASS_NOT_ACCEPTED = 1902,
NO_CONNECTION_TO_DEVICE = 1997,
INCORRECT_SW_ON_TERMINAL = 1998,
UNDEFINED = 1999,
MANUAL_INPUT_WITH_CASH_WITHDRAWAL_NOT_ALLOWED = 3000,
MANUAL_INPUT_WITH_CASHBACK_NOT_ALLOWED = 3010,
NEGATIVE_AMOUNT_NOT_ALLOWED = 3020,
ANOTHER_METHOD_IS_ONGOING = 3030,
OPEN_CONNECTION_FAILED = 3040,
TERMINAL_INITIALIZATION_FAILED = 3050,
PREPARE_ALLOWED_ONLY_WITH_PURCHASE = 3060,
TERMINAL_NOT_READY = 3070,
UNSUPPORTED_CURRENCY_CODE = 3080,
30
Lumo
SECOND_AMOUNT_IS_MISSING = 3090,
COULD_NOT_START_TRANSACTION = 3100,
INVALID_BONUS_TRANSACTION_TYPE = 3110,
INVALID_BONUS_ID = 3120,
SEND_TRANSACTIONS_ERROR = 5000,
LOCKING_BATCHES_ERROR = 5010,
LOCKING_BATCHES_CONNECTION_ERROR = 5011,
GET_REPORT_ERROR = 5020,
GET_REPORT_CONNECTION_ERROR = 5021,
GET_REPORT_NO_NEW_REPORT_AVAILABLE = 5022,
SERVER_ERROR = 9999
31
Lumo
The EMVLumoAgent application included in the Lumo setup monitors incoming TCP/IP traffic.
Upon receiving instructions it activates the card payment and forwards events to the calling
program.
3.1 Communication
Communication is handled with XML messages via TCP connection. Default listening port number
for server is 1234 while this can be configured (see EMVLumoAgent usage).
Connection is started by POS by opening connection to port and ended when Lumo closes
connection. Connection is closed by default when transaction has been finished or single property
has been retrieved or set. This behaviour can be changed by TCPDisconnect variable. The
preferred way of doing communication is setting it false, so that connection is not closed. If
connection is opened and POS has not been sending message for a one minute connection is
closed. Lumo handles connection requests in single threaded mode and answers for requests by
order of connection request.
Before the XML message EMVLumoAgent sends 3 bytes byte-order-marker (BOM).
Single messages in both directions end with null mark (0x00).
3.3 Properties
3.3.1 Set property value
Properties are set by using Set prefix in propertys name and value is given inside Value frame.
Value is given inside property tag. Lumo will not reply for these messages. E.g. setting amount:
POS -> Lumo
<EMVLumo xmlns="http://www.luottokunta.fi/EMVLumo">
<SetAmount><Value>1000</Value></SetAmount></EMVLumo>
3.3.2 Get property value
POS will send message to query property value. Get prefix will be used in propertys name inside
basic xml structure. Lumo will reply queried property value inside Result tag and originally
queried property name. E.g. getting amount:
POS -> Lumo (query for value)
<EMVLumo xmlns="http://www.luottokunta.fi/EMVLumo"><GetAmount /></EMVLumo>
Lumo -> POS (reply)
<?xml version="1.0" encoding="utf-8"?>
<EMVLumo xmlns="http://www.luottokunta.fi/EMVLumo"><GetAmount>
<Result>1000</Result></GetAmount></EMVLumo>
32
Lumo
3.4 Methods
POS will send methods name inside basic xml structure and parameters inside method. Lumo will
reply possible return value inside Result tag. Result value informs if the method was able being
started, not if method was successfully completed. Boolean values are presented in string form of
True or False. Different enumerations are presented as integer values as defined in chapter
2.4.
Lumo blocks new methods and returns result False until ongoing method is completed or
cancelled.
During StartTransaction and MakeTransaction only CancelTransaction method can be called.
During PrepareTransaction StartTransaction, MakeTransaction and CancelTransaction can be
called.
During ReadBonusInformation only CancelReadBonusInformation can be called.
3.4.1 Example: Calling MakeTransaction to make purchase
POS -> Lumo
<EMVLumo xmlns="http://www.luottokunta.fi/EMVLumo">
<MakeTransaction><TransactionType>0</TransactionType></MakeTransaction></EMVLumo>
Lumo -> POS (replying declined transaction)
<?xml version="1.0" encoding="utf-8"?>
<EMVLumo xmlns="http://www.luottokunta.fi/EMVLumo">
<MakeTransaction><Result>False</Result></MakeTransaction></EMVLumo>
3.4.2 Example: Calling BluetoothGetDevicesInRange
POS -> Lumo
<EMVLumo xmlns="http://www.luottokunta.fi/EMVLumo">
<BluetoothGetDevicesInRange>
<MaxCountOfDevices>1</MaxCountOfDevices>
<IncludeAuthenticated>True</IncludeAuthenticated>
<IncludeRemembered>True</IncludeRemembered>
</BluetoothGetDevicesInRange>
</EMVLumo>
Lumo -> POS
<?xml version="1.0" encoding="utf-8"?>
<EMVLumo xmlns="http://www.luottokunta.fi/EMVLumo">
<BluetoothGetDevicesInRange>
<Result>0</Result>
</BluetoothGetDevicesInRange></EMVLumo>
33
Lumo
3.5 Events
When transaction is started by StartTransaction method Lumo will send events to POS. POS
should reply reference parameters in reply message where parameters tagged inside original
event tag.
3.5.1 Example: StatusUpdate
<?xml version="1.0" encoding="utf-8"?>
<EMVLumo xmlns="http://www.luottokunta.fi/EMVLumo">
<StatusUpdate>
<StatusCode>500</StatusCode>
<StatusInfo>CMD MAKE_TRANSACTION: 00-05</StatusInfo>
</StatusUpdate>
</EMVLumo>
3.5.2 Example: OnBypassPINRequest
Lumo -> POS
<?xml version="1.0" encoding="utf-8"?>
<EMVLumo xmlns="http://www.luottokunta.fi/EMVLumo"><BypassPINRequest /></EMVLumo>
POS -> Lumo
<?xml version="1.0" encoding="UTF-8"?>
<EMVLumo xmlns="http://www.luottokunta.fi/EMVLumo">
<BypassPINRequest><BypassAccepted>true</BypassAccepted></BypassPINRequest>
</EMVLumo>
34
Lumo
POS
Lumo
StartTransaction
StartTransaction(True)
StatusUpdate
TransactionStateChanged(InsertCard)
TransactionStateChanged(EnterPIN)
TransactionStateChanged(Authorizing)
StatusUpdate
StatusUpdate
StatusUpdate
StatusUpdate
TransactionStateChanged(Authorized)
StatusUpdate
TransactionStateChanged(Completed)
TransactionFinished
StatusUpdate
StatusUpdate
PrintTransactionReceipt(Merchant)
PrintTransactionReceipt(Customer)
35
Lumo
36
Lumo
<EMVLumo xmlns="http://www.luottokunta.fi/EMVLumo"><StatusUpdate>
<StatusCode>100</StatusCode>
<StatusInfo>CMD HTTP_REQUEST</StatusInfo></StatusUpdate></EMVLumo>
Lumo -> POS (informational data)
<?xml version="1.0" encoding="utf-8"?>
<EMVLumo xmlns="http://www.luottokunta.fi/EMVLumo"><StatusUpdate>
<StatusCode>120</StatusCode>
<StatusInfo>HTTP_REQUEST REPLY RECEIVED</StatusInfo></StatusUpdate></EMVLumo>
Lumo -> POS (informational data)
<?xml version="1.0" encoding="utf-8"?>
<EMVLumo xmlns="http://www.luottokunta.fi/EMVLumo"><StatusUpdate>
<StatusCode>130</StatusCode>
<StatusInfo>HTTP_REQUEST REPLY TO DEVICE DONE</StatusInfo>
</StatusUpdate></EMVLumo>
Lumo -> POS (informational data)
<?xml version="1.0" encoding="utf-8"?>
<EMVLumo xmlns="http://www.luottokunta.fi/EMVLumo"><StatusUpdate>
<StatusCode>500</StatusCode>
<StatusInfo>CMD MAKE_TRANSACTION: 00-05</StatusInfo></StatusUpdate></EMVLumo>
Lumo -> POS (transaction is authorized)
<?xml version="1.0" encoding="utf-8"?>
<EMVLumo xmlns="http://www.luottokunta.fi/EMVLumo"><TransactionStateChanged>
<TransactionType>0</TransactionType><Sum>1004</Sum>
<ArchiveID /><Result>0</Result><InputType>0</InputType><TVR />
<TSI /><State>96</State><TransactionReceiverAN />
<CheckIdentity>False</CheckIdentity></TransactionStateChanged></EMVLumo>
Lumo -> POS (informational data)
<?xml version="1.0" encoding="utf-8"?>
<EMVLumo xmlns="http://www.luottokunta.fi/EMVLumo"><StatusUpdate>
<StatusCode>500</StatusCode>
<StatusInfo>CMD MAKE_TRANSACTION: 00-05</StatusInfo></StatusUpdate></EMVLumo>
Lumo -> POS (transaction is completed)
<?xml version="1.0" encoding="utf-8"?>
<EMVLumo xmlns="http://www.luottokunta.fi/EMVLumo"><TransactionStateChanged>
<TransactionType>0</TransactionType><Sum>1004</Sum>
<ArchiveID>100706001001</ArchiveID><Result>0</Result><InputType>2</InputType>
<TVR>0000008000</TVR><TSI>F800</TSI><State>128</State>
<TransactionReceiverAN>L5</TransactionReceiverAN><CheckIdentity>False</CheckIdentity>
</TransactionStateChanged></EMVLumo>
Lumo -> POS (transaction is accepted)
37
Lumo
38
Lumo
VARM: XXX P
TC: XXX
-------------------------------------VELOITUS: 10.04 EUR
-------------------------------------ASIAKKAAN TOSITE: 06.07.2010 09:32:47
</ReceiptData></PrintTransactionReceipt></EMVLumo>
Connection is closed by Lumo
39
Lumo
running
This also
LumoAPI.dll must also be added to Global Assembly Cache (GAC) by running gacutil /i
LumoAPI.dll. Gacutil is a tool provided by Microsoft for adding libraries into GAC.
LumoAPI must be initialized before usage. This is done with Initialize-method. Parameters
are Hostname, Port and SocketAutoConnect. Hostname is the address where Lumo is
installed (use 127.0.0.1 if its the same computer). Port is which Lumos XML-interface is
set to listen (Lumo listens 1234 as default).
LumoAPIs socket connection handling to Lumo can be used in two ways. This is defined with
SocketAutoConnect-parameter. Setting it to False, POS has to call LumoAPIs Connectmethod before calling any other methods or properties, and Disconnect after LumoAPI is no
longer used. This adds more complexity and responsibility about connection handling to
POS, but this way no unnecessary connection openings or closings can happen during usage
of Lumo, so there is no delay caused by this.
When SocketAutoConnect-parameter is set to True, LumoAPI handles all connections
internally, so that POS does not have to call Connect and Disconnect. This way LumoAPI is
easier to use and POS has less responsibility about connection handling, but this might
result unnecessary connection opening and closing between sequential calls, which may
cause unwanted delays. Timeout after connection is closed can be adjusted with
DisconnectTimeout-property.
40
Lumo
End If
Else
MsgBox ("Initialize failed!")
End If
End Sub
' Example how to handle events from Lumo.
Private Sub lumo_OnStatusUpdateReceived(ByVal StatusCode As Long, ByVal StatusInfo As
String)
MsgBox ("Status update received: " & StatusCode & " " & StatusInfo)
End Sub
41
Lumo
USAGE
It is required that LumoAgent application is always running when using the interface.
EMVLumoAgent accepts the following command line parameters:
-NOGUI
o
-TRAY
o
-COMPORT:<com port>
o
e.
g.
EMVLumoAgent
COMPORT:AUTO
COMPORT:COM6
or
EMVLumoAgent
-COMTYPE:
o
Start EMVLumoAgent with defined terminal type. This parameter has no effect unless
you specify COM port also
o
-TCP
o
-TCPPORT:
o
This parameter has no effect unless you specify API Type also
o
-TCPTIMEOUT:
o
-HTTPPROXY
o
-DATAPATH:
o
-CURRPATH:
o
-NOTEST
42
Lumo
43
Lumo
INSTALLATION
44
Lumo
This chapter contains dialogs examples that Lumo APIs MakeTransaction call shows for merchant
on transaction. API contains language support, e.g. Swedish, English. In these examples Finnish
language is used.
45
Lumo
46
Lumo
47
Lumo
48
Lumo
49
Lumo
50
Lumo
51
Lumo
Multiapp card?
OnTransactionStateChanged
(State=SelectApplication)
Supported language?
OnTransactionStateChanged
(State=SelectLanguage)
OnTransactionStateChanged
(State=ReadingCard)
OnTransactionStateChanged
(State=EnterPin)
Bypass PIN?
OnBypassPINRequest
OnTransactionStateChanged
(State=Authorizing/
RetryingAuthorizing/
RetryingAuthorizing2)
OnTransactionStateChanged
(State=CancellingAuthorization/
CancellingAuthorization2/
CancellingAuthorization3)
Online
OnTransactionStateChanged
(State=Authorized)
OnTransactionFinished
(Result=Accepted)
OnTransactionFinished
(Result=Declined)
OnPrintTransactionReceipt
(ReceiptType=Merchant)
OnPrintTransactionReceipt
(ReceiptType=Customer)
Authorizing result
52
Lumo
Multiapp card?
OnTransactionStateChanged
(State=SelectApplication)
Is Card on hotlist ?
OnHotCardAction
Terminal decision
OnTransactionStateChanged
(State=Authorizing/
RetryingAuthorizing/
RetryingAuthorizing2)
Online
Authorizing result
OnTransactionStateChanged
(State=CancellingAuthorization/
CancellingAuthorization2/
CancellingAuthorization3)
Cancelled authorization ?
OnTransactionStateChanged
(State=Authorized)
OnManualAuthorization
Is bankcard payment and
over 50 euros ?
OnTransactionFinished
(Result=Declined)
OnCheckIdentity
OnTransactionFinished
(Result=Accepted)
OnPrintTransactionReceipt
(ReceiptType=Merchant)
OnPrintTransactionReceipt
(ReceiptType=Customer)
53
Lumo
MakeTransaction ends
54
Lumo
INDEX
ENGLISH
FINNISH
SWEDISH
1
2
3
4
5
6
7
8
9
16
17
18
19
32
33
34
35
36
37
38
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
AMOUNT
ENTER NEW TOTAL
TOTAL
AMOUNT AGAIN
ENTER
ADD
INPUT
CALL YOUR BANK
BALANCE
TIP
GRATUITY
SERVICE
DONATION
WAITER ID
WAITER LOGON
TABLE NUMBER
BILL NUMBER
LOCATION REF
TAB NUMBER
OPERATOR ID
PAN
CARD NUMBER
EXPIRY DATE
START DATE
AS MMYY
ISSUE NUMBER
CVV/CVC
SPLIT BY
NO. OF PARTIES
TO PAY
AUTH CODE
CASHBACK
DUE
MAXIMUM
MINIMUM
MULTIPLES OF
FORMAT
DATE
INCORRECT
ID INCORRECT
NO. INCORRECT
BILL NOT FOUND
CASH
CARD
CHEQUE
VOUCHER
PAYMENT
REFUND
SUMMA
UUSI LOPPUSUMMA
LOPPUSUMMA
SUMMA UUDELLEEN
SYT
LIS
NPPILE
SOITA PANKKIIN
SALDO
JUOMARAHA
JUOMARAHA
PALVELU
LAHJOITUS
TARJOILIJATUNNUS
KIRJAA TARJOILIJ
PYDN NUMERO
LASKUN NUMERO
SIJAINTI
JLKIVELOITUS NR
KYTTJTUNNUS
MAKSUSOVELLUS
KORTIN NUMERO
VOIMASSAOLOAIKA
KYTTNOTTO
MUODOSSA KKVV
LIIKKEELLELASKU
CVV/CVC
JAA
OSAPUOLTEN LKM
MAKSETTAVAA
VARMENNUSTUNNUS
RAHAA TAKAISIN
SAATAVA
ENINTN
VHINTN
JAOLL. LUVULLLA
MUOTO
PIVYS
VRIN
TUNNUS VRIN
NUMERO VRIN
LASKUA EI LYDY
KTEINEN
KORTTI
SHEKKI
LOUNASSETELI
MAKSU
HYVITYS
BELOPP
NY SLUTSUMMAN
SLUTSUMMA
BELOPP IGEN
ANGE
TILLSTTA
MATA IN
KONTAKTA BANKEN
SALDO
DRICKS
DRICKS
SERVICE
GVA
SERVITR ID
REGISTR SERVITR
BORD NUMMER
BERKNING NR
STLLNING
EFTERDEBIT NR
ANVNDARE ID
BETALN APPLIKAT
KORTETS NUMMER
GILTIGHET
IBRUKTAGANDE
FORMAT MM
EMITTERINGS NR
CVV/CVC
DIVIDERA
ANTAL PARTY
BETALBAR
AUKTORISER. KOD
KONTANT TILLBAKS
FORDRING
HGST
MINST
DELBAR MED
FORMAT
DATUM
FEL
FEL IDENTIFIER.
FEL NUMMER
HITTAR EJ FAKTUR
KONTANT
KORT
CHECK
LUNCHSEDEL
BETALNING
TERBETALNING
55
Lumo
10.1
56
Lumo
57
Lumo
58
Lumo
0000000000
TSI: E800
59
Lumo
TVR:
0000000000
TSI: E800
10.2
Transaction started with PrepareTransaction call with
ReadBonusInformation parameter set to true
Benefit of calling PrepareTransaction is that EMV handling can be started before transactions
final amount is known. This will save few seconds in transaction process.
There are few things to be concern:
If bonus information is read from first card and card have been removed API is
waiting for card insert or call to cancel transaction.
Final sum should be set after ReadyToReceiveSum state change and transaction
should be started with StartTransaction call.
10.2.1 Example: bonus information is read from chipcard and payment is given with
another chipcard
1. (PrepareTransaction is called with ReadBonusInformation set)
POS -> Lumo: <?xml version="1.0" encoding="utf-8"?><EMVLumo
xmlns="http://www.luottokunta.fi/EMVLumo"><SetTransactionType><Value>0</Value></S
etTransactionType></EMVLumo>
60
Lumo
61
Lumo
(Card is inserted)
62
Lumo
>0</TransactionType><Sum>0</Sum><ArchiveID
/><Result>0</Result><InputType>0</InputType><TVR /><TSI
/><State>48</State><TransactionReceiverAN
/><CheckIdentity>False</CheckIdentity></TransactionStateChanged></EMVLumo>
Lumo -> POS: <?xml version="1.0" encoding="utf-8"?><EMVLumo
xmlns="http://www.luottokunta.fi/EMVLumo"><StatusUpdate><StatusCode>500</StatusCo
de><StatusInfo>CMD MAKE_TRANSACTION: 0005</StatusInfo></StatusUpdate></EMVLumo>
2.5.
63
Lumo
64
Lumo
0000000000
TSI: E800
65
Lumo
0000000000
TSI: E800
66
Lumo
10.2.2 Example: bonus information is read from same chipcard as transaction is payed
1. (POS starts PrepareTransaction)
POS -> Lumo: <?xml version="1.0" encoding="utf-8"?><EMVLumo
xmlns="http://www.luottokunta.fi/EMVLumo"><SetTransactionType><Value>0</Value></S
etTransactionType></EMVLumo>
POS -> Lumo: <?xml version="1.0" encoding="utf-8"?><EMVLumo
xmlns="http://www.luottokunta.fi/EMVLumo"><SetArchiveID><Value
/></SetArchiveID></EMVLumo>
POS -> Lumo: <?xml version="1.0" encoding="utf-8"?><EMVLumo
xmlns="http://www.luottokunta.fi/EMVLumo"><SetCardEntryMode><Value>0</Value></Set
CardEntryMode></EMVLumo>
POS -> Lumo: <?xml version="1.0" encoding="utf-8"?><EMVLumo
xmlns="http://www.luottokunta.fi/EMVLumo"><PrepareTransaction><ReadBonusInformation
>True</ReadBonusInformation></PrepareTransaction></EMVLumo>
Lumo -> POS: <?xml version="1.0" encoding="utf-8"?><EMVLumo
xmlns="http://www.luottokunta.fi/EMVLumo"><PrepareTransaction><Result>True</Result>
</PrepareTransaction></EMVLumo>
Lumo -> POS: <?xml version="1.0" encoding="utf-8"?><EMVLumo
xmlns="http://www.luottokunta.fi/EMVLumo"><StatusUpdate><StatusCode>500</StatusCo
de><StatusInfo>CMD MAKE_TRANSACTION: 0005</StatusInfo></StatusUpdate></EMVLumo>
Lumo -> POS: <?xml version="1.0" encoding="utf-8"?><EMVLumo
xmlns="http://www.luottokunta.fi/EMVLumo"><TransactionStateChanged><TransactionType
>0</TransactionType><Sum>100</Sum><ArchiveID
/><Result>0</Result><InputType>0</InputType><TVR /><TSI
/><State>0</State><TransactionReceiverAN
/><CheckIdentity>False</CheckIdentity></TransactionStateChanged></EMVLumo>
2. (Payer insert card)
Lumo -> POS: <?xml version="1.0" encoding="utf-8"?><EMVLumo
xmlns="http://www.luottokunta.fi/EMVLumo"><BonusInformationReaden><PAN>600407
1111</PAN><BonusType>2</BonusType><SettlementInfo>B3</SettlementInfo><Custome
rSegment /><Validity /></BonusInformationReaden></EMVLumo>
Lumo -> POS: <?xml version="1.0" encoding="utf-8"?><EMVLumo
xmlns="http://www.luottokunta.fi/EMVLumo"><StatusUpdate><StatusCode>3300</StatusC
ode><StatusInfo>CMD READ_BONUS_INFORMATION PAN (600407......1111) BonusType (2)
SettlementInfo (B3) Cancel (-1) CustomerSegment () Validity () ManualInput
(48)</StatusInfo></StatusUpdate></EMVLumo>
Lumo -> POS: <?xml version="1.0" encoding="utf-8"?><EMVLumo
xmlns="http://www.luottokunta.fi/EMVLumo"><StatusUpdate><StatusCode>500</StatusCo
de><StatusInfo>CMD MAKE_TRANSACTION: 0005</StatusInfo></StatusUpdate></EMVLumo>
67
Lumo
68
Lumo
69
Lumo
70
Lumo
End of doc.