Public Member Functions | |
String | getName () |
AppendReceiptRequest (@NonNull @ReceiptType String type, @NonNull String htmlContent) | |
void | setContent (@NonNull String htmlContent) |
String | getContent () |
void | setType (@NonNull @ReceiptType String type) |
void | setType (@ReceiptTypeFromReceipt int type) |
String | getType () |
![]() | |
String | getMessageType () |
Static Public Attributes | |
static final String | NAME = "CP_APP_REQUESTS_APPEND_RECEIPT" |
static final String | TYPE_CARD_HOLDER_RECEIPT_FOOTER = "CARDHOLDER_RECEIPT_FOOTER" |
static final String | TYPE_MERCHANT_RECEIPT_FOOTER = "MERCHANT_RECEIPT_FOOTER" |
![]() | |
static final String | MESSAGE_NAME_PREFIX = "CP_APP_" |
Protected Member Functions | |
void | setHandle (@NonNull String handle) |
void | setCpAppId (String cpAppId) |
void | setCpAppVersion (String cpAppVersion) |
String | getAsJsonString () |
void | populateMessageFromJson (@NonNull JSONObject jsonObject) |
![]() | |
void | populateMessageFromJson (@NonNull final JSONObject jsonObject) |
String | getAsJsonString () |
String | getCpAppId () |
String | getCpAppVersion () |
Additional Inherited Members |
An API call to add data to the receipt footer. This can only be called within the context of a transaction, and should be called in response to a trigger before the transaction ends, generally in response to com.verifone.commerce.triggers.PaymentCompletedNotification.
This is currently abstract. in order to append to the receipt before this class is finally made concrete, please follow the instructions below in response to the PaymentCompletedNotification.
When the notification is received, the app has 1-2 seconds to create the footer information and send it back. In the sample code below, the phrase "Have a nice day!" will be appended to the bottom of the receipt.
To append an image, the image data must be inserted inline to an HTML img tag using the data URL scheme, as defined at https://tools.ietf.org/html/rfc2397. More information can be found at https://en.wikipedia.org/wiki/Data_URI_scheme#HTML, with an example below.
CP API 4.3.0
Definition at line 53 of file AppendReceiptRequest.java.
AppendReceiptRequest | ( | @NonNull @ReceiptType String | type, |
@NonNull String | htmlContent | ||
) |
Creates the API request to send.
type | Refer to setType(String type) |
htmlContent | Refer to setContent(String htmlContent) |
Definition at line 164 of file AppendReceiptRequest.java.
String getContent | ( | ) |
Refer to setContent(String htmlContent)
Definition at line 181 of file AppendReceiptRequest.java.
String getType | ( | ) |
Refer to setType(String type)
Definition at line 210 of file AppendReceiptRequest.java.
void setContent | ( | @NonNull String | htmlContent | ) |
Expects HTML data to append to the receipt.
Definition at line 173 of file AppendReceiptRequest.java.
void setType | ( | @NonNull @ReceiptType String | type | ) |
Sets the type of receipt to modify.
Definition at line 188 of file AppendReceiptRequest.java.
|
static |
The system name of the message.
Definition at line 60 of file AppendReceiptRequest.java.
|
static |
The receipt presented to the customer.
Definition at line 64 of file AppendReceiptRequest.java.
|
static |
The receipt retained by the merchant.
Definition at line 68 of file AppendReceiptRequest.java.
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.