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.

  1. Submit a queryTransaction with the following elements:

  • <origId>newTransaction</origId> (Note: You can use any value never used as an id 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.

  1. Submit an authorization or sale transaction using a unique id attribute.

  2. 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.

  1. Submit a second authorization or sale transaction (use the same transaction type as Step 2), using the same value for the id 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.

  2. 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 2, and the response messages for the transactions submitted in Steps 2 and 4, as a children of the <result_Max10> element.

  1. Submit an authorization or sale transaction using a value of error_id for the id attribute.

  2. Submit a queryTransaction using error_id for the origId 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.