PaymentData

public final class PaymentData extends AbstractSafeParcelable
implements AutoResolvableResult

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

Inherited Constant Summary

Field Summary

public static final Creator<PaymentData> CREATOR

Public Method Summary

CardInfo
String
Bundle
static PaymentData
getFromIntent(Intent intent)
Gets the PaymentData stored in the given Intent extra.
String
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
void
putIntoIntent(Intent intent)
Saves the current PaymentData instance as an extra in the given Intent.
void
writeToParcel(Parcel dest, int flags)

Inherited Method Summary

Fields

public static final Creator<PaymentData> CREATOR

Public Methods

public CardInfo getCardInfo ()

Returns
  • info about the card used in the transaction.

public String getEmail ()

Returns
  • the buyer's email if requested.

public Bundle getExtraData ()

Returns
  • Additional payment data pertaining to the transaction.

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).

public String getGoogleTransactionId ()

Returns
  • The unique ID assigned to this payment transaction by Google.

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.

public UserAddress getShippingAddress ()

Returns
  • the buyer's shipping address if requested.

public void putIntoIntent (Intent intent)

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

public void writeToParcel (Parcel dest, int flags)