PaymentData | Doclava
public final class

PaymentData

extends Object
implements Parcelable AutoResolvableResult
java.lang.Object
   ↳ com.google.android.gms.wallet.PaymentData

Class Overview

Parcelable representing a payment data response, which contains the necessary payment result to complete the payment. See the available fields for more information.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<PaymentData> CREATOR
Public Methods
CardInfo getCardInfo()
String getEmail()
static PaymentData getFromIntent(Intent intent)
Gets the PaymentData stored in the given Intent extra.
PaymentMethodToken getPaymentMethodToken()
Gets the token representing the payment method selected by the buyer for a transaction tokenized according to PaymentMethodTokenizationParameters passed with corresponding PaymentDataRequest.
UserAddress getShippingAddress()
void putIntoIntent(Intent intent)
Saves the current PaymentData instance as an extra in the given Intent.
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable
From interface com.google.android.gms.wallet.AutoResolvableResult

Fields

public static final Creator<PaymentData> CREATOR

Public Methods

public CardInfo getCardInfo ()

Returns
CardInfo info about the card used in the transaction.

public String getEmail ()

Returns
String the buyer's email if requested.

public static PaymentData getFromIntent (Intent intent)

Gets the PaymentData stored in the given Intent extra.

Use this method to extract PaymentData from the Intent received in onActivityResult(int, int, Intent).

Parameters
intent Intent

Returns
PaymentData

public PaymentMethodToken getPaymentMethodToken ()

Gets the token representing the payment method selected by the buyer for a transaction tokenized according to PaymentMethodTokenizationParameters passed with corresponding PaymentDataRequest.

Returns
PaymentMethodToken the payment method token.

public UserAddress getShippingAddress ()

Returns
UserAddress the buyer's shipping address if requested.

public void putIntoIntent (Intent intent)

Saves the current PaymentData instance as an extra in the given Intent.

Parameters
intent Intent

public void writeToParcel (Parcel dest, int flags)

Parameters
dest Parcel

flags int