Logo
Developer SDK
Version 1.9.632.913d652c-152450467.
Receipt Class Reference
Inheritance diagram for Receipt:
BaseParcel

Public Member Functions

 Receipt (Parcel in, int parcelVersion)
 
void writeToParcel (Parcel dest, int flags)
 
int describeContents ()
 
int getReceiptType ()
 
boolean isLogoIncluded ()
 
boolean hasCustomHeader ()
 
boolean isCashierNameIncluded ()
 
boolean hasCustomFooter ()
 
boolean isOnlineUrlIncluded ()
 
boolean isQrCodeIncluded ()
 
String getOriginalHtml ()
 
Bitmap getOriginalImage ()
 
boolean insertTextAtSection (String text, int receiptSection)
 
PrintJob print (Context context)
 
String getAsHtml ()
 
String getCustomFooter ()
 
String getBusinessInfo ()
 
String getTextAtSection (int receiptSection)
 
String getCustomGreeting ()
 
String getCashierName ()
 
String getTransactionInformation ()
 
String getPaymentInformation ()
 
String getOnlineUrl ()
 
String getFooter ()
 
Bitmap getAsImage ()
 
- Public Member Functions inherited from BaseParcel
 BaseParcel (Parcel in, int parcelVersion)
 
void setParcelVersion (int targetParcelVersion)
 
final int getParcelVersion ()
 
String getClassName ()
 
void writeToParcel (Parcel dest, int flags)
 
int describeContents ()
 

Static Public Attributes

static final int TYPE_CUSTOMER = 0
 
static final int TYPE_MERCHANT = 1
 
static final int DELIVERY_METHOD_PRINT = 1
 
static final int DELIVERY_METHOD_EMAIL = 2
 
static final int DELIVERY_METHOD_SMS = 3
 
static final int DELIVERY_METHOD_NONE = 0
 
static final int SECTION_HTML_HEAD = 0
 
static final int SECTION_BEFORE_GREETING = 1
 
static final int SECTION_AFTER_GREETING = 2
 
static final int SECTION_BEFORE_TRANSACTION = 3
 
static final int SECTION_AFTER_TRANSACTION = 4
 
static final int SECTION_BEFORE_CUSTOM_FOOTER = 5
 
static final int SECTION_AFTER_CUSTOM_FOOTER = 6
 
static final Creator< ReceiptCREATOR
 
- Static Public Attributes inherited from BaseParcel
static final Parcelable.Creator< BaseParcelCREATOR
 

Protected Member Functions

void setReceiptType (int receiptType)
 
void setOriginalHtml (String originalHtml)
 
void setOriginalImage (Bitmap originalImage)
 
void setBusinessInfo (String businessInfo)
 
void setCustomGreeting (String customGreeting)
 
void setCashierName (String cashierName)
 
void setTransactionInformation (@NonNull String transactionInformation)
 
void setPaymentInformation (String paymentInformation)
 
void setFooter (String footer)
 
void setCustomFooter (String customFooter)
 
void setIsLogoIncluded (boolean isLogoIncluded)
 
void setHasCustomHeader (boolean hasCustomHeader)
 
void setIsCashierNameIncluded (boolean isCashierNameIncluded)
 
void setHasCustomFooter (boolean hasCustomFooter)
 
void setIsOnlineUrlIncluded (boolean isOnlineUrlIncluded)
 
void setIsQrCodeIncluded (boolean isQrCodeIncluded)
 

Additional Inherited Members

- Static Protected Member Functions inherited from BaseParcel
static void safelySetParcelVersion (final int targetParcelVersion, @Nullable BaseParcel item)
 
static void safelySetParcelVersion (final int targetParcelVersion, @Nullable List<? extends BaseParcel > items)
 
static< T extends BaseParcel > void safelySetParcelVersion (final int targetParcelVersion, @Nullable T[] items)
 

Detailed Description

Provided as a part of the Payment object when a payment is received. This object cannot be retrieved at a later time, and should be stored if re-printing may be required.

