GooglePayInitParams constructor

  1. @JsonSerializable(explicitToJson: true)
const GooglePayInitParams({
  1. required String merchantName,
  2. required String countryCode,
  3. @Default(false) bool testEnv,
  4. BillingAddressConfig? billingAddressConfig,
  5. @Default(false) bool isEmailRequired,
  6. @Default(true) bool existingPaymentMethodRequired,
  7. String? label,
  8. 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;