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

Classes

enum  AuthorizationMethod
 
enum  AuthorizationResult
 
enum  PaymentType
 

Public Member Functions

void setPaymentId (String paymentId)
 
String getPaymentId ()
 
void setLocalPaymentId (String paymentId)
 
String getLocalPaymentId ()
 
String getReferencePaymentId ()
 
void setReferencePaymentId (String referencePaymentId)
 
String getReferenceLocalPaymentId ()
 
void setReferenceLocalPaymentId (String referenceLocalPaymentId)
 
String getInvoice ()
 
void setInvoice (String invoice)
 
String getVenue ()
 
String getLane ()
 
String getCashierId ()
 
void setCashierId (String cashierId)
 
void setPaymentType (PaymentType paymentType)
 
PaymentType getPaymentType ()
 
void setPaymentMethod (String paymentMethod)
 
String getPaymentMethod ()
 
void setAuthorizationMethod (AuthorizationMethod authorizationMethod)
 
AuthorizationMethod getAuthorizationMethod ()
 
void setAuthResult (AuthorizationResult authResult)
 
AuthorizationResult getAuthResult ()
 
void setAuthCode (String authCode)
 
String getAuthCode ()
 
void setAuthResponseText (String authResponseText)
 
String getAuthResponseText ()
 
void setRequestedCardPresentationMethods (CardInformation.PresentationMethod[] requestedCardPresentationMethods)
 
CardInformation.PresentationMethod [] getRequestedCardPresentationMethods ()
 
void setCardInformation (CardInformation cardInformation)
 
CardInformation getCardInformation ()
 
String getAppSpecificData ()
 
void setAppSpecificData (String appSpecificData)
 
void setRequestedPaymentAmount (BigDecimal requestedPaymentAmount)
 
BigDecimal getRequestedPaymentAmount ()
 
void setPaymentAmount (BigDecimal paymentAmount)
 
BigDecimal getPaymentAmount ()
 
void setGratuityAmount (BigDecimal gratuityAmount)
 
BigDecimal getGratuityAmount ()
 
void setTaxAmount (BigDecimal taxAmount)
 
BigDecimal getTaxAmount ()
 
void setCashbackAmount (@NonNull BigDecimal cashbackAmount)
 
BigDecimal getCashbackAmount ()
 
void setRequestedAmountTotals (@Nullable final AmountTotals amountTotals)
 
AmountTotals getRequestedAmountTotals ()
 
void setRedeemedUnits (@NonNull String redeemedUnits)
 
String getRedeemedUnits ()
 
Receipt getReceipt ()
 
Receipt getReceipt (int receiptType)
 
void setSignature (Bitmap signature)
 
Bitmap getSignature ()
 
void setTimestamp (String timestamp)
 
String getTimestamp ()
 
 Payment (Parcel in, int parcelVersion)
 
void setParcelVersion (int targetParcelVersion)
 
void writeToParcel (Parcel dest, int flags)
 
void writeToJson (JSONObject jsonObject) throws JSONException
 
- Public Member Functions inherited from CPBaseParcel
 CPBaseParcel (Parcel in, int parcelVersion)
 
- 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 Creator< PaymentCREATOR
 
- Static Public Attributes inherited from BaseParcel
static final Parcelable.Creator< BaseParcelCREATOR
 

Additional Inherited Members

- Static Public Member Functions inherited from CPBaseParcel
static< CPEntityType extends CPBaseParcel > CPEntityType buildFromCpJson ( @NonNull JSONObject jsonObject, @NonNull Class< CPEntityType > clazz, @Nullable CPEntityType parentObject)
 
- Protected Member Functions inherited from CPBaseParcel
abstract< CPEntityType extends CPBaseParcel > CPEntityType buildFromCpJson ( @NonNull JSONObject jsonObject, @Nullable CPEntityType parentObject)
 
- Static Protected Member Functions inherited from CPBaseParcel
static< CPEntityType extends CPBaseParcel > ArrayList< CPEntityType > buildListFromCpJson ( @NonNull JSONObject jsonObject, @NonNull Class< CPEntityType > clazz, @NonNull String targetJsonAlias)
 
- 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

Represents an individual payment within the context of the transaction. If values like Setting the fields is only relevant when sending the data to the terminal, and conversely, getting the fields is primarily relevant when receiving this object from the terminal.

Definition at line 34 of file Payment.java.

Member Function Documentation

◆ getAppSpecificData()

String getAppSpecificData ( )

Refer to setAppSpecificData(String)

Definition at line 464 of file Payment.java.

◆ getAuthCode()

String getAuthCode ( )

Refer to setAuthCode(String authCode).

Definition at line 396 of file Payment.java.

◆ getAuthorizationMethod()

AuthorizationMethod getAuthorizationMethod ( )

Refer to setAuthorizationMethod(AuthorizationMethod authorizationMethod) for information.

Definition at line 365 of file Payment.java.

◆ getAuthResponseText()

String getAuthResponseText ( )

Refer to setAuthResponseText(String authResponseMessage) for information.

Definition at line 414 of file Payment.java.

◆ getAuthResult()

