GooglePayRequest

class GooglePayRequest @JvmOverloads constructor(var currencyCode: String, var totalPrice: String, var totalPriceStatus: GooglePayTotalPriceStatus, var isEmailRequired: Boolean = false, var isPhoneNumberRequired: Boolean = false, var isBillingAddressRequired: Boolean = false, var billingAddressFormat: GooglePayBillingAddressFormat? = GooglePayBillingAddressFormat.MIN, var isShippingAddressRequired: Boolean = false, var shippingAddressParameters: GooglePayShippingAddressParameters? = null, var allowPrepaidCards: Boolean = false, var isPayPalEnabled: Boolean = true, var googleMerchantName: String? = null, var countryCode: String? = null, var totalPriceLabel: String? = null, var allowCreditCards: Boolean = true, environment: String? = null, allowedPaymentMethods: MutableMap<String, String> = HashMap(), tokenizationSpecifications: MutableMap<String, String> = HashMap(), allowedAuthMethods: MutableMap<String, String> = HashMap(), allowedCardNetworks: MutableMap<String, String> = HashMap()) : Parcelable

Represents the parameters that are needed to use the Google Pay API.

Constructors

Link copied to clipboard
constructor(currencyCode: String, totalPrice: String, totalPriceStatus: GooglePayTotalPriceStatus, isEmailRequired: Boolean = false, isPhoneNumberRequired: Boolean = false, isBillingAddressRequired: Boolean = false, billingAddressFormat: GooglePayBillingAddressFormat? = GooglePayBillingAddressFormat.MIN, isShippingAddressRequired: Boolean = false, shippingAddressParameters: GooglePayShippingAddressParameters? = null, allowPrepaidCards: Boolean = false, isPayPalEnabled: Boolean = true, googleMerchantName: String? = null, countryCode: String? = null, totalPriceLabel: String? = null, allowCreditCards: Boolean = true, environment: String? = null, allowedPaymentMethods: MutableMap<String, String> = HashMap(), tokenizationSpecifications: MutableMap<String, String> = HashMap(), allowedAuthMethods: MutableMap<String, String> = HashMap(), allowedCardNetworks: MutableMap<String, String> = HashMap())

Properties

Link copied to clipboard

Defaults to true.

Link copied to clipboard

Defaults to false. Settrue prepaid cards are allowed.

Link copied to clipboard
Link copied to clipboard

The ISO 3166-1 alpha-2 country code where the transaction is processed. This is required for merchants based in European Economic Area (EEA) countries. NOTE: to support Elo cards, country code must be set to "BR"

Link copied to clipboard

Required. The ISO 4217 alphabetic currency code of the transaction.

Link copied to clipboard

Optional. The merchant name that will be presented in Google Pay

Link copied to clipboard

Optional. Settrue if the buyer's billing address is required to be returned, false` otherwise.

Link copied to clipboard

Optional. Settrue if the buyer's email address is required to be returned, false otherwise.

Link copied to clipboard

Defaults to true. Allows PayPal to be a payment method in Google Pay.

Link copied to clipboard

Optional. Set true if the buyer's phone number is required to be returned as part of the billing address and shipping address, false otherwise.

Link copied to clipboard

Optional. Set true if the buyer's shipping address is required to be returned, false otherwise.

Link copied to clipboard

Optional. The shipping address requirements.

Link copied to clipboard

Required. The total price of this transaction in format: 0-9+(\.0-9)? (ex: "12.34")

Link copied to clipboard

Optional. Custom label for the total price within the display items

Link copied to clipboard

Required. The GooglePayTotalPriceStatus status of the transaction's total price.

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
Link copied to clipboard
fun setAllowedAuthMethods(paymentMethodType: String, authMethods: JSONArray)

Simple wrapper to configure the GooglePayRequest's allowedAuthMethods

Link copied to clipboard
fun setAllowedCardNetworks(paymentMethodType: String, cardNetworks: JSONArray)

Simple wrapper to configure the GooglePayRequest's cardNetworks

Link copied to clipboard
fun setAllowedPaymentMethod(paymentMethodType: String, parameters: JSONObject)

Simple wrapper to assign given parameters to specified paymentMethod

Link copied to clipboard
fun setEnvironment(environment: String?)
Link copied to clipboard
fun setTokenizationSpecificationForType(paymentMethodType: String, parameters: JSONObject)

Simple wrapper to configure the GooglePayRequest's tokenizationSpecification

Link copied to clipboard

Assemble all declared parts of a GooglePayRequest to a JSON string for use in making requests against Google

Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)