CDS347
Process First Data Payeezy Gateway Transaction |
Last Revised: 12/21/17 |
This called routine is used to process a transaction using the First Data Payeezy Gateway previously known as e4. Note that his is not the same as the First Data Global Gateway. See CDS346 for Global Gateway support.
CDS347 is compatible with linux/unix/aix servers that have curl version 7.43 or newer, openssl, xxd, and base64 commands installed. Note that effective with CDS347 versions dated 12/21/17 or later, tls version 1.2 will be used as required by First Data.
Calling Format:
CALL "CDS347", ERR=XXXX, Y$, S347$
CDS347 Arguments | ||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Argument | Passed To/From |
Variable | Length | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
ERR=
|
N/A | Takes error branch if any of the 4 gateway arguments are not provided, or if the curl, openssl, or base64 commands are not found in the PATH, or if there is no reply from the processor within 30 seconds. | ||||||||||||||||||||||||||||||||||||||||||||||||||
Y$
|
To | N/A | Session Control Variable | |||||||||||||||||||||||||||||||||||||||||||||||||
S347$
|
To | .GATEWAYID$
|
9 | Gateway ID. These 4 Gateway arguments can be obtained by logging in to the e4 gateway https://globalgatewaye4.firstdata.com/ | ||||||||||||||||||||||||||||||||||||||||||||||||
To | .GATEWAYPWD$
|
8 | Gateway Password | |||||||||||||||||||||||||||||||||||||||||||||||||
To | .KEYID
|
6 | Gateway KeyID | |||||||||||||||||||||||||||||||||||||||||||||||||
To | .HMACKEYID$
|
32 | Gateway HMAC Key | |||||||||||||||||||||||||||||||||||||||||||||||||
To | .MODE$
|
1 |
|
|||||||||||||||||||||||||||||||||||||||||||||||||
To | .SONO$
|
20 | Pass sales order# or invoice# to populate the gateway's reference number field. | |||||||||||||||||||||||||||||||||||||||||||||||||
To | .PMTNO
|
8 | Pass payment number or other reference to populate the gateway's customer reference number field. | |||||||||||||||||||||||||||||||||||||||||||||||||
To | .TRANSTYPE$
|
2 |
|
|||||||||||||||||||||||||||||||||||||||||||||||||
To | .AMT
|
9 | Transaction Amount, always positive, even for refunds | |||||||||||||||||||||||||||||||||||||||||||||||||
To | .TRACKDATA$
|
75 | Track 1 data returned by card swipe device, excluding sentinels | |||||||||||||||||||||||||||||||||||||||||||||||||
To | .CCNO$
|
16 | Pass the credit card#, digits only, when TRACKDATA is not provided. |
|||||||||||||||||||||||||||||||||||||||||||||||||
To | .EXPDATE$
|
4 | Pass the card expiration date in MMYY format, when when TRACKDATA$ is not provided. |
|||||||||||||||||||||||||||||||||||||||||||||||||
To | .CVD$
|
3-4 | Card Security Code. 4 numeric digits for American Express Cards, 3 numeric digits for all other cards. | |||||||||||||||||||||||||||||||||||||||||||||||||
To | .CVDREASON
|
1 |
|
|||||||||||||||||||||||||||||||||||||||||||||||||
To | .CCNAME$
|
30 | Pass the card holder's name. Not required with TRACKDATA$ is passed. |
|||||||||||||||||||||||||||||||||||||||||||||||||
To | .CCADDR1$
|
30 | Pass the card holder's 1st line of billing address. Used when address verification is desired. | |||||||||||||||||||||||||||||||||||||||||||||||||
To | .CCADDR2$
|
28 | Pass the card holder's 2nd line of billing address if necessary. Used when address verification is desired. | |||||||||||||||||||||||||||||||||||||||||||||||||
To | .CCCITY$
|
20 | Pass the card holder's billing city. Used when address verification is desired. | |||||||||||||||||||||||||||||||||||||||||||||||||
To | .CCSTATE$
|
2 | Pass the card holder's billing 2 character state code. Used when address verification is desired. | |||||||||||||||||||||||||||||||||||||||||||||||||
To | .CCZIP$
|
10 | Pass the card holder's billing zip code. Used when address verification is desired. | |||||||||||||||||||||||||||||||||||||||||||||||||
To | .CCCOUNTRY$
|
2 | Pass the card holder's billing ISO country code when not in U.S. | |||||||||||||||||||||||||||||||||||||||||||||||||
To | .PHONENO$
|
14 | Pass the card holder's telephone number. | |||||||||||||||||||||||||||||||||||||||||||||||||
To | .PHONEYTPE$
|
1 |
|
|||||||||||||||||||||||||||||||||||||||||||||||||
To | .EMAIL$
|
30 | Pass the cardholder's email address | |||||||||||||||||||||||||||||||||||||||||||||||||
To | .PROCESSEDBY$
|
30 | Displayed on the gateway web site | |||||||||||||||||||||||||||||||||||||||||||||||||
To | .ORIGIN$
|
1 |
Ecommerce indicator. Click here for additional information.
|
|||||||||||||||||||||||||||||||||||||||||||||||||
To | .TPP_ID$
|
6 | Optional third party partner ID | |||||||||||||||||||||||||||||||||||||||||||||||||
To/From | .AUTHNO$
|
8 | Returned by card processor during an authorization transaction. Pass back to card processor when charging or voiding original authorization. | |||||||||||||||||||||||||||||||||||||||||||||||||
To/From | .ORDERID$
|
10 | Unique transaction number generated by card processor. It should be stored in your application instead of the credit card#, expiration date, and security code. Pass to CDS347 when voiding a prior authorization or charge transaction, when charging a prior authorization transaction, or when refunding a prior charge. | |||||||||||||||||||||||||||||||||||||||||||||||||
From | .IPADDR$
|
15 | Useful for logging and fraud investigation | |||||||||||||||||||||||||||||||||||||||||||||||||
From | .ERROR
|
1 |
|
|||||||||||||||||||||||||||||||||||||||||||||||||
From | .APPROVED
|
1 |
|
|||||||||||||||||||||||||||||||||||||||||||||||||
From | .GWRESPCODE$
|
2 | Gateway Response Code. Click here for more information. | |||||||||||||||||||||||||||||||||||||||||||||||||
From | .GWRESPMSG$
|
50 | Gateway Response Message based on the GWRESPCODE . |
|||||||||||||||||||||||||||||||||||||||||||||||||
From | .BANKRESPCODE$
|
3 | Bank Response Code. | |||||||||||||||||||||||||||||||||||||||||||||||||
From | .BANKRESPMSG$
|
80 | Bank Response Message. May provide details when a transaction is declined. | |||||||||||||||||||||||||||||||||||||||||||||||||
From | .SEQNO$
|
50 | A number assigned by the Gateway for tracking and audit purposes | |||||||||||||||||||||||||||||||||||||||||||||||||
From | .RETRIEVALREFNO$
|
13 | The reference number returned with an AVS Result. | |||||||||||||||||||||||||||||||||||||||||||||||||
From | .CARDTYPE$
|
12+ | Possible values include "American Express", "Visa", "Mastercard", "Discover", "Diners Club", "JCB", "Gift Card", "PayPal". | |||||||||||||||||||||||||||||||||||||||||||||||||
From | .CVDRESPCODE$
|
1 | Code describing the accuracy of the card security code
|
|||||||||||||||||||||||||||||||||||||||||||||||||
From | .AVSRESPCODE$
|
1 | Codes that indicate if the Address and Zip Code provided match the bank's records for the cardholder.
|
|||||||||||||||||||||||||||||||||||||||||||||||||
From | .AVSRESPMSG$
|
Description of AVSREPSCODE$ code |
||||||||||||||||||||||||||||||||||||||||||||||||||
From | .JSONTO$
|
100+ | JSON formatted text sent to the card processor. Useful only for debugging purposes. | |||||||||||||||||||||||||||||||||||||||||||||||||
From | .JSONFROM$
|
100+ | JSON formatted text received from the card processor. Useful only for debugging purposes. |
Example |
1700 TEST: 1710 BEGIN 1720 CALL "CDS091",Y$ 1730 CALL "CDS041","CDS347",S347$,"YY" 1740 LET S347.GATEWAYID$="AF8898-01",S347.GATEWAYPWD$="xxxxxxxx" 1750 LET S347.KEYID=123564,S347.HMACKEY$="12345678901234567890123456789012" 1760 LET S347.MODE$="T"; REM "Testing site 1770 LET S347.SONO$="987654" 1780 LET S347.PMTNO=888111 1790 LET S347.TRANSTYPE$="00"; REM "Purchase 1800 LET S347.AMT=1.23 1810 LET S347.CCNO$="4111111111111111" 1820 LET S347.EXPDATE$="0515" 1830 LET S347.CVD$="123" 1840 LET S347.CCNAME$="Test Visa Card" 1850 LET S347.CCADDR1$="8050 Corporate Cir Ste 1" 1860 LET S347.CCCITY$="North Royalton" 1870 LET S347.CCSTATE$="OH" 1880 LET S347.CCZIP$="44133" 1890 LET S347.PHONENO$="4408666893" 1900 LET S347.PHONETYPE$="W" 1910 LET S347.PROCESSEDBY$="Len Krause" 1920 CALL "CDS347",Y$,S347$ 1930 CALL "CDS279",S347$ 1940 PRINT 'CS',S347.JSONFROM$ |
Results |
![]()
|