CTI_ParseTransactionQuery()

This subprocedure is used to parse a previously downloaded transaction query response. This subprocedure requires that you provide the fully-qualified filepath of the downloaded query response file in the IFS. If this query was performed using CTI_QueryTransaction(), the report file will be found in the default download directory specified in your CTICFGMCH record.

Parsed data will be written to the output tables described below. This data can then be retrieved from the tables and stored in a more permanent manner; the output tables should be treated as temporary, transactional tables and not used for long-term storage.

If an error occurs, this subprocedure will return *OFF, and information about the error will be present in the pErrorDS parameter which contains a CTI_ErrorDS_t data structure.

Subprocedure Prototype

D CTI_ParseTransactionQuery...
D                 PR              N   Extproc('CTI_ParseTransactionQuery')

Returns *OFF if an error occurs during processing, *ON otherwise.

D  pUniqueId                          Const Like(CTI_UniqueId_t)

Unique ID, generated with CTI_NextUniqueID(), that will be used to identify the parsed records from this file

Required

D  pQueryFile                         Const Like(CTI_FilePath_t)

The fully-qualified filepath of the file in the IFS that will be parsed. If this query was performed using CTI_QueryTransaction(), the file will be in the default download directory specified in your CTICFGMCH record

D  pErrorDS                           LikeDS(CTI_ErrorDS_t)

Error data structure used to capture subprocedure and CyberSource errors

Required

Data Structures

D CTI_ErrorDS_t   DS                  Qualified Template Inz
 
D  Subproc                     132A   Varying

Name of subprocedure returning error

D  MessageId                     7A

Message ID of error message

D  Message                    1024A   Varying

Error message text

D  Source                       10A

Error message source

D  LogFile                            Like(CTI_FilePath_t)

IFS filepath of generated log file

Output Table Files

AR CTIQTDR

Record

CyberSource Transaction Detail Query Record

A QUERYID       26A         VARLEN

Key

Query Unique ID

CyberSource query ID

A REQUESTID     26A         VARLEN

CyberSource request unique ID

A RECONID       60A         VARLEN
A                           ALIAS(RECONCILIATIONID)

Transaction reconciliation ID

A MERCHANTID    30A         VARLEN

Merchant ID for the account

A TRANSTS       30A         VARLEN
A                           ALIAS(TRANSACTIONSTATUS)

Transaction status

A SUBMITTS        Z         ALIAS(SUBMITTIMESTAMP)

Submission timestamp

A APPINFSTS     30A         VARLEN
A                           ALIAS(APPSSTATUS)

Application status

A APPINFRNCD     5A         VARLEN
A                           ALIAS(APPSREASONCODE)

Application reason code

A APPINFRCD     15A         VARLEN
A                           ALIAS(APPSRCODE)

Application RCode

A APPINFRFLG    50A         VARLEN
A                           ALIAS(APPSRFLAG)

Application RFlag

A MCHCSTID     100A         VARLEN
A                           ALIAS(MERCHANTCUSTOMERID)

Merchant customer ID

A HASHPASSWD   100A         VARLEN
A                           ALIAS(HASHEDPASSWORD)

Buyer hashed password

A CLTCD         50A         VARLEN
A                           ALIAS(CLIENTREFERENCECODE)

Client reference code

A CLTAPPVER     50A         VARLEN
A                           ALIAS(CLIENTAPPVERSION)

Client application version

A CLTAPPNAME    50A         VARLEN
A                           ALIAS(CLIENTAPPNAME)

Client application name

A CLTAPPUSR     30A         VARLEN
A                           ALIAS(CLIENTAPPUSER)

Client application user

A CLTAPPCOMM   255A         VARLEN
A                           ALIAS(CLIENTAPPCOMMENTS)

Client application comments

A CATHECIRAW     2A         VARLEN
A                           ALIAS(CONSUMERAUTHECIRAW)

Consumer ECI raw

