TransactionQuery

public class TransactionQuery

Allows the payment terminal transaction status to be queried. The most recent transaction can always be queried, but the capability checks are extremely important for other types of queries, as the support for these queries will vary between regions and hosts.

Fields

TRANSACTION_QUERY_BY_PAYMENT_CAPABILITY

public static final String TRANSACTION_QUERY_BY_PAYMENT_CAPABILITY

If capable, the setPaymentIds or setPayments can be used to query transactions.

TRANSACTION_QUERY_FILTER_FIELDS_CAPABILITY

public static final String TRANSACTION_QUERY_FILTER_FIELDS_CAPABILITY

If capable, the fields returned can be filtered to a subset

TRANSACTION_QUERY_PAYMENT_ID_BOUNDS_CAPABILITY

public static final String TRANSACTION_QUERY_PAYMENT_ID_BOUNDS_CAPABILITY

If capable, the startPaymentId and endPaymentId can be used to query transactions.

Methods

addPayment

public void addPayment(Payment payment)

Add a specific payment to the query. Refer to setPayments(Collection) for more information.

addPaymentId

public void addPaymentId(String paymentId)

Adds a single payment ID to the list for searching. Refer to setPaymentIds(Collection) for more information.

create

public static TransactionQuery create()

factory methord to create TransactionQuery instance

getCardInformation

public CardInformation getCardInformation()

Refer to setCardInformation(Collection).

getCustomerNote

public String getCustomerNote()

Refer to setCustomerNote(String).

getEndPaymentId

public String getEndPaymentId()

Gets the end PaymentId. Refer to setEndPaymentId(String).

getEndTime

public Long getEndTime()

Gets the end time in milliseconds from Epoch if it is set. Refer to setEndTime(long).

getExpiryEndTime

public Long getExpiryEndTime()

Gets the expiry end time in milliseconds from Epoch if it is set. Refer to setExpiryEndTime(long).

getExpiryStartTime

public Long getExpiryStartTime()

Gets the expiry start time in milliseconds from Epoch if it is set. Refer to setExpiryStartTime(long).

getFieldsToRetrieve

public ArrayList<String> getFieldsToRetrieve()

Refer to setFieldsToRetrieve(Collection).

getLimit

public Integer getLimit()

Refer to setLimit(int).

getMerchantId

public String getMerchantId()

Refer to setMerchantId(String).

getOffset

public Integer getOffset()

Returns the offset set by setOffset. Refer to setOffset(int).

getPaymentIds

public ArrayList<String> getPaymentIds()

Returns the collection of payment IDs. Refer to setPaymentIds(Collection).

getPayments

public ArrayList<Payment> getPayments()

Refer to setPayments(Collection).

getQueryId

public String getQueryId()

A unique identifier for this query.

getReconciliationId

public String getReconciliationId()

Refer to setReconciliationId(String).

getSaleNote

public String getSaleNote()

Refer to setSaleNote(String).

getShiftId

public String getShiftId()

Refer to setShiftId(String).

getStartPaymentId

public String getStartPaymentId()

Gets the start PaymentId. Refer to setStartPaymentId(String).

getStartTime

public Long getStartTime()

Gets the start time in milliseconds from Epoch if it is set. Refer to setStartTime(long).

getTerminalId

public String getTerminalId()

Refer to setTerminalId(String).

getUserId

public String getUserId()

Refer to setUserId(String).

isAllPos

public Boolean isAllPos()

Refer to setAllPos(boolean).

isOffline

public Boolean isOffline()

Refer to setOffline(boolean).

isQueryingLastTransaction

public boolean isQueryingLastTransaction()

Returns true if this is simply retrieving the information on the most recent transaction.

removePayment

public void removePayment(Payment payment)

Remove a specific payment from the query. Refer to setPayments(Collection) for more information.

removePaymentId

public void removePaymentId(String paymentId)

Removes a single payment ID to the list for searching. Refer to setPaymentIds(Collection) for more information.

removePaymentIds

public void removePaymentIds(ArrayList<String> paymentIds)

Remove a specific set of payment IDs from the query. Refer to setPaymentIds(Collection) for more information.