AuthorizationResult getAuthResult ( )

Refer to setAuthResult(AuthorizationResult authResult) for information.

Definition at line 381 of file Payment.java.

◆ getCardInformation()

CardInformation getCardInformation ( )

Refer to setCardInformation(CardInformation cardInformation) for information.

Definition at line 456 of file Payment.java.

◆ getCashbackAmount()

BigDecimal getCashbackAmount ( )

Refer to setCashbackAmount(BigDecimal cashbackAmount).

Definition at line 552 of file Payment.java.

◆ getCashierId()

String getCashierId ( )

The ID of the cashier, this should be set when the transaction is initiated and may not be changed. This may be empty.

Definition at line 290 of file Payment.java.

◆ getGratuityAmount()

BigDecimal getGratuityAmount ( )

Refer to setGratuityAmount(BigDecimal gratuityAmount).

Definition at line 522 of file Payment.java.

◆ getInvoice()

String getInvoice ( )

The ID of the invoice. This is set when the transaction is initiated and may not be changed. This may be empty.

Definition at line 257 of file Payment.java.

◆ getLane()

String getLane ( )

The ID or name of the current device. This is set when the transaction is initiated and may not be changed. This may be empty.

Definition at line 282 of file Payment.java.

◆ getLocalPaymentId()

String getLocalPaymentId ( )

Refer to setLocalPaymentId(String paymentId).

Definition at line 220 of file Payment.java.

◆ getPaymentAmount()

BigDecimal getPaymentAmount ( )

Refer to setPaymentAmount(BigDecimal paymentAmount) for information.

Definition at line 507 of file Payment.java.

◆ getPaymentId()

String getPaymentId ( )

Refer to setPaymentId(String paymentId).

Definition at line 205 of file Payment.java.

◆ getPaymentMethod()

String getPaymentMethod ( )

Refer to setPaymentMethod(String paymentMethod).

Definition at line 329 of file Payment.java.

◆ getPaymentType()

PaymentType getPaymentType ( )

Refer to setPaymentType(PaymentType paymentType).

Definition at line 312 of file Payment.java.

◆ getReceipt() [1/2]

Receipt getReceipt ( )

Provided by the payment application when the payment is complete. Defaults to providing the customer receipt, but if not available attempts to provide the merchant or next available receipt type.

Definition at line 605 of file Payment.java.

◆ getReceipt() [2/2]

Receipt getReceipt ( int  receiptType)

Get the receipt for a specific type, or null if not present.

Definition at line 630 of file Payment.java.

◆ getRedeemedUnits()

String getRedeemedUnits ( )

Refer to setRedeemedUnits(String redeemedUnits).

Definition at line 595 of file Payment.java.

◆ getReferenceLocalPaymentId()

String getReferenceLocalPaymentId ( )

The local payment ID of the payment that was refunded or voided.

Definition at line 241 of file Payment.java.

◆ getReferencePaymentId()

String getReferencePaymentId ( )

The payment ID of the payment that was refunded or voided.

Definition at line 227 of file Payment.java.

◆ getRequestedAmountTotals()

AmountTotals getRequestedAmountTotals ( )

Creates a new AmountTotals object based off of the current values. See setRequestedAmountTotals(AmountTotals).

Definition at line 576 of file Payment.java.

◆ getRequestedCardPresentationMethods()

CardInformation.PresentationMethod [] getRequestedCardPresentationMethods ( )

Gets the requested card presentation methods.

Returns
The requested card presentation methods

Definition at line 439 of file Payment.java.

◆ getRequestedPaymentAmount()

BigDecimal getRequestedPaymentAmount ( )

Refer to setRequestedPaymentAmount(BigDecimal).

Definition at line 491 of file Payment.java.

◆ getSignature()

Bitmap getSignature ( )

Refer to setSignature(Bitmap signature).

Definition at line 650 of file Payment.java.

◆ getTaxAmount()

BigDecimal getTaxAmount ( )

Refer to setTaxAmount(BigDecimal taxAmount).

Definition at line 536 of file Payment.java.

◆ getTimestamp()

String getTimestamp ( )

Refer to setTimestamp(String timestamp).

Definition at line 664 of file Payment.java.

◆ getVenue()

String getVenue ( )

The ID of the venue. This is set when the transaction is initiated and may not be changed. This may be empty.

Definition at line 274 of file Payment.java.

◆ setAppSpecificData()

void setAppSpecificData ( String  appSpecificData)

Used for specific, regional payment applications to serialize needed data for handling this payment at a later time. If the payment object is stored offline, this field must be saved.

Definition at line 472 of file Payment.java.

◆ setAuthCode()

void setAuthCode ( String  authCode)

The payment Authorization Code usually provided by the payment processing service or acquirer. This may be added during the transaction, but once set should not be changed.

Definition at line 389 of file Payment.java.

◆ setAuthorizationMethod()

void setAuthorizationMethod ( AuthorizationMethod  authorizationMethod)

Means by which the payment is authorized. This is optional.

Definition at line 356 of file Payment.java.

◆ setAuthResponseText()

void setAuthResponseText ( String  authResponseText)

Descriptive text accompanying the authorization code from payment processor. This is usually present when the transaction has failed authorization, providing the reason for the failure. This is optional.

Definition at line 405 of file Payment.java.

◆ setAuthResult()

void setAuthResult ( AuthorizationResult  authResult)

Result of transaction authorization. This is provided by the payment application or payment service provider. This may be empty.

Definition at line 373 of file Payment.java.

◆ setCardInformation()

void setCardInformation ( CardInformation  cardInformation)

If the payment involves a card / contactless, this provides the relevant information. This is provided by the payment application and should not be set. This may be empty.

Definition at line 447 of file Payment.java.

◆ setCashbackAmount()

void setCashbackAmount ( @NonNull BigDecimal  cashbackAmount)

The cashback amount as a GAAP-standard BigDecimal. This is optional. This may also refer to a cash advance amount, based on the payment type.

Definition at line 544 of file Payment.java.

◆ setCashierId()

void setCashierId ( String  cashierId)

Refer to getCashierId().

Definition at line 297 of file Payment.java.

◆ setGratuityAmount()

void setGratuityAmount ( BigDecimal  gratuityAmount)

Gratuity or Tip if applicable as a GAAP-standard BigDecimal. This is optional.

Definition at line 514 of file Payment.java.

◆ setInvoice()

void setInvoice ( String  invoice)

Refer to getInvoice().

Definition at line 264 of file Payment.java.

◆ setLocalPaymentId()

void setLocalPaymentId ( String  paymentId)

This may be assigned by the POS when managing the payment events, and is used for internal tracking. This is automatically generated if not provided.

Definition at line 213 of file Payment.java.

◆ setPaymentAmount()

void setPaymentAmount ( BigDecimal  paymentAmount)

Amount the payment was approved for as a GAAP-standard BigDecimal. This is provided set during the authorization process.

Definition at line 499 of file Payment.java.

◆ setPaymentId()

void setPaymentId ( String  paymentId)

This is set by the gateway/processor in the case of a credit/debit payment, or the alternate payment type provider. For cash payments, this may be set to the local payment ID.

Definition at line 198 of file Payment.java.

◆ setPaymentMethod()

void setPaymentMethod ( String  paymentMethod)

Description of a payment method. This is required for alternate payment providers, but may be empty in the case of a payment process by the terminal payment application.

Definition at line 321 of file Payment.java.

◆ setPaymentType()

void setPaymentType ( PaymentType  paymentType)

The type of payment.

Definition at line 304 of file Payment.java.

◆ setRedeemedUnits()

void setRedeemedUnits ( @NonNull String  redeemedUnits)

Number of units of alternate currency consumed, in the case of an alternate payment type. This is optional.

Definition at line 586 of file Payment.java.

◆ setReferenceLocalPaymentId()

void setReferenceLocalPaymentId ( String  referenceLocalPaymentId)

Refer to getReferenceLocalPaymentId().

Definition at line 248 of file Payment.java.

◆ setReferencePaymentId()

void setReferencePaymentId ( String  referencePaymentId)

Refer to getReferencePaymentId().

Definition at line 234 of file Payment.java.

◆ setRequestedAmountTotals()

void setRequestedAmountTotals ( @Nullable final AmountTotals  amountTotals)

Allows updating all of the totals at once. If null, resets the amounts back to their default values.

Definition at line 560 of file Payment.java.

◆ setRequestedCardPresentationMethods()

void setRequestedCardPresentationMethods ( CardInformation.PresentationMethod []  requestedCardPresentationMethods)

Sets the requested card presentation methods. Valid presentation methods include: CardInformation.PresentationMethod#MAG_STRIPE, CardInformation.PresentationMethod#CHIP, CardInformation.PresentationMethod#CTLS_CARD (note that this will allow any type of CTLS presentation), CardInformation.PresentationMethod#KEYED This is optional and if no presentation methods are requested, by default all card presentation methods supported by the device hardware will be allowed.

Parameters
requestedCardPresentationMethodsThe requested card presentation methods

Definition at line 429 of file Payment.java.

◆ setRequestedPaymentAmount()

void setRequestedPaymentAmount ( BigDecimal  requestedPaymentAmount)

Set the amount for which to request payment. This is primarily used in the cases of multi-tender or completing a partially authorized payment. If not set, the full amount of the transaction will be attempted.

Parameters
requestedPaymentAmount

Definition at line 483 of file Payment.java.

◆ setSignature()

void setSignature ( Bitmap  signature)

Provided by the payment application if the Authorization Method contains Signature. This will be empty for all other Authorization Methods.

Definition at line 642 of file Payment.java.

◆ setTaxAmount()

void setTaxAmount ( BigDecimal  taxAmount)

The tax amount as a GAAP-standard BigDecimal. This is optional.

Definition at line 529 of file Payment.java.

◆ setTimestamp()

void setTimestamp ( String  timestamp)

The timestamp of payment completion. This is provided by the application which processes the payment.

Definition at line 657 of file Payment.java.

Member Data Documentation

◆ CREATOR

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

Definition at line 719 of file Payment.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.