PaymentSheetGooglePay constructor

  1. @JsonSerializable(explicitToJson: true)
const PaymentSheetGooglePay({
  1. required String merchantCountryCode,
  2. String? currencyCode,
  3. @Default(false) bool testEnv,
  4. String? label,
  5. String? amount,
  6. @JsonKey(toJson: PaymentSheetGooglePay.platformButtonTypeToJson) PlatformButtonType? buttonType,
})

Implementation

@JsonSerializable(explicitToJson: true)
const factory PaymentSheetGooglePay({
  ///The two-letter ISO 3166 code of the country of your business, e.g. "US"
  required String merchantCountryCode,

  /// The three-letter ISO 4217 alphabetic currency code, e.g. "USD" or "EUR". Required in order to support Google Pay when processing a Setup Intent.
  String? currencyCode,

  /// Whether or not to use the google pay test environment.  Set to `true` until you have applied for and been granted access to the Production environment.
  @Default(false) bool testEnv,

  /// 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.
  String? amount,

  /// The Google Pay button type to use. Set to "Pay" by default.
  @JsonKey(toJson: PaymentSheetGooglePay.platformButtonTypeToJson)
  PlatformButtonType? buttonType,
}) = _PaymentSheetGooglePay;