A CATHCAVV      40A         VARLEN
A                           ALIAS(CONSUMERAUTHCVV)

Consumer CVV

A CATHXID       40A         VARLEN
A                           ALIAS(CONSUMERXID)

Consumer XID

A CATHTRNSID    60A         VARLEN
A                           ALIAS(CONSUMERTRANSID)

Consumer transaction ID

A DVCIPADDR     15A         VARLEN
A                           ALIAS(DEVICEIPADDRESS)

Customer device IP address

A DVCHSTNAME    60A         VARLEN
A                           ALIAS(DEVICEHOSTNAME)

Customer device host name

A DVCCKSACP      5A         VARLEN
A                           ALIAS(DEVICECOOKIESACCEPTED)

Consumer device cookies accepted

A ERRINFRSN     50A         VARLEN
A                           ALIAS(ERRORINFOREASON)

Error information reason

A ERRINFMSG    255A         VARLEN
A                           ALIAS(ERRORINFOMESSAGE)

Error information message

A NBRINSTLMT     3A         VARLEN
A                           ALIAS(NUMBEROFINSTALLMENTS)

Number of installments

A FRDMRKRSN    100A         VARLEN
A                           ALIAS(FRAUDMARKREASON)

Fraud marking reason

A MCHDESCNAM    23A         VARLEN
A                           ALIAS(MERCHANTDESCRIPTORNAME)

Merchant descriptor name

A BTFNAME       60A         VARLEN
A                           ALIAS(BILLTOFIRSTNAME)

Bill to customer first name

A BTLNAME       60A         VARLEN
A                           ALIAS(BILLTOLASTNAME)

Bill to customer last name

A BTMNAME       60A         VARLEN
A                           ALIAS(BILLTOMIDDLENAME)

Bill to customer middle name

A BTSUFFIX      60A         VARLEN
A                           ALIAS(BILLTONAMESUFFIX)

Bill to customer name suffix

A BTADDR1       60A         VARLEN
A                           ALIAS(BILLTOADDRESS1)

Bill to customer address line 1

A BTADDR2       60A         VARLEN
A                           ALIAS(BILLTOADDRESS2)

Bill to customer address line 2

A BTCITY        50A         VARLEN
A                           ALIAS(BILLTOCITY)

Bill to customer city

A BTSTATE        2A         VARLEN
A                           ALIAS(BILLTOSTATE)

Bill to customer state

A BTZIP         10A         VARLEN
A                           ALIAS(BILLTOZIP)

Bill to customer zip

A BTCMPNAME     60A         VARLEN
A                           ALIAS(BILLTOCOMPANYNAME)

Bill to company name

A BTCMPADDR1    40A         VARLEN
A                           ALIAS(BILLTOCOMPANYADDR1)

Bill to company address line 1

A BTCMPADDR2    40A         VARLEN
A                           ALIAS(BILLTOCOMPANYADDR2)

Bill to company address line 2

A BTCMPCITY     30A         VARLEN
A                           ALIAS(BILLTOCOMPANYCITY)

Bill to company city

A BTCMPSTATE     2A         VARLEN
A                           ALIAS(BILLTOCOMPANYSTATE)

Bill to company state

A BTCMPZIP      10A         VARLEN
A                           ALIAS(BILLTOCOMPANYZIP)

Bill to company zip

A BTCMPCNTRY     2A         VARLEN
A                           ALIAS(BILLTOCOMPANYCOUNTRY)

Bill to company country

A BTEMAIL      255A         VARLEN
A                           ALIAS(BILLTOEMAIL)

Bill to email address

A BTCNTRY        2A         VARLEN
A                           ALIAS(BILLTOCOUNTRY)

Bill to customer country

A BTCSTITLE     60A         VARLEN
A                           ALIAS(BILLTOTITLE)

Bill to customer title

A BTPHONE       15A         VARLEN
A                           ALIAS(BILLTOPHONE)

Bill to phone

A STFNAME       60A         VARLEN
A                           ALIAS(SHIPTOFIRSTNAME)