removePayments

public void removePayments(ArrayList<Payment> payments)

Remove a specific set of payments from the query. Refer to setPayments(Collection) for more information.

setAllPos

public void setAllPos(Boolean allPos)

Sets the query to retieve transactions for all POS systems connected to the Payment Application

setCardInformation

public void setCardInformation(CardInformation cardInformation)

Search for a CardInformation with the card number. This can be further modified to help search using various CardInformation properties as well

setCustomerNote

public void setCustomerNote(String customerNote)

Optionally set CustomerNote value for transaction to match.

setEndPaymentId

public void setEndPaymentId(String endPaymentId)

Optionally search ending at a specific payment ID. This can work when the payment ID is a value that increments, otherwise the behavior is undetermined. This must not be used with a collection of payment IDs or payments.

setEndTime

public void setEndTime(Long endTime)

Optionally set an end time in milliseconds from Epoch.

setExpiryEndTime

public void setExpiryEndTime(Long expiryEndTime)

Optionally set a expiry end time in milliseconds from Epoch. Used in pre-auth transactions.

setExpiryStartTime

public void setExpiryStartTime(Long expiryStartTime)

Optionally set a expiry start time in milliseconds from Epoch. Used in pre-auth transactions.

setFieldsToRetrieve

public void setFieldsToRetrieve(ArrayList<String> fieldsToRetrieve)

Allows the results to be filtered to only retrieve a certain subset of fields. This does not guarantee the presence of a specific field, as the query may not be able to provide that field. To add a field for retrieval, use the java.lang.reflect package to get the name of a specific public “getter” field. Example: Transaction.class.getMethod("getInvoiceId").getName()

setLimit

public void setLimit(Integer limit)

Limit the query to only return this many results. A limit of 0 or less means no limit.

setMerchantId

public void setMerchantId(String merchantId)

Optionally set a merchant ID to query the transactions linked to a specific merchant. Merchant ID is acquirer merchant ID.

setOffline

public void setOffline(Boolean offline)

Limits the query to check on transactions that were processed offline, returning their current status.

setOffset

public void setOffset(Integer offset)

Request the query to start at offset. Supported at com.verifone.Constants.SDK_PARCEL_VERSION 14

setPaymentIds

public void setPaymentIds(ArrayList<String> paymentIds)

Search for a collection of payment IDs, only returning results that are contained in this collection. This should not be used with a collection of payments or a start/end payment ID.

setPayments

public void setPayments(ArrayList<Payment> payments)

Search for a collection of payments, only returning results that directly match the payments provided in this collection. This may only use the payment ID to perform the query, or it may perform more extensive checks and searches, depending on the region and the host. This should not be used with a collection of payment IDs or a start/end payment ID.

setQueryingLastTransaction

public void setQueryingLastTransaction(boolean isQueryingLastTransaction)

Sets the query to retrieve only the most recent transaction. This transaction may still be in progress, it is best to check the returned values to determine if the transaction is still being processed or is complete.

setReconciliationId

public void setReconciliationId(String reconciliationId)

Optionally set the reconciliation ID (otherwise known as a batch ID) to get all of the transactions within a batch.

setSaleNote

public void setSaleNote(String saleNote)

Optionally set SaleNote value for transaction to match.

setShiftId

public void setShiftId(String shiftId)

Limits the query to transactions within a specific shift. The shift must be specified when logging in.

setStartPaymentId

public void setStartPaymentId(String startPaymentId)

Optionally search starting at a specific payment ID. This can work when the payment ID is a value that increments, otherwise the behavior is undetermined. This must not be used with a collection of payment IDs or payments.

setStartTime

public void setStartTime(Long startTime)

Optionally set a start time in milliseconds from Epoch.

setTerminalId

public void setTerminalId(String terminalId)

Optionally set a terminal ID to query the transactions linked to a specific terminal. Terminal ID is acquirer terminal ID.

setUserId

public void setUserId(String userId)

Limits the query to transactions linked to a specific user. The user ID must be specified when logging in, or set on the com.verifone.commerce.entities.Transaction object for a session.