EditCreditCardForm

fun EditCreditCardForm(initialFullName: String, initialPostalCode: String, initialExpiryMonth: String, initialExpiryYear: String, fieldSpacing: Dp, modifier: Modifier = Modifier, fieldModifier: Modifier = Modifier, showPostalCodeField: Boolean = true, textStyle: TextStyle = LocalTextStyle.current, colors: TextFieldColors = TextFieldDefaults.outlinedTextFieldColors(), shape: Shape = MaterialTheme.shapes.small, labelFactory: @Composable (String) -> Unit = { Text(it) }, textFieldPadding: PaddingValues = TextFieldDefaults.outlinedTextFieldPadding(), onCreditCardInfo: (PartialCreditCardInfo?) -> Unit)

Composable function that creates a secure credit card input form for collecting credit card information.

Parameters

initialFullName

The initial value for the full name input field.

initialPostalCode

The initial value for the postal code input field.

initialExpiryMonth

The initial value for the expiry month input field.

initialExpiryYear

The initial value for the expiry year input field.

fieldSpacing

The vertical spacing between the input fields.

modifier

The modifier for the entire credit card form.

fieldModifier

The modifier for individual input fields.

showPostalCodeField

Whether or not to show the postal code input field.

textStyle

The text style to be applied to the input fields.

colors

The colors customization for the input fields.

shape

The shape customization for the input fields.

labelFactory

The composable function used to render the labels for input fields. Takes a hint string as a parameter.

textFieldPadding

The padding to be applied to the input fields.

onCreditCardInfo

The callback function triggered when valid credit card information is provided. Will be null if internal validation fails.