Transaction
-
public class
Transaction
Transaction related informations Setting the fields is only relevant when sending the data to the terminal, and conversely, getting the fields is only relevant when receiving this object from the terminal.
A word on subtotals. In North America, we automatically calculate the subtotal by subtracting tax and gratuity from the total amount, but leaving donation amounts included.
Methods
create
-
public static Transaction
create
()
Factory method to create Transaction instance
getAcquirerId
-
public String
getAcquirerId
()
Get the ID for the acquirer if available, otherwise returns null.
getAcquirerMerchantId
-
public String
getAcquirerMerchantId
()
Get the acquirer’s merchant ID if available, otherwise returns null.
getAcquirerTerminalId
-
public String
getAcquirerTerminalId
()
Get the acquirer’s terminal ID if available, otherwise returns null
getAllowsKeyedEntry
-
public boolean
getAllowsKeyedEntry
()
Refer to setAllowsKeyedEntry(booleanallowsKeyedEntry)
getAmount
-
public Decimal
getAmount
()
The total amount of the transaction to be paid by the customer as a GAAP-standard BigDecimal. This amount may change throughout the transaction depending on basket modifications, discounts, offers, or other interactions by other applications. This is required.
getBasket
-
public Basket
getBasket
()
The basket currently associated with the transaction. The actual object may update over time as it is changed through the AIDL communications with the service and updated by the Basket Manager, but the contents will stay intact.
getCashierDisplayName
-
public String
getCashierDisplayName
()
The display name of the cashier, to be used when printing the receipt or otherwise displaying cashier information. This is optional.
getCashierId
-
public String
getCashierId
()
The ID of the cashier that is starting the current session. This is optional.
getCustomerEmail
-
public String
getCustomerEmail
()
The email address of the customer. This may be added during or after the transaction. This is optional.
getCustomerLanguage
-
public String
getCustomerLanguage
()
The language of the customer. This may be added during or after the transaction. This is optional.
getCustomerPhoneNumber
-
public String
getCustomerPhoneNumber
()
The phone number of the customer. This may be added during or after the transaction. This is optional.
getDonationAmount
-
public Decimal
getDonationAmount
()
The total donation amount as a GAAP-standard BigDecimal. This amount may change throughout the transaction depending on basket modifications, discounts, offers, or other interactions by other applications. This is optional.
getGatewayMerchantId
-
public String
getGatewayMerchantId
()
Get the gateway’s merchant ID if available, otherwise returns null
getGatewayTerminalId
-
public String
getGatewayTerminalId
()
Get the gateway’s terminal ID if available, otherwise returns null.
getGratuityAmount
-
public Decimal
getGratuityAmount
()
The total tip/gratuity amount as a GAAP-standard BigDecimal. This amount may change throughout the transaction depending on basket modifications, discounts, offers, or other interactions by other applications. This is optional.
getInvoiceId
-
public String
getInvoiceId
()
The ID of the invoice. This is generated by the system if not provided, and cannot be changed. The Invoice is an abstract structure containing relevant transactions, a basket, and payments.
getKeyedEntryPromptOptions
-
public ArrayList<KeyedEntryPromptOption>
getKeyedEntryPromptOptions
()
Refer to setKeyedPromptOptions(KeyedEntryPromptOption[]promptOptions)
getLane
-
public String
getLane
()
The ID of the lane for this device. This is optional.
getPayments
-
public ArrayList<Payment>
getPayments
()
The payments applied to the transaction amount in the order they are initiated. This will update throughout the transaction, as the payment application may handle multiple tenders, or other applications may contribute alternate forms of payment.
getReferenceTransaction
-
public Transaction
getReferenceTransaction
()
A reference transaction. Generally useful in the case of VOID_TYPE
or PRE_AUTHORISATION_COMPLETION_TYPE
, include the original transaction as the reference transaction for voiding or completing.
getReferenceTransactionId
-
public String
getReferenceTransactionId
()
The ID of a referenced transaction. Generally useful in the case of VOID_TYPE
or PRE_AUTHORISATION_COMPLETION_TYPE
, referencing the original transaction as the reference transaction for voiding or completing.
getShiftId
-
public int
getShiftId
()
The shift ID provided for this session.
getTaxAmount
-
public Decimal
getTaxAmount
()
The total tax amount applied as a GAAP-standard BigDecimal. This amount may change throughout the transaction depending on basket modifications, discounts, offers, or other interactions by other applications. This is optional.
getVenue
-
public String
getVenue
()
The ID of the venue. This is optional.
setAcquirerId
-
public void
setAcquirerId
(String acquirerId)
Set the ID for the acquirer if available
setAcquirerMerchantId
-
public void
setAcquirerMerchantId
(String merchantId)
Set the acquirer’s merchant ID if available
setAcquirerTerminalId
-
public void
setAcquirerTerminalId
(String terminalId)
Set the acquirer’s terminal ID if available
setAllowsKeyedEntry
-
public void
setAllowsKeyedEntry
(boolean allowsKeyedEntry)
Determines if the payment application on the terminal will accept keyed entry of card data for payment. Defaults to false. This is required if keyed entry is desired for a specific payment.
setAmountTotals
-
public void
setAmountTotals
(AmountTotals amountTotals)
Allows updating all of the totals at once. If null, resets the amounts back to their default values.
setCashierDisplayName
-
public void
setCashierDisplayName
(String displayName)
The display name of the cashier, to be used when printing the receipt or otherwise displaying cashier information. This is optional.
setCashierId
-
public void
setCashierId
(String cashierId)
Refer to getCashierId().
setCurrency
-
public void
setCurrency
(String currency)
The base currency for the transaction. This value should not change after the transaction is started. This is required.
setCustomerEmail
-
public void
setCustomerEmail
(String email)
The email address of the customer. This may be added during or after the transaction. This is optional.
setCustomerLanguage
-
public void
setCustomerLanguage
(String language)
The language of the customer. This may be added during or after the transaction. This is optional.
setCustomerPhoneNumber
-
public void
setCustomerPhoneNumber
(String phoneNumber)
The phone number of the customer. This may be added during or after the transaction. This is optional.
setGatewayMerchantId
-
public void
setGatewayMerchantId
(String merchantId)
Set the gateway’s merchant ID if available
setGatewayTerminalId
-
public void
setGatewayTerminalId
(String terminalId)
Set the gateway’s terminal ID if available
setInvoiceId
-
public void
setInvoiceId
(String invoiceId)
The ID of the invoice. This is generated by the system if not provided, and cannot be changed. The Invoice is an abstract structure containing relevant transactions, a basket, and payments.
setKeyedEntryPromptOptions
-
public void
setKeyedEntryPromptOptions
(ArrayList<KeyedEntryPromptOption> promptOptions)
Sets the prompt options desired when keying-in the card information. Meaningful only when allowsKeyedEntry is true.
setLane
-
public void
setLane
(String lane)
The ID of the lane for this device. This is optional
setPayments
-
public void
setPayments
(ArrayList<Payment> payments)
See getPayments();
setReferenceTransactionId
-
public void
setReferenceTransactionId
(String transactionId)
The ID of a referenced transaction. Generally useful in the case of VOID_TYPE
or PRE_AUTHORISATION_COMPLETION_TYPE
, referencing the original transaction as the reference transaction for voiding or completing.
setShiftId
-
public void
setShiftId
(int shiftId)
Set shift id. This is optional.
setTransactionId
-
public void
setTransactionId
(String transactionId)
Deprecated. Please use setInvoiceId()
instead.
setVenue
-
public void
setVenue
(String venue)
The ID of the venue. This is optional.
Download this documentation
Verifone Confidential
This documentation is protected by law from any form of duplication unless
prior permission is obtained from the officers of Verifone.
Verifone Payment SDK
v3.55.5