Ship to first name

A STLNAME       60A         VARLEN
A                           ALIAS(SHIPTOLASTNAME)

Ship to last name

A STADDR1       60A         VARLEN
A                           ALIAS(SHIPTOADDRESS1)

Ship to address line 1

A STADDR2       60A         VARLEN
A                           ALIAS(SHIPTOADDRESS2)

Ship to address line 2

A STCITY        50A         VARLEN
A                           ALIAS(SHIPTOCITY)

Ship to city

A STSTATE        2A         VARLEN
A                           ALIAS(SHIPTOSTATE)

Ship to state

A STZIP         10A         VARLEN
A                           ALIAS(SHIPTOZIP)

Ship to zip

A STCMPNAME     60A         VARLEN
A                           ALIAS(SHIPTOCOMPANYNAME)

Ship to company name

A STCNTRY        2A         VARLEN
A                           ALIAS(SHIPTOCOUNTRY)

Ship to country

A STPHONE       15A         VARLEN
A                           ALIAS(SHIPTOPHONE)

Ship to phone

A AMTTOT        19A         VARLEN
A                           ALIAS(TOTALAMOUNT)

Total amount

A AMTCUR         3A         VARLEN
A                           ALIAS(AMOUNTCURRENCY)

Amount currency

A AMTTAX        12A         VARLEN
A                           ALIAS(TAXAMOUNT)

Tax amount

A AMTATH        15A         VARLEN
A                           ALIAS(AUTHORIZEDAMOUNT)

Authorized amount

A AMTSETTLE     12A         VARLEN
A                           ALIAS(SETTLEMENTAMOUNT)

Settlement amount

A AMTSETLCUR     3A         VARLEN
A                           ALIAS(SETTLEMENTAMOUNTCURRENCY)

Settlement amount currency

A GIFTWRAP       1A         VARLEN

Gift wrapping

A SHIPMTH       10A         VARLEN
A                           ALIAS(SHIPPINGMETHOD)

Shipping method

A PAYTYPNAME    50A         VARLEN
A                           ALIAS(PAYMENTTYPENAME)

Payment type name

A PAYTYP        20A         VARLEN
A                           ALIAS(PAYMENTTYPE)

Payment type

A PAYTYPMTH     50A         VARLEN
A                           ALIAS(PAYMENTTYPEMETHOD)

Payment type method

A FUNDSRC       50A         VARLEN
A                           ALIAS(PAYMENTTYPEFUNDSOURCE)

Payment type funding source

A FUNDSRCAFL    50A         VARLEN
A                           ALIAS(PAYMENTTYPEFUNDAFFILIATION)

Payment type funding source affiliation

A PAYTYPCRED    50A         VARLEN
A                           ALIAS(PAYMENTTYPECREDENTIAL)

Payment type credential

A PAYCSTID      26A         VARLEN
A                           ALIAS(PAYMENTCUSTOMERID)

Payment customer ID

A CRDSUFFIX      4A         VARLEN
A                           ALIAS(CARDSUFFIX)

Card suffix

A CRDPREFIX      6A         VARLEN
A                           ALIAS(CARDPREFIX)

Card prefix

A CRDEXPMON      2A         VARLEN
A                           ALIAS(CARDEXPIRATIONMONTH)

Card expiration month

A CRDEXPYR       4A         VARLEN
A                           ALIAS(CARDEXPIRATIONYEAR)

Card expiration year

A CRDSTRMON      2A         VARLEN
A                           ALIAS(CARDSTARTMONTH)

Card start month

A CRDSTRYR       4A         VARLEN
A                           ALIAS(CARDSTARTYEAR)

Card start year

A CRDISSNBR      5A         VARLEN
A                           ALIAS(CARDISSUENUMBER)

Card issue number

A CRDTYP         3A         VARLEN
A                           ALIAS(CARDTYPE)

Card type

A CRDENCID       3A         VARLEN
A                           ALIAS(CARDACCOUNTENCODERID)