Definition at line 30 of file Receipt.java.

Member Function Documentation

◆ getAsHtml()

String getAsHtml ( )

Returns the final receipt as HTML.

Returns
The HTML-formatted receipt.

Definition at line 383 of file Receipt.java.

◆ getAsImage()

Bitmap getAsImage ( )

Convenience method to return the final receipt, including the newly inserted text.

Returns
The HTML receipt formatted as a PNG Bitmap image.

Definition at line 605 of file Receipt.java.

◆ getBusinessInfo()

String getBusinessInfo ( )

The Business Info section of the receipt, as customized by the merchant in the receipt settings for this venue.

Returns
The HTML-formatted string for this section.

Definition at line 446 of file Receipt.java.

◆ getCashierName()

String getCashierName ( )

The cashier display name, if enabled by the merchant in the receipt settings for this venue.

Returns
The HTML-formatted string for this section.

Definition at line 494 of file Receipt.java.

◆ getCustomFooter()

String getCustomFooter ( )

The footer as defined by the merchant in receipt settings.

Returns
The HTML-formatted string for this section.

Definition at line 435 of file Receipt.java.

◆ getCustomGreeting()

String getCustomGreeting ( )

The Custom Greeting section of the receipt, as customized by the merchant in the receipt settings for this venue.

Returns
The HTML-formatted string for this section.

Definition at line 477 of file Receipt.java.

◆ getFooter()

String getFooter ( )

The footer as modified by other applications in response to the REQUEST_APPEND_RECEIPT API.

Returns
The HTML-formatted string for this section.

Definition at line 570 of file Receipt.java.

◆ getOnlineUrl()

String getOnlineUrl ( )

The mFooter as modified by other applications in response to the REQUEST_APPEND_RECEIPT API. Returns the online URL in an HTML-formatted string, including a QR code image if entered by the merchant.

Definition at line 551 of file Receipt.java.

◆ getOriginalHtml()

String getOriginalHtml ( )

Returns the original HTML of the receipt as received from the payment application.

Returns
The HTML-formatted receipt.

Definition at line 315 of file Receipt.java.

◆ getOriginalImage()

Bitmap getOriginalImage ( )

Convenience method to get the original receipt from the payment application as an image.

Returns
The HTML receipt formatted as a PNG Bitmap image.

Definition at line 332 of file Receipt.java.

◆ getPaymentInformation()

String getPaymentInformation ( )

The payment information, in particular, the EMV fields or other relevant lines necessary for legal compliance, as provided by the payment application.

Returns
The HTML-formatted string for this section.

Definition at line 534 of file Receipt.java.

◆ getReceiptType()

int getReceiptType ( )

The type of receipt, generally either for the customer or for the merchant.

Definition at line 248 of file Receipt.java.

◆ getTextAtSection()

String getTextAtSection ( int  receiptSection)

Allows additional customization of the receipt at specific compliant sections of the receipt.

Parameters
receiptSectionThe receipt section containing the desired text.
Returns
The text contained at the exception, or null if none has been set.

Definition at line 465 of file Receipt.java.

◆ getTransactionInformation()

String getTransactionInformation ( )

The transaction information, including basket, adjustments, offers, donations, taxes, and totals, as provided by the payment application.

Returns
The HTML-formatted string for this section.

Definition at line 516 of file Receipt.java.

◆ hasCustomFooter()

boolean hasCustomFooter ( )

Returns true if the merchant has decided to include a custom mFooter, or false otherwise. Defaults to false.

Definition at line 290 of file Receipt.java.

◆ hasCustomHeader()

boolean hasCustomHeader ( )

Returns true if the merchant has decided to include a custom header, or false otherwise. Defaults to false.

Definition at line 274 of file Receipt.java.

◆ insertTextAtSection()

boolean insertTextAtSection ( String  text,
int  receiptSection 
)

Allows additional customization of the receipt at specific compliant sections of the receipt.

Parameters
textThe HTML-formatted text to include in the section.
receiptSectionThe section within which to include the information.
Returns
True if the insert was successful, or false if it failed. Failure is generally received if the section selected for insert cannot be used due to regional legal reasons.

Definition at line 354 of file Receipt.java.

◆ isCashierNameIncluded()

boolean isCashierNameIncluded ( )

Returns true if the merchant has decided to include the cashier's name, or false otherwise. Defaults to false.

Definition at line 282 of file Receipt.java.

◆ isLogoIncluded()

boolean isLogoIncluded ( )

Returns true if the merchant has decided to include their logo, or false otherwise. Defaults to false.

Definition at line 266 of file Receipt.java.

◆ isOnlineUrlIncluded()

boolean isOnlineUrlIncluded ( )

Returns true if the merchant has decided to include an online url for the receipt, or false otherwise. Defaults to false.

Definition at line 298 of file Receipt.java.

◆ isQrCodeIncluded()

boolean isQrCodeIncluded ( )

Returns true if the merchant has decided to include the QR Code with the online url, or false otherwise. Defaults to false.

Definition at line 306 of file Receipt.java.

◆ print()

PrintJob print ( Context  context)

Convenience method to print the receipt to the default printer.

Returns
The associated PrintJob.

Definition at line 369 of file Receipt.java.

◆ setBusinessInfo()

void setBusinessInfo ( String  businessInfo)
protected

Refer to getBusinessInfo.

Definition at line 453 of file Receipt.java.

◆ setCashierName()

void setCashierName ( String  cashierName)
protected

Refer to getCashierName.

Definition at line 501 of file Receipt.java.

◆ setCustomFooter()

void setCustomFooter ( String  customFooter)
protected

Refer to getCustomFooter.

Definition at line 596 of file Receipt.java.

◆ setCustomGreeting()

void setCustomGreeting ( String  customGreeting)
protected

Refer to getCustomGreeting.

Definition at line 484 of file Receipt.java.

◆ setFooter()

void setFooter ( String  footer)
protected

Refer to getFooter.

Definition at line 577 of file Receipt.java.

◆ setHasCustomFooter()

void setHasCustomFooter ( boolean  hasCustomFooter)
protected

Refer to hasCustomFooter.

Definition at line 640 of file Receipt.java.

◆ setHasCustomHeader()

void setHasCustomHeader ( boolean  hasCustomHeader)
protected

Refer to hasCustomHeader.

Definition at line 626 of file Receipt.java.

◆ setIsCashierNameIncluded()

void setIsCashierNameIncluded ( boolean  isCashierNameIncluded)
protected

Refer to isCashierNameIncluded.

Definition at line 633 of file Receipt.java.

◆ setIsLogoIncluded()

void setIsLogoIncluded ( boolean  isLogoIncluded)
protected

Refer to isLogoIncluded.

Definition at line 619 of file Receipt.java.

◆ setIsOnlineUrlIncluded()

void setIsOnlineUrlIncluded ( boolean  isOnlineUrlIncluded)
protected

Refer to isOnlineUrlIncluded.

Definition at line 647 of file Receipt.java.

◆ setIsQrCodeIncluded()

void setIsQrCodeIncluded ( boolean  isQrCodeIncluded)
protected

Refer to isQrCodeIncluded.

Definition at line 654 of file Receipt.java.

◆ setOriginalHtml()

void setOriginalHtml ( String  originalHtml)
protected

Refer to getOriginalHtml.

Definition at line 322 of file Receipt.java.

◆ setOriginalImage()

void setOriginalImage ( Bitmap  originalImage)
protected

Refer to getOriginalImage.

Definition at line 341 of file Receipt.java.

◆ setPaymentInformation()

void setPaymentInformation ( String  paymentInformation)
protected

Refer to getPaymentInformation.

Definition at line 541 of file Receipt.java.

◆ setReceiptType()

void setReceiptType ( int  receiptType)
protected

Refer to getReceiptType().

Definition at line 255 of file Receipt.java.

◆ setTransactionInformation()

void setTransactionInformation ( @NonNull String  transactionInformation)
protected

Refer to getTransactionInformation.

Definition at line 523 of file Receipt.java.

Member Data Documentation

◆ CREATOR

final Creator<Receipt> CREATOR
static
Initial value:
= new Receipt.ParcelCreator<Receipt>() {
@Override
public Receipt[] newArray(int size) {
return new Receipt[size];
}
@Override
public Receipt createFromParcel(Parcel source) {
BaseParcel createdObject = super.createFromParcel(source);
if (createdObject == null || !Receipt.class.isInstance(createdObject))
return new Receipt(source, getRecommendedParcelVersion());
else
return (Receipt) createdObject;
}
}

Definition at line 89 of file Receipt.java.

◆ DELIVERY_METHOD_EMAIL

final int DELIVERY_METHOD_EMAIL = 2
static

Delivery method for emailing the receipt to the customer.

Definition at line 46 of file Receipt.java.

◆ DELIVERY_METHOD_NONE

final int DELIVERY_METHOD_NONE = 0
static

The customer does not want a receipt.

Definition at line 55 of file Receipt.java.

◆ DELIVERY_METHOD_PRINT

final int DELIVERY_METHOD_PRINT = 1
static

Delivery method for printing the receipt on the default printer.

Definition at line 42 of file Receipt.java.

◆ DELIVERY_METHOD_SMS

final int DELIVERY_METHOD_SMS = 3
static

Delivery method for providing an SMS message to the customer, generally containing a link to an online receipt.

Definition at line 51 of file Receipt.java.

◆ SECTION_AFTER_CUSTOM_FOOTER

final int SECTION_AFTER_CUSTOM_FOOTER = 6
static

The section after the custom mFooter but before any final mFooter text, such as final legal disclaimers.

Definition at line 86 of file Receipt.java.

◆ SECTION_AFTER_GREETING

final int SECTION_AFTER_GREETING = 2
static

The section after the custom greeting but before the cashier name.

Definition at line 69 of file Receipt.java.

◆ SECTION_AFTER_TRANSACTION

final int SECTION_AFTER_TRANSACTION = 4
static

The section after the basket data and payment data but before the online URL.

Definition at line 77 of file Receipt.java.

◆ SECTION_BEFORE_CUSTOM_FOOTER

final int SECTION_BEFORE_CUSTOM_FOOTER = 5
static

The section after the online URL but before the custom mFooter.

Definition at line 81 of file Receipt.java.

◆ SECTION_BEFORE_GREETING

final int SECTION_BEFORE_GREETING = 1
static

The section before the custom greeting but after the business information.

Definition at line 65 of file Receipt.java.

◆ SECTION_BEFORE_TRANSACTION

final int SECTION_BEFORE_TRANSACTION = 3
static

The section before the basket data but after the cashier name.

Definition at line 73 of file Receipt.java.

◆ SECTION_HTML_HEAD

final int SECTION_HTML_HEAD = 0
static

The section inside the head of the html, useful for configuring CSS styles and similar information.

Definition at line 61 of file Receipt.java.

◆ TYPE_CUSTOMER

final int TYPE_CUSTOMER = 0
static

The customer receipt type. This is the default type.

Definition at line 34 of file Receipt.java.

◆ TYPE_MERCHANT

final int TYPE_MERCHANT = 1
static

The merchant receipt type.

Definition at line 38 of file Receipt.java.


The documentation for this class was generated from the following file:

This document is the confidential property of Verifone, Inc. Any reproduction or distribution of this document, in whole or in part, or the disclosure of any of the information contained herein, without the prior written consent of Verifone, Inc. is prohibited. This document and any supplemental material supplied as part of any review must be returned to Verifone, Inc. upon request. Notice: This document may go through material revisions over time. While the Company will make every effort to keep readers updated as changes occur, care must be taken by the reader to make sure they are reading the latest version. Version numbers appear in the title page and revision history page of this document. All rights reserved. Verifone, the Verifone logo are either trademarks or registered trademarks of Verifone in the United States and/or other countries. All other trademarks or brand names are properties of their respective holders.