Package-level declarations

Types

Link copied to clipboard
data class Amount(val value: Long, val currencyCode: String) : Parcelable

This class represents the long value amount to charge and the currency code of the amount.

Link copied to clipboard

This class converts the fields in a form into a structure as defined by a map.

Link copied to clipboard
class FormController @Inject constructor(formSpec: LayoutSpec, addressResourceRepository: ResourceRepository<AddressRepository>, transformSpecToElement: TransformSpecToElements, viewModelScope: CoroutineScope)

Controller that manages the user interaction with the payment method data collection form. When all fields are reported as complete, completeFormValues emits the valid payment method.

Link copied to clipboard
data class PaymentsColors(val component: Color, val componentBorder: Color, val componentDivider: Color, val onComponent: Color, val subtitle: Color, val textCursor: Color, val placeholderText: Color, val appBarIcon: Color, val materialColors: Colors)
Link copied to clipboard
data class PaymentsComposeShapes(val borderStrokeWidth: Dp, val borderStrokeWidthSelected: Dp, val material: Shapes)
Link copied to clipboard
data class PaymentsShapes(val cornerRadius: Float, val borderStrokeWidth: Float, val borderStrokeWidthSelected: Float)
Link copied to clipboard
Link copied to clipboard
data class PaymentsTypography(val fontWeightNormal: Int, val fontWeightMedium: Int, val fontWeightBold: Int, val fontSizeMultiplier: Float, val xxSmallFontSize: TextUnit, val xSmallFontSize: TextUnit, val smallFontSize: TextUnit, val mediumFontSize: TextUnit, val largeFontSize: TextUnit, val xLargeFontSize: TextUnit, @FontRes val fontFamily: Int?)
Link copied to clipboard
data class PrimaryButtonColors(val background: Color, val onBackground: Color, val border: Color)
Link copied to clipboard
data class PrimaryButtonShape(val cornerRadius: Float, val borderStrokeWidth: Float)
Link copied to clipboard
data class PrimaryButtonStyle(val colorsLight: PrimaryButtonColors, val colorsDark: PrimaryButtonColors, val shape: PrimaryButtonShape, val typography: PrimaryButtonTypography)
Link copied to clipboard
data class PrimaryButtonTypography(@FontRes val fontFamily: Int?, val fontSize: TextUnit)

Functions

Link copied to clipboard
Link copied to clipboard
fun createTextSpanFromTextStyle(text: String?, context: Context, fontSizeDp: Dp, color: Color, @FontRes fontFamily: Int?): SpannableString
Link copied to clipboard
Link copied to clipboard

Base Theme for Payments Composables that are not merchant configurable. Use this theme if you do not want merchant configurations to change your UI

Link copied to clipboard
fun FormUI(hiddenIdentifiers: Set<IdentifierSpec>, enabled: Boolean, elements: List<FormElement>?, lastTextFieldIdentifier: IdentifierSpec?, loadingComposable: @Composable ColumnScope.() -> Unit, modifier: Modifier = Modifier)
fun FormUI(hiddenIdentifiersFlow: Flow<Set<IdentifierSpec>>, enabledFlow: Flow<Boolean>, elementsFlow: Flow<List<FormElement>?>, lastTextFieldIdentifierFlow: Flow<IdentifierSpec?>, loadingComposable: @Composable ColumnScope.() -> Unit, modifier: Modifier = Modifier)
Link copied to clipboard
Link copied to clipboard
fun PaymentsTheme(colors: PaymentsColors = PaymentsTheme.getColors(isSystemInDarkTheme()), shapes: PaymentsShapes = PaymentsTheme.shapesMutable, typography: PaymentsTypography = PaymentsTheme.typographyMutable, content: @Composable () -> Unit)

Base Theme for Payments Composables. CAUTION: This theme is mutable by merchant configurations. You shouldn't be passing colors, shapes, typography to this theme outside of tests.

Properties