Card account encoder ID

A CRDUSEAS      20A         VARLEN

Card use-as

A INVNBR        50A         VARLEN
A                           ALIAS(INVOICENUMBER)

Invoice number

A INVBARCD      50A         VARLEN
A                           ALIAS(INVOICEBARCODENUMBER)

Invoice barcode number

A INVEXPDT      50A         VARLEN
A                           ALIAS(INVOICEEXPIRATIONDATE)

Invoice expiration date

A BKRTNBR        9A         VARLEN
A                           ALIAS(BANKROUTINGNUMBER)

Bank rounting number

A BKBRANCHCD    50A         VARLEN
A                           ALIAS(BANKBRANCHCODE)

Branch code

A BKSWIFTCD     50A         VARLEN
A                           ALIAS(BANKSWIFTCODE)

Bank swift code

A BKBANKCD      50A         VARLEN
A                           ALIAS(BANKCODE)

Bank code

A BKIBAN        50A         VARLEN
A                           ALIAS(BANKIBAN)

Bank IBAN

A BKACTSFFIX    50A         VARLEN
A                           ALIAS(BANKACCOUNTSUFFIX)

Bank account suffix

A BKACTPRFIX    50A         VARLEN
A                           ALIAS(BANKACCOUNTPREFIX)

Bank account prefix

A BKCHKNBR       8A         VARLEN
A                           ALIAS(BANKCHECKNUMBER)

Bank check number

A BKACTTYP       1A         VARLEN
A                           ALIAS(BANKACCOUNTTYPE)

Bank account type

A BKACTNAME     60A         VARLEN
A                           ALIAS(BANKACCOUNTNAME)

Bank account name

A BKACTCHKDG    50A         VARLEN
A                           ALIAS(BANKACCOUNTCHECKDIGIT)

Bank account check digit

A BKACTENCID     3A         VARLEN
A                           ALIAS(BANKACCOUNTENCODERID)

Bank account encoder ID

A BKMDREFNBR    50A         VARLEN
A                           ALIAS(BANKMANDATEREFERENCENUMBER)

Bank mandate reference number

A BKMDRCRTYP    50A         VARLEN
A                           ALIAS(BANKMANDATERECURRINGTYPE)

Bank mandate recurring type

A BKMDID        50A         VARLEN
A                           ALIAS(BANKMANDATEID)

Bank mandate ID

A ACTBALAMT     12A         VARLEN
A                           ALIAS(ACCOUNTBALANCEAMOUNT)

Account balance

A ACTPRVBAL     12A         VARLEN
A                           ALIAS(ACCOUNTPREVIOUSBALANCE)

Account previous balance

A ACTCUR         5A         VARLEN
A                           ALIAS(ACCOUNTCURRENCY)

Account currency

A PMTSOLN       12A         VARLEN
A                           ALIAS(PAYMENTSOLUTION)

Payment solution

A PMTCMCIND     20A         VARLEN
A                           ALIAS(PROCESSINGCOMMERCEINDICATOR)

Procesing commerce indicator

A PMTBSAPPID    50A         VARLEN
A                           ALIAS(PROCESSINGAPPLICATIONID)

Processing application ID

A ATHTYP        15A         VARLEN
A                           ALIAS(AUTHORIZATIONTYPE)

Authorization type

A BKTRNSECCD    50A         VARLEN
A                           ALIAS(BANKTRANSFERSECCODE)

Bank transfer sec code

A PRCNAME       30A         VARLEN
A                           ALIAS(PROCESSORNAME)

Processor name

A PRCTRANID     50A         VARLEN
A                           ALIAS(PROCESSORTRANSACTIONID)

Processor transaction ID

A PRCNTTRNID    50A         VARLEN
A                           ALIAS(PROCESSORNETWORKTRANSACTIONID)

Processor network transaction ID

A PRCRSPID      50A         VARLEN
A                           ALIAS(PROCESSORRESPONSEID)

