CDS346
Process First Data Global Gateway Transaction |
Last Revised: 12/21/17 |
This called routine is used to process a credit card transaction with First Data using their Global Gateway. This routine is still supported but has been replaced by CDS347 which is used with the First Data Payeezy Gateway.
Currently, only credit card transactions are supported, although check approval transactions may be supported in the future.
CDS346 requires java version 1.8 or higher to be installed on the server and to be executable without including a complete path. Earlier versions of java do not use tls version 1.2 as now required by First Data.
Calling Format:
CALL "CDS346", ERR=XXXX, Y$, S346$
CDS346 Arguments | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Argument | Passed To/From |
Variable | Length |
Transaction Type |
Description | ||||||||||||||||||
sale, credit, preAuth, ForceTicket |
return, postAuth |
void | |||||||||||||||||||||
ERR=XXXX
|
N/A | N/A | N/A | Error branch taken if:
|
|||||||||||||||||||
Y$
|
To | all | N/A | Session Control Variable | |||||||||||||||||||
S346$
|
To | .STORENO$
|
10 | No blanks permitted | |||||||||||||||||||
To | .FOLDER$
|
20+ | Defaults to $SMSDIR/bin/firstdata if not provided. Indicates the folder where the First Data script, FirstDataWSClient.sh, and dependent jar files, as well as the sub-directory for each store are located. See complete list below.
An optional sub-folder named 'test' contains versions of 3 files used for 'test' accounts.
A sub-folder is required for each store, where the folder name is the store#. Example:
The store sub-folder contains the following files:
The ExcellwareTest file, is an optional empty file named to describe the store associated with this store#. The .tar file is downloaded from the First Data web site http://www.firstdata.com/ecommerce for 'live' information, or https://www.staging.yourpay.com for 'test' accounts.. Click on the Virtual Terminal link, then login. You will need the merchants First Data Store#, User ID, and Password to login. Click Support, Download Center, and under Store CERT Files, click Download Now. You will need merchant's Federal Taxpayer ID. Click the Download button next to web service. Save the downloaded .tar file in the store# sub-directory, and un-tar into the 8 files listed above. |
||||||||||||||||||||
To | .TEST$
|
4+ | Pass as 'test' when using a test account. This requires the test directory and 3 test files described above. | ||||||||||||||||||||
To | .KEYSTORE$
|
20+ | Pass the complete path the keystore (.ks) file. Only required when the .ks file is not located in the folder as described above. | ||||||||||||||||||||
To | .KEYSTOREPASSWORD$
|
20+ | Pass the keystore password. Only required when the ks.pw.txt file is not present in the store folder as described above. | ||||||||||||||||||||
From | .USERNAME$
|
20+ | Currently set by CDS346 to the default value based on the store#. | ||||||||||||||||||||
To | .PASSWORD$
|
10+ | Pass the First Data password. Only required when the auth.txt file is not present in the store folder as described above. | ||||||||||||||||||||
To | .TYPE$
|
5+ | Transaction Type
|
||||||||||||||||||||
To | .TRANSTYPE$
|
10+ |
|
||||||||||||||||||||
To | .ORIGIN$
|
6 | X |
|
|||||||||||||||||||
To | .TRACKDATA$
|
100+ | X | Pass data returned by card swipe device | |||||||||||||||||||
To | .CARDNUMBER$
|
16+ | X | Pass the credit card# with no spaces nor hyphens. Not required when TRACKDATA$ is passed. |
|||||||||||||||||||
To | .EXPMONTH$
|
2 | X | Pass the 2 character card expiration month with leading zero when applicable. Not required when TRACKDATA$ is passed. |
|||||||||||||||||||
To | .EXPYEAR$
|
2 | X | Pass the 2 character card expiration year with leading zero when applicable. Not required when TRACKDATA$ is passed. |
|||||||||||||||||||
To | .CHARGETOTAL
|
8+ | X | X | Pass the amount to charge or credit. Not a signed field. | ||||||||||||||||||
To | .CARDCODEVALUE$
|
4+ | X | Pass the 3 or 4 digit numeric card security code. | |||||||||||||||||||
To | .CARDCODEIND$
|
10+ | X | Pass the reason the CARDCODEVALUE$ was not provided.
|
|||||||||||||||||||
To | .NAME$
|
35+ | X | Pass the card holders name. Not required with TRACKDATA$ is passed. |
|||||||||||||||||||
To | .ADDRESS1
|
35+ | X | Pass the first line of the card holders billing address. Used when address verification is desired. | |||||||||||||||||||
To | .ADDRESS2
|
35+ | X | Pass the second line of the card holders billing address when needed. Used when address verification is desired. | |||||||||||||||||||
To | .CITY$
|
28+ | X | Pass the card holders billing city. Used when address verification is desired. | |||||||||||||||||||
To | .STATE$
|
2+ | X | Pass the card holders billing 2 character state code. Used when address verification is desired. | |||||||||||||||||||
To | .ZIPCODE$
|
10+ | X | Pass the card holders billing zip code. Used when address verification is desired. | |||||||||||||||||||
To | .CUSTOMERID$
|
10+ | X | Pass an optional customer identifier. | |||||||||||||||||||
To | .INVOICENUMBER$
|
10+ | X | Pass an optional invoice number to identify the transaction. Appears on First Data reports to assist in reconciling transactions. | |||||||||||||||||||
To/From | .ORDERID$
|
50+ | From | To | To | Order ID generated by First Data to identify a transaction.
|
|||||||||||||||||
To/From | .TDATE$
|
10+ | X | To | Transaction Date in a unique FirstData format, that is used the same as the table above for ORDERID . |
||||||||||||||||||
To | .CHECKNUMBER$
|
10+ | Pass Check# used for 'check' TYPE . |
||||||||||||||||||||
To | .ACCOUNTNUMBER$
|
15+ | Pass Bank account number for 'check' TYPE . |
||||||||||||||||||||
To | .DRIVINGLICENSENO$
|
15+ | Pass Drivers License# for Check verification. | ||||||||||||||||||||
To | .DRIVINGLICENSEST$
|
2+ | Pass 2 character state code indicating the state that issued the Driver's License. | ||||||||||||||||||||
From | .RESULT$
|
20+ | X | Transaction Result
|
|||||||||||||||||||
From | .PROCESSORRESCODE$
|
1+ | X | This code is set by First Data but not documented. Use with caution. | |||||||||||||||||||
From | .PROCESSORREFNO$
|
20+ | X | Brief reference number set by First Data used when communication with First Data about a specific transaction. | |||||||||||||||||||
From | .AVSRESPONSE$
|
4+ | X | Codes set by First Data to indicate if the Address and Zip Code provided match the bank's records for the cardholder. Refer here for details. | |||||||||||||||||||
To | .XMLOUT$
|
4 | X | X | X | Pass as "true" to request XML sent to First Data be returned in XML$
for testing purposes. |
|||||||||||||||||
From | .XML$
|
100+ | X | X | X | Returned as XML sent to First Data when XMLOUT$="true" |
|||||||||||||||||
From | .ERRORMESSAGE$
|
50+ | X | Error message set by First Data when a transaction is processed, but not approved. | |||||||||||||||||||
From | .ERROR$
|
50+ | X | Error message set by the Dynamo Tools java class when required parameters are missing, or the java class encounters an error. | |||||||||||||||||||
From | .MSG$
|
50+ | X | Set by CDS346 when the ERR= branch will be taken to further describe the situation causing the error. |
Note that CDS346 will create an error file named tmp/FirstDataError.txt and should a java error occur, append to this file the java stack trace that is useful when debugging the java code that CDS346 uses.
Example |
1230 CALL "CDS041","CDS346",S346$,"YY"
|