CardGateV6-TM 001
CardGateV6-TM 001
CardGateV6-TM 001
CardGate®
Payment Gateway V6
Technical Manual
20 September 2013
Issue 1
Reference : DOC-CardGateV6-TM
Copyright© 1999-2005, 2011-13 UMD IP Pty Ltd ACN 087 361 644
1.1 Overview 5
1.7 Trademarks 6
1.9 Abbreviations 6
2. CONFIGURING CARDGATE 7
3. INTERAPPLICATION COMMUNICATIONS 17
6. USER INTERFACE 54
7. SUPPORT 54
8. REVISION HISTORY 55
1.1 Overview
CardGate® is a payment gateway that operates exclusively with the Commonwealth Bank of
Australia's COMMLINK on-line credit card authorisation and transaction system which allows
merchants to conduct credit card transactions in real-time.
CardGate® is a PC based system that interfaces to the Commonwealth Banks’ COMMLINK
host.
CardGate® simply interfaces with a Merchant's computer or interactive voice response (IVR)
system.
Custom interfaces to CardGate® can be built to suit a Merchant's exacting requirements.
CardGate® takes the certification load, ie the Merchant system does not need to be
evaluated by the Commonwealth Bank prior to taking live transactions.
1.7 Trademarks
Argent® is a registered trademark of Telstra.
CardGate® is a registered trademark of UMD IP Pty Ltd.
COMMLINK is a trademark of the Commonwealth Bank of Australia.
Microsoft® is a registered trademark of Microsoft Corporation, and Windows is trademark of
Microsoft Corporation in the United States of America and other countries.
Other brand and product names are trademark or registered trademark of their respective
holders.
1.9 Abbreviations
ABP – Asynchronous Block Protocol
ATA – Argent Terminal Adapter
CBA - Commonwealth Bank of Australia
CCV – Card Check Value
CLNP – Connectionless Network Protocol
CSC – Card Security Code
CVV – Card Validation Value
DEnn - AS2805 Data Element number nn
ENG - Enterprise Network Gateway, ie CBA's branch network, now depricated
MTA – Managed Terminal Adapter
PCI DSS – Payment Card Industry Data Security Standard
ROT - Record Of Transaction
TNS – Transaction Network Services
TPDU - Transport Protocol Data Unit
2.1.1 Strings
Registry string values may contain the following 'escape' characters:
\\ single back slash (\)
\r carriage return ie 0Dh
\n line feed ie 0Ah
\t tab ie 09h
\nnn octal value nnn
\xhh hexadecimal value hh
Communications
Value name Type Limits default
Dial0 String max length 40 ""
Telephone number used to access the Bank host.
Warning Bulletin
Value name Type Limits Default
Warning Bulletin string max length 40 ""
Directory
This is where CardGate reads in the Warning Bulletin file. NOTE – must end directory names
with “\”.
Note that this directory should be dedicated to only holding the warning bulletin file as whenever
any file is written to this directory, the Warning Bulletin file is reloaded.
Logging
Value name Type Limits default
Online Log DWORD 0 .. 1
0 means to not log sockets communications.
1 means to log sockets communications as time stamped data to the
"ONLINE_YYYYMMDD.TXT" file.
2 means to log sockets communications as time stamped data to "COMMS_YYYYMMDD.TXT"
file (V3.2)
This should normally be disabled (ie set to 0) in production as you will not be PCI DSS
COMPLIANT with logging enabled.
Host emulation
Value name Type Limits default
Test Mode DWORD 0 .. 0
0 means normal operation,
1 means simulate host response,
2 indicates to connect in usual way with host using modem, but simulate host response.
FOR EXAMPLE:
# Name changed
311000062120500 82120507 76749 111021 My business
311000062120500 82120508 44366 001021 My business
Note that if the Warning Bulletin Directory is set in the registry, CardGate will monitor it for any
directory changes. As soon as a new file is written to this directory, CardGate will reload the
warning bulletin file to memory. For this reason, the warning bulletin directory should only
contain one file, the warning bulletin file. This allows, for example, daily updates to the
warning bulletin list without restarting CardGate.
// seek a connection
ok = connect(sh,sa)
if ok == 0 do
{ SeqNr = SeqNr + 1; // Bump SeqNr
// get request for credit card transaction
GetRequest(&request);
send(sh, request); // send to host
StartTimer;
ok = recv(sh,response); // receive from host
if (ok > 0)
{ // we have a response - act on it
ActOnResponse(&RxSeqNr);
StopTimer(RxSeqNr);
// acknowledge receipt of response to CardGate
send(sh, 'C'+ RxSeqNr);
}
else
if (timeout)
{ // timed out - ask CardGate to reverse
// original transaction
send(sh, 'V' + SeqNr);
// Let the requesting process know we had a problem
ErrorReport(SeqNr);
}
} while(not finished);
closesocket(sh);
4.3.1 Source ID
When there are multiple Merchant Applications (ie clients) communicating with CardGate, the
"source id" field is used to identify which client generated the request. This field is not used by
CardGate for any other purpose other than providing traceability and therefore each client
instance should be given a unique source id.
This field is always returned with the response unchanged.
4.3.4 Merchant ID
The Message ID (Card Acceptor Identification Code) is used by the host to determine which
merchant the transaction is for.
CCI Card Check Indicator AN 5 Value ‘CCIn\’ is used as CCV presence indicator. Where ‘n’ can
contain the following values:
SLI Security Level AN 6 Value ‘SLInn\’ is used as CCV presence indicator. Where ‘nn’
Indicator can contain the following values:
00 – Not applicable
05 – Authenticated secure electronic commerce transaction
(Not relevent for COMMLINK transactions)
06 – Non Authenticated secure e-comm where card acceptor is
certified to perform authentication
(Not relevent for COMMLINK transactions)
07 – Non Authenticated secure e-comm where card
authentication cannot be performed. Other security
mechanisms may be present. Ex: channel encryption
(eg SSL, SSH)
08 – Non-secure transaction in the clear over an open network
(eg call centre, IVR, mail order)
Merchants are encouraged to seek CardGate.net advice in implementing CSC and setting the
Additional Data flags in the terminal configuration file and Data Element 47 sub-elements
appropriately.
Case 3 – no ack
‘F’Request 3 ->
0200 -> Financial Request
<- 0210 Financial Response
<-000=0210 Record Of Transaction
Cardholder hangs up or
message not received
30 seconds No acknowledgement
<-903=25 904=Reversal Pending CardGate Response
0420 -> Reversal Request
<- 0430 Reversal Response
<-000=0430 Record Of Transaction
Trans#3 reversed
4.4.2.1 Enhanced Confirm
The “Enhanced Confirm” command has been added with Version 4.06 of CardGate. It is
designed for use when there is, for example, unreliable socket communications (eg via the
Internet) between the Merchant Application and the CardGate payment gateway. When this
command is used, CardGate will acknowledge receipt of the command by responding with a
CardGate Response, ie an acknowledgement of the acknowledgement.
The normal Confirm command is changed to a Enhanced Confirm command by adding the
STAN in field five.
‘F’Request 8 ->
0200 -> Financial Request
<- 0210 Financial Response
<-000=0210 011=000008 Record Of Transaction
Received by merchant
‘C’…’000007’ -> Late Enhanced Confirm sent
(note STAN is for tran#7
not 8)
<-903=51 904=STAN not found! CardGate Response
30 sec CardGate timeout
<-903=25 904=Reversal Pending CardGate Response
<- 0430 Reversal Response
<-000=0430 Record Of Transaction
Trans#8 reversed
In summary, CardGate responses to the Enhanced Confirm command are:
Response Code Response Text Meaning
(field 903) (field 904)
60 OK Transaction completed okay
25 Reversal Pending Transaction is about to be reversed
7 SLOT CLASH Transaction has been reversed
51 STAN not found! A new transaction has been
initiated on this terminal
3 Card Acceptor 15 Supplied by the bank. This code must be listed in the terminal
Identification configuration file.
Code
4 Reference text ..40 Returned with response as bit number "902"
5 Transaction 1 "S" - Sale
Type "R" – Refund
SLI Security Level AN 6 Value ‘SLInn\’ is used as CCV presence indicator. Where ‘nn’
Indicator can contain the following values:
00 – Not applicable
05 – Authenticated secure electronic commerce transaction
(Not relevent for COMMLINK transactions)
06 – Non Authenticated secure e-comm where card acceptor is
certified to perform authentication
(Not relevent for COMMLINK transactions)
07 – Non Authenticated secure e-comm where card
authentication cannot be performed. Other security
mechanisms may be present. Ex: channel encryption
(eg SSL, SSH)
08 – Non-secure transaction in the clear over an open network
(eg call centre, IVR, mail order)
Merchants are encouraged to seek CardGate.net advice in implementing CSC and setting the
Data Element 47 sub-elements appropriately.
Note that the 0220 messages protocol is fundamentally different to the protocol used
with 0100/0200 messages. Here repeat messages (0221) are sent UNTIL a 0230
response is received. There is no "reversal" capability.
This means that if the Merchant Application does not get a response for whatever
reason, it should not re-send the offline transaction as it may cause the cardholder to
be multiply debited as there is a possibility that the Bank has responded to the stuck
transaction. Please contact CardGate.net for further advice.
Here is an example of the message protocol:
Merchant Application CardGate Comments
"O" Request 1 0220 Request sent to Bank
0230 Bank Response
Response 1 Received ok
Positive Acknowledgment Transaction 1 completed ok
Note that the 0520 messages protocol is fundamentally different to the protocol used
with 0100/0200 messages. Here repeat messages (0521) are sent UNTIL a 0530
response is received. There is no "reversal" capability.
Sub Description
Command
C Close (ie shutdown) CardGate application. (V3.8)
Authentication level “system control” required to perform this command.
Parameter 1 is mandatory and is the exit code to be used by the program.
Returns response codes:
INF_INVALID – Parameter 1 missing
INF_FAIL – not authorised to perform this command
INF_OK
F Set flags/variables. (V3.7). Parameter 1 indicates which volatile variable to set
to Parameter 2.
Parameter 1 meanings:
0 – don't set any variable - return values of each variable.
1 - set CommsLog to Parameter 2
2 - set DebugLog to Parameter 2
3 - set OnlineLog to Parameter 2
Command Response field 930 is returned with further fixed length, comma
delimited and labelled status fields:
CommsLog[1]=n,DebugLog[2]=n,OnlineLog[3]=n
Returns response codes:
INF_FAIL – not authorised to perform this command
INF_INVALID - Parameter 1 invalid
INF_OK
G Global status of CardGate. (V3.2)
Returns response code : INF_OK
Command Response field 930 is returned with a comma delimited and labelled
fields:
dd/mm/yy hh:mm:ss.mmm, Sockets=n, Active=n, ReversalPend=n, Stuck%=n,
Approved=n, Declined-01=n, Declined-05=n, Declined-91=n, Uptime=n
Also, the last digit of the amount is also used to determine the DE47, Additional Data,
response for emulated declined transactions:
7 CCVP\
8 CCVS\
9 CCVU\
Otherwise CCVN\
The monitor log proves to be most useful for tracking issues. A number of examples are
provided below in tracking various scenarios.
Normal pre-authorisaton transaction sequence. You can determine turnaraound time for
host response, the transaction was declined with response code 56:
04/04/2005 13:00:49.653 Tx(0100,23000001,000011,00,test)
04/04/2005 13:00:59.267 Rx(0110,23000001,000011,56,test)
04/04/2005 13:00:59.397 Ak(CONF,23000001,000011,test)
No bank response after timeout, so reversal request sent and then reversal response
received:
04/04/2005 12:56:59.402 Tx(0100,23000001,000142,00,test)
04/04/2005 12:57:27.442 Tx(0420,23000001,000142,01,test)
04/04/2005 12:57:57.496 Tx(0421,23000001,000142,02,test)
04/04/2005 12:57:59.198 Rx(0430,23000001,000142,21,test)
02007024048000C000001645326671090000880030000000000005000391929912001
21538323332303930363331313030303036323332303930300D
. . p $ . . . . . . . E 2 $ q . . . . . 0 . . . . . . . . . .
. . . . . 8 2 3 2 0 9 0 6 3 1 1 0 0 0 0 6 2 3 2 0 9 0 0 .
000000000210303A000002C0000000300000000000050004826814304811130225303
538323332303530353331313030303036323332303930300D
. . . . . . 0 : . . . . . . . 0 . . . . . . . . . h . 0 H . .
. % 0 5 8 2 3 2 0 9 0 5 3 1 1 0 0 0 0 6 2 3 2 0 9 0 0 .
It is recommended that this log be disabled in full production as it:
d) contains card numbers in the clear
e) slows down processing
f) grows quickly
0200 #1
0420 #1
0421 #1
0430 #1
0200 #2
0210 #1 Event ID 37 error - rejected and never seen by Merchant
Application
0210 #2
5.7.2 Event ID 24
Event ID 24 (ERR_STUCK_TRANSACTION) "Stuck transaction being cleared from system!
REPORT DETAILS TO BANK!"
This event indicates that the 30 minute time out period has expired without a response from
the host for a transaction. This is termed a "STUCK TRANSACTION" and the details should
be reported to the Bank, ESPECIALLY for 0221 Financial Capture Advice.
5.7.3 Event ID 34
Event ID 34 (ERR_TPDU_BAD) "Bad TPDU header! Data is rx buffer"
This event indicates that garbage has been received on the communications line. CardGate
will recover if it is not received during a transaction.
7. Support
CardGate.net provides 24 hour x 7 days per week telephone support via (03) 9582 7099. For
non-urgent problem rectification, email support@cardgate.net.
The Bank provides 24 hour help desk to support COMMLINK and communications related
issues only (ie anything past the computer). Telephone 1800 022 966 and have your
Merchant ID (CAIC) or Terminal Number (CATID) ready.
Daily reconciliation reports, report number CM5070, can be ordered from the Bank by
phoning Merchant Enquiries on 1800 230 177. This report contains the STAN and truncated
credit card numbers for each transaction.
Winsock1.Connect
TextStatus.Text = Winsock1.State
End Sub
TextStatus.Text = Winsock1.State
If (Winsock1.State = sckConnected) Then
' Stop sending another transaction unless the last was completed
If (gTransactionState <> tsCompleted) And (gTransactionState <> tsIdle) Then
rc = MsgBox("Last transaction not complete. Wait!", _
vbOKOnly + vbInformation, _
" CardGate Client Error")
Exit Sub
End If
TextResponse.Text = ""
TextMessage.Text = ""
' Get unique sequence number from registry and bump and save back
SeqNr = GetSetting("UMD", "UMDR288C", "Seq Nr")
gstrSeqNr = Format(SeqNr, "000000") ' eg convert SeqNr to "nnnnnn"
SeqNr = SeqNr + 1
If SeqNr > 999999 Then SeqNr = 1
SaveSetting "UMD", "UMDR288C", "Seq Nr", SeqNr
' Build request record - "F" for financial transaction, "S" for sale
strRequest = gstrClientID & vbTab & _
gstrSeqNr & vbTab & _
"F" & vbTab & _
gstrCAIC & vbTab & _
TextRef.Text & vbTab & _
"S" & vbTab & _
TextPAN.Text & vbTab & _
TextAmount.Text & vbTab & _
TextExpDate.Text & vbCr
' Was this a 0210 or 530 response? If so, then we need to acknowledge CardGate
' with a "CONFIRM" command that we have successfully received
' To get here, must have had a CBA response, so no field "000" is
' a system error of some sort?
State = 0
If ParseROT(strField, strData, 0) = 0 Then GoTo SanityFail
End If
End Sub
End Sub
As of February 2013, IP@POS is the Bank preferred channel for COMMLINK traffic:
The Bank is decommissioning all legacy mainframe Front End Processors (FEP’s) which
have been servicing their direct connect X25, Optus/TNS MTA’s and Argent ATA’s customers
for many years. All COMMLINK customers must be migrated to GHL IP/SSL before the
end of April 2013.
Rule#2 - Allow <GHL DHCP IP address or subnet > to NTP Primary 202.174.101.10
(o.oceanic.pool.ntp.org) using UDP 123
Rule#3 - Allow <GHL DHCP IP address or subnet > to NTP Secondary 202.158.218.239
(2.oceanic.pool.ntp.org) using UDP 123
Rule#4 - Allow <GHL DHCP IP address or subnet > to Google DNS 8.8.8.8, 8.8.4.4, 4.2.2.2 and using
ICMP/Ping/DNS
Rule#5 - Allow <GHL DHCP IP address or subnet > to i1.paywide.nps.commbank.com.au using TCP
9001
General Setup
- Connect the GHL ETH Ethernet port to your LAN
- Connect the GHL Serial Port 3 (located above the ETH port) using the supplied serial
cable to your Cardgate server’s serial port as selected in the “Comms Port” registry value
- If you were supplied with a 3G mobile SIM (held in the SIM1 position located at the front
of the GHL), and you do not intend to use 3G mobile communications fallback should
your LAN connection fail, simply remove the SIM. Note: DO NOT remove SIM 2 from the
back of the GHL!
- Connect power to the GHL
You can also test connectivity to the CBA IP@POS host by browsing to
System Tools > Test > Connect Test
and entering 140.168.74.78 (ie i1.paywide.nps.commbank.com.au) port
9001.
To enable auto logging on, edit the registry using REGEDIT.EXE or REGEDT32 programs.
Edit registry sub-key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\Current
Version\WinLogon" setting:
AutoAdminLogon: "1"
DefaultDomainName: domain
DefaultUserName: username
DefaultPassword: password
DontDisplayLastUserName : "0"