CDS348

Process Authorize.net Credit Card Transaction

Last Revised: 12/21/17

This called routine is used to process a credit card transaction using authorize.net. 

CDS348 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.21 as required as now required by Authorize.net.

Calling Format:

CALL "CDS348", Y$, S348$

CDS348 Arguments
Argument Passed
To/From
Variable Length Description
Y$ To all N/A Session Control Variable
S348$ To .GWLOGIN$ 10+ Gateway Login ID to authorize.net
  To .GWPASSWORD$ 10+ Gateway Password to authorize.net
  To .TEST$ 1 Pass as 'Y' when testing without actually processing the credit card transaction.
  To .ORIGIN$ 1
R Retail (Card Present)
M Mail Order/Phone Order
E E-commerce
T Connect to test site
  To .SONO$ 20+ Pass sales order# or invoice# to populate the Invoice# field on authorize.net
  To .MODE$ 1
C Charge (or credit) Card
A Authorize Card for Charge later
V Void Prior Transaction
  To .AMT 8+ Amount to charge.  Negative for amount to credit.
  To .TRACKDATA$ 75+ Data returned by card swipe device
  To .CCNO$ 16+ Pass the credit card#.  Can be formatted with spaces or hyphens as all non-numeric characters are ignored.  Not required when TRACKDATA$ is passed.  Only last four digits of card number are required to charge or void a transaction previously authorized when the original transaction ORDERID$ is provided.
  To .EXPDATE$ 4 Card expiration date in MMYY or MYY format.  Can also contain XXXX for processed transactions to obfuscate data.  Not required when TRACKDATA$ is passed.
  To .CCNAME$ 35+ Pass the card holders name.  Not required with TRACKDATA$ is passed.
  To .CCADDR$ 35+ Pass the card holders billing address.  Used when address verification is desired.
  To .CCCITY$ 28+ Pass the card holders billing city.  Used when address verification is desired.
  To .CCSTATE$ 2+ Pass the card holders billing 2 character state code.  Used when address verification is desired.
  To .CCZIP$ 10+ Pass the card holders billing zip code.  Used when address verification is desired.
  To .CCCOUNTRY$ 2 Pass the card holders billing country when not in U.S.  Refer to authorize.net documentation for values.
  To .CVD$ 3-4 Card Security Code.  4 numeric digits for American Express Cards, 3 numeric digits for all other cards.  May also contain X's as all non-numeric digits are ignored.
  To .IPADDR$ 15+ Optional IP Address of workstation or customer processing the transaction.  Passed to authorize.net for fraud investigation activities.
  To .EMAIL$ 50+ Optional Email Address of buyer which can be used by authorize.net for customer email notifications.
  To/From .AUTHNO$ 8+ Pass to CDS348 when a telephone authorization took place prior to the charge transaction.  Returned from authorize.net although not typically needed since the ORDERID$ field is used to identify the transaction.
  To/From .ORDERID$ 50+ Unique transaction number generated by authorize.net.  It should be stored in your application instead of the credit card#, expiration date, and security code.  It appears on authorize.net web reports.  Pass to CDS348 when voiding a prior authorization or charge transaction, or when charging a prior authorization transaction.
  From .RESPONSE$ 1 Transaction Result
1Transaction was approved
2Transaction was declined
3Transaction failed, typically because a required field was missing or invalid
4Transaction held for review.  The configuration parameters at authorize.net permit you to authorize the card, but not charge it pending your review.  It is typically used when the card holders billing address does not match the bank's record.
  From .RESPONSESUBCODE$ 1+ Further describes the RESPONSE$ code.  Refer to authorize.net documentation.
  From .RESPONSEREASON$ 3+ Additional detail related to the RESPONSE$ code.  Refer to authorize.net documentation.
  From .CVDRESPONSE$ 1 Code describing the accuracy of the card security code
MMatch
NNo Match
PNot Processed
SShould have been present
UIssuer unable to process request
  From .CVDRESPONSETEXT$ 40+ Description of security code response from table above
  From .AVSRESPONSE$ 1 Codes that indicate if the Address and Zip Code provided match the bank's records for the cardholder.  Refer to authorize.net documentation.
  From .AVSRESPONSETEXT$ 40+ Description of AVSREPSONSE$ code
  From .MSG$ 50+ Verbose message text provided by authorize.net describing transaction, such as "This transaction was approved", "This transaction was declined", etc. typically presented to user by application.
  From .SENT$ 80+ List of field names and values sent to authorize.net used for debugging purposes.  The field names are separated from the value using "=" with a line feed character between each row as shown below.
version=3.1
method=CC
type=AUTH_ONLY
first_name=John
last_name=Doe
invoice_num=818776
amount=71.50
card_num=xxxxxxxxxxxx8602
exp_date=0615
address=1815 Main St
city=Anytown
state=GA
zip=31088
card_code=xxxx
Example
CALL "CDS041","CDS348",S348$,"YY"
 

REM "Populate S348 fields from your data and transaction type desired

 

CALL "CDS348",Y$,S348$

 

REM "Check S348.RESPONSE$ for approval

REM "Display result

CALL "CDS069",0,0,0,0,S348.MSG$+"-"