Class CardReceipt
java.lang.Object
com.codename1.payment.terminal.CardReceipt
What a card receipt has to show, as the terminal reported it.
Card schemes require a printed or emailed receipt to carry the application identifier, the application label, the masked card number, how the card was read and the authorization code. Each getter answers null when the terminal did not report that field.
Some terminals compose the whole receipt themselves; those lines are in
getMerchantReceipt() and getCustomerReceipt(), ready to print as
they are. Print those when present -- they carry everything the
acquirer requires, including fields this class does not model.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumHow the card was read.static enumHow the cardholder proved they hold the card. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe EMV application identifier (AID), such asA0000000031010.The EMV application label, such asVISA CREDIT.The issuer's authorization code.getBrand()The card brand as the terminal named it, such asvisa.String[]The customer's copy of the receipt, line by line, as the terminal composed it; null when it composed none.How the card was read; never null.The card number with all but the last four digits hidden, as the terminal formatted it.The merchant's ID at the acquirer (the MID).String[]The merchant's copy of the receipt, line by line, as the terminal composed it; null when it composed none.The terminal's ID at the acquirer (the TID).How the cardholder was verified; never null.setApplicationId(String applicationId) SetsgetApplicationId().setApplicationLabel(String applicationLabel) SetsgetApplicationLabel().setAuthorizationCode(String authorizationCode) SetsgetAuthorizationCode().SetsgetBrand().setCustomerReceipt(String[] lines) SetsgetCustomerReceipt().setEntryMode(CardReceipt.EntryMode entryMode) SetsgetEntryMode().setMaskedPan(String maskedPan) SetsgetMaskedPan().setMerchantId(String merchantId) SetsgetMerchantId().setMerchantReceipt(String[] lines) SetsgetMerchantReceipt().setTerminalId(String terminalId) SetsgetTerminalId().setVerification(CardReceipt.Verification verification) SetsgetVerification().
-
Constructor Details
-
CardReceipt
public CardReceipt()
-
-
Method Details
-
getBrand
The card brand as the terminal named it, such asvisa. -
setBrand
-
getMaskedPan
The card number with all but the last four digits hidden, as the terminal formatted it. -
setMaskedPan
-
getApplicationId
The EMV application identifier (AID), such asA0000000031010. -
setApplicationId
-
getApplicationLabel
The EMV application label, such asVISA CREDIT. -
setApplicationLabel
-
getEntryMode
How the card was read; never null. -
setEntryMode
-
getVerification
How the cardholder was verified; never null. -
setVerification
-
getAuthorizationCode
The issuer's authorization code. -
setAuthorizationCode
-
getTerminalId
The terminal's ID at the acquirer (the TID). -
setTerminalId
-
getMerchantId
The merchant's ID at the acquirer (the MID). -
setMerchantId
-
getMerchantReceipt
The merchant's copy of the receipt, line by line, as the terminal composed it; null when it composed none. -
setMerchantReceipt
-
getCustomerReceipt
The customer's copy of the receipt, line by line, as the terminal composed it; null when it composed none. -
setCustomerReceipt
-