Processor response ID

A PRCPVTRNID    50A         VARLEN
A                           ALIAS(PROVIDERTRANSACTIONID)

Processor provider transaction ID

A PRCAPRCD      50A         VARLEN
A                           ALIAS(PROCESSORAPPROVALCODE)

Processor approval code

A PRCRSPCD      10A         VARLEN
A                           ALIAS(PROCESSORRESPONSECODE)

Processor response code

A PRCAVSCD       1A         VARLEN
A                           ALIAS(AVSCODE)

AVS code

A PRCAVSCDRW    10A         VARLEN
A                           ALIAS(AVSCODERAW)

AVS code raw

A PRCCVRSTCD     1A         VARLEN
A                           ALIAS(CARDVERIFICATIONRESULTCODE)

CVN result code

A PRCACHRSCD     2A         VARLEN
A                           ALIAS(ACHVERIFICATIONRESULTCODE)

ACH verification result code

A PRCACHCDRW    10A         VARLEN
A                           ALIAS(ACHVERIFICATIONCODERAW)

ACH verification result code raw

A EVEMAIL        1A         VARLEN
A                           ALIAS(EVEMAILRESULT)

Electronic verification email result

A EVEMAILRAW     1A         VARLEN
A                           ALIAS(EVEMAILRESULTRAW)

Electronic verification email result raw

A EVNAME        30A         VARLEN
A                           ALIAS(EVNAMERESULT)

Electronic verification name result

A EVNAMERAW     30A         VARLEN
A                           ALIAS(EVNAMERESULTRAW)

Electronic verification name result raw

A EVPHONE        1A         VARLEN
A                           ALIAS(EVPHONERESULT)

Electronic verification phone result

A EVPHONERAW     1A         VARLEN
A                           ALIAS(EVPHONERESULTRAW)

Electronic verification phone result raw

A EVSTREET       1A         VARLEN
A                           ALIAS(EVSTREETRESULT)

Electronic verification street result

A EVSTREETRW     1A         VARLEN
A                           ALIAS(EVSTREETRESULTRAW)

Electronic verification street result raw

A EVZIP          1A         VARLEN
A                           ALIAS(EVZIPRESULT)

Electronic verification ZIP result

A EVZIPRAW       1A         VARLEN
A                           ALIAS(EVZIPRESULTRAW)

Electronic verification ZIP result raw

A SYSTRADNBR     6A         VARLEN
A                           ALIAS(SYSTEMTRACEAUDITNUMBER)

Processor system trace audit number

A RSPCDSRC       1A         VARLEN
A                           ALIAS(RESPONSECODESOURCE)

Processor response code source

A POSENTRYMD    11A         VARLEN
A                           ALIAS(POSENTRYMODE)

POS entry mode

A POSTERMCAP     1A         VARLEN
A                           ALIAS(POSTERMINALCAPABILITY)

POS terminal capability

A PRFNAME       50A         VARLEN
A                           ALIAS(PROFILENAME)

Profile name

A PRFDCSN      255A         VARLEN
A                           ALIAS(PROFILEDECISION)

Profile decision

A PASPRFNAME    50A         VARLEN
A                           ALIAS(PASSIVEPROFILENAME)

Passive profile name

A PASPRFDSCN   255A         VARLEN
A                           ALIAS(PASSIVEPROFILEDECISION)

Passive profile decision

A FACTORCDS    100A         VARLEN
A                           ALIAS(SCOREFACTORCODES)

Score factor codes

A SCORERSLT     50A         VARLEN
A                           ALIAS(SCORERESULT)

Score results

A RISKLOCTS     30A         ALIAS(RISKLOCALTIME)

Risk information local time

A SNDREFNBR     19A         VARLEN
A                           ALIAS(SENDERREFERENCENUMBER)

Sender reference number

AR CTIEDRAPRR

Record

CyberSource Transaction Query Application Record

A PID           15P 0

Key

Parent Query Unique ID

A QUERYID       26A         VARLEN

Key

CyberSource Query ID

A UID           15P 0

Key

Application unique ID

A APRNAME       30A         VARLEN
A                           ALIAS(APPLICATIONNAME)

Application name

A APPSTS        30A         VARLEN
A                           ALIAS(APPLICATIONSTATUS)

Application status

A APPRSNCD       5A         VARLEN
A                           ALIAS(APPLICATIONREASONCODE)

Application reason code

A APPRCD        15A         VARLEN
A                           ALIAS(APPLICATIONRCODE)

Application RCode

A APPRFLAG      50A         VARLEN
A                           ALIAS(APPLICATIONRFLAG)

Application RFlag

A APPRECONID    60A         VARLEN
A                           ALIAS(APPLICATIONRECONCILIATIONID)

Application reconciliation ID

A APPRMSG      255A         VARLEN

Application rmessage

A APPRTNCD      50A         VARLEN
A                           ALIAS(APPLICATIONRETURNCODE)

Application return code

AR CTIQTDERRR

Record

CyberSource Transaction Query Error Record

A PID           15P 0

Key

Parent Query Unique ID

A QUERYID       26A         VARLEN

Key

CyberSource Query ID

A UID           15P 0

Key

Error unique ID

A ERRFIELD    1024A         VARLEN
A                           ALIAS(ERRORFIELD)

Json field in error

A ERRREASON     15A         VARLEN
A                           ALIAS(ERRORREASON)

Error reason

AR CTIQTDLINR

Record

CyberSource Exception Detail Report Line Item Record

A PID           15P 0

Key

Parent Query Unique ID

A QUERYID       26A         VARLEN

Key

CyberSource Query ID

A UID           15P 0

Key

Line item unique ID

A PRODUCTCD    255A         VARLEN
A                           ALIAS(PRODUCTCODE)

Product code

A PRODUCTNAM   255A         VARLEN
A                           ALIAS(PRODUCTNAME)

Product name

A PRODUCTSKU   255A         VARLEN

Product SKU

A TAXAMT        15A         VARLEN
A                           ALIAS(TAXAMOUNT)

Tax amount

A QUANTITY      15A         VARLEN

Product quantity

A UNITPRICE     15A         VARLEN

Unit price

A FULFILTYP      2A         VARLEN
A                           ALIAS(FULFILLMENTTYPE)

Fulfillment type

AR CTIQTDMDIR

Record

CyberSource Transaction Query Merchant-Defined Information Record

A PID           15P 0

Key

Parent Query Unique ID

A QUERYID       26A         VARLEN

Key

CyberSource Query ID

A UID           15P 0

Key

Merchant-defined record unique ID

A MDIKEY        50A         VARLEN
A                           ALIAS(MERCHDEFINEDINFOKEY)

Merchant-defined information key

A MDIVALUE     255A         VARLEN
A                           ALIAS(MERCHDEFINEDINFOVALUE)

Merchant-defined information value

AR CTIQTDPASR

Record

CyberSource Transaction Query Passive Rule Record

A PID           15P 0

Key

Parent Query Unique ID

A QUERYID       26A         VARLEN

Key

CyberSource Query ID

A UID           15P 0

Key

Passive rule unique ID

A PASRULNAME    50A         VARLEN
A                           ALIAS(PASSIVERULENAME)

Passive rule name

A PASRULDSCN   255A         VARLEN
A                           ALIAS(PASSIVERULEDECISION)

Passive rule decision

AR CTIQTDRULR

Record

CyberSource Transaction Query Rule Record

A PID           15P 0

Key

Parent Query Unique ID

A QUERYID       26A         VARLEN

Key

CyberSource Query ID

A UID           15P 0

Key

Rule unique ID

A RULNAME       50A         VARLEN
A                           ALIAS(RULENAME)

Rule name

A RULDSCN      255A         VARLEN
A                           ALIAS(RULEDECISION)

Rule decision