Testing Query Transactions
You can use the following test scenarios to verify your coding of the queryTransaction
, as well as various responses. To test the query transaction, please do the following:
If you are enabled for the use of the queryTransaction, you will not be able test for response code 153 - Query Transaction not enabled.
-
Submit a
queryTransaction
with the following elements:
-
<origId>newTransaction</origId>
(Note: You can use any value never used as anid
attribute.) -
<origActionType>A</origActionType>
(Note: You can use any valid action type as detailed in the enumerations table of origActionType.)
Verify that you receive a response
value of 151 and message
of Original transaction not found.
-
Submit an
authorization
orsale
transaction using a uniqueid
attribute. -
Submit a queryTransaction using the id attribute value from Step 2 as the value for the <origId> element and the <origActionType> element set to the transaction type you submitted in Step 2.
Verify that you receive a response value of 150 and message of Original transaction found, a <matchCount>
value of 1, and the response message for the transaction submitted in Step 2, as a child of the <result_Max10>
element.
-
Submit a second
authorization
orsale
transaction (use the same transaction type as Step 2), using the same value for theid
attribute. Note: If you use a sale transaction for this test, you must change the credit card number from the one you used in Step 2 to avoid having the transaction flagged as a duplicate. -
Submit a
queryTransaction
using theid
attribute value from Step 2 as the value for the<origId>
element and the<origActionType>
element set to the transaction type you submitted in Step 2.
Verify that you receive a response value of 150 and message of Original transaction found, a <matchCount>
value of 2, and the response messages for the transactions submitted in Steps 2 and 4, as a children of the <result_Max10>
element.
-
Submit an
authorization
orsale
transaction using a value of error_id for theid
attribute. -
Submit a
queryTransaction
using error_id for theorigId
value.
Verify that you receive a response value of 152 and message
of Original transaction found but response not yet available, a <matchCount>
value of 1, and the <queryTransactionUnavailableResponse>
element as a child of the <result_Max10>
element.