GooglePayConfig

data class GooglePayConfig(val gateway: String = "example", val gatewayMerchantId: String = "exampleGatewayMerchantId", val merchantName: String = "kmp-toolkit Demo", val countryCode: String = "IN", val currencyCode: String = "INR", val allowedCardNetworks: Set<CardNetwork> = setOf(CardNetwork.VISA, CardNetwork.MASTERCARD, CardNetwork.AMEX, CardNetwork.DISCOVER), val allowedAuthMethods: List<String> = listOf("PAN_ONLY", "CRYPTOGRAM_3DS"), val environment: GooglePayEnvironment = GooglePayEnvironment.TEST)(source)

Everything the Google Pay API needs to describe what this app accepts. Field shape adapted from khalid64927/google-apple-pay's GooglePayConfig (Apache-2.0) — that repo isn't published to Maven Central, so it can't be depended on directly; this is our own implementation using its config shape as a starting point.

The defaults are a genuinely working TEST configuration, not sentinels — Google's own quickstart is explicit that gateway = "example" in ENVIRONMENT_TEST works out of the box. That is the whole reason this gateway ships SANDBOX_READY while :provider:applepay, which cannot be run at all without a paid Apple merchant id, ships KYC_GATED. Production values are registered in provisioning/placeholders.json as GOOGLE_PAY_GATEWAY / GOOGLE_PAY_GATEWAY_MERCHANT_ID.

Constructors

Link copied to clipboard
constructor(gateway: String = "example", gatewayMerchantId: String = "exampleGatewayMerchantId", merchantName: String = "kmp-toolkit Demo", countryCode: String = "IN", currencyCode: String = "INR", allowedCardNetworks: Set<CardNetwork> = setOf(CardNetwork.VISA, CardNetwork.MASTERCARD, CardNetwork.AMEX, CardNetwork.DISCOVER), allowedAuthMethods: List<String> = listOf("PAN_ONLY", "CRYPTOGRAM_3DS"), environment: GooglePayEnvironment = GooglePayEnvironment.TEST)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The payment processor this token will be handed to — "example" is Google's TEST-mode placeholder.

Link copied to clipboard
Link copied to clipboard

False only while a __PROVISION_*__ sentinel is still in place. Unlike Apple Pay there is no format check to add: "example" is a real, working value here, so anything non-sentinel is something the developer chose.

Link copied to clipboard

This config projected onto the shared wallet contract.

Link copied to clipboard