Config

data class Config @JvmOverloads constructor(environment: Environment, companyName: String, companyCountryCode: String, existingPaymentMethodRequired: Boolean, emailRequired: Boolean, phoneNumberRequired: Boolean, addressFormat: Config.AddressFormat)

Google Pay Configuration class

Constructors

Config
Link copied to clipboard
fun Config(environment: Environment, companyName: String, companyCountryCode: String = "US", existingPaymentMethodRequired: Boolean = true, emailRequired: Boolean = false, phoneNumberRequired: Boolean = false, addressFormat: Config.AddressFormat = AddressFormat.Min)

Creates a new Config instance

Types

AddressFormat
Link copied to clipboard
enum AddressFormat : Enum<Config.AddressFormat>

Billing address fields required to complete the transaction

Properties

addressFormat
Link copied to clipboard
val addressFormat: Config.AddressFormat

The address format required to complete the transaction

companyCountryCode
Link copied to clipboard
val companyCountryCode: String

The default company country code This can be overridden in GooglePayContext if there are store locations in multiple countries

companyName
Link copied to clipboard
val companyName: String

The company name displayed on the Google Pay sheet This can be overridden in GooglePayContext if the displayed name needs to change based on the store location

emailRequired
Link copied to clipboard
val emailRequired: Boolean = false

Whether or not an email address is required to process the transaction. Default value is false

environment
Link copied to clipboard
val environment: Environment

The environment Google Pay will be run in

existingPaymentMethodRequired
Link copied to clipboard
val existingPaymentMethodRequired: Boolean = true

If true, Google Pay is considered ready if the customer's Google Pay Wallet has existing payment methods. Default value is true

phoneNumberRequired
Link copied to clipboard
val phoneNumberRequired: Boolean = false

Whether or not a phone number is required to process the transaction. Default value is false