GooglePayInitParams constructor
- @JsonSerializable(explicitToJson: true)
const
GooglePayInitParams(
{ - required String merchantName,
- required String countryCode,
- @Default(false) bool testEnv,
- BillingAddressConfig? billingAddressConfig,
- @Default(false) bool isEmailRequired,
- @Default(true) bool existingPaymentMethodRequired,
- String? label,
- double? amount,
})
Implementation
@JsonSerializable(explicitToJson: true)
const factory GooglePayInitParams({
/// Merchant name
required String merchantName,
/// ISO country code of the merchant
required String countryCode,
/// Flag to use test environment or live environment.
@Default(false) bool testEnv,
/// Configuration regarding collection of billing address,
BillingAddressConfig? billingAddressConfig,
/// Flag to indicate wheter Google Pay should collect email of the customer.
@Default(false) bool isEmailRequired,
/// When `true` Google Pay is considered ready if the customers's Google Pay
/// wallet has existing payment methods.
@Default(true) bool existingPaymentMethodRequired,
/// An optional label to display with the amount. Google Pay may or may not display this label depending on its own internal logic. Defaults to a generic label if none is provided.
String? label,
/// An optional amount to display for setup intents. Google Pay may or may not display this amount depending on its own internal logic. Defaults to 0 if none is provided.
double? amount,
}) = _GooglePayInitParams;