SecureCreditCardForm

fun SecureCreditCardForm(fieldSpacing: Dp, modifier: Modifier = Modifier, fieldModifier: Modifier = Modifier, showPostalCodeField: Boolean = true, textStyle: TextStyle = LocalTextStyle.current, colors: TextFieldColors = TextFieldDefaults.outlinedTextFieldColors(), shape: Shape = MaterialTheme.shapes.small, walletEnvironment: Int? = WalletConstants.ENVIRONMENT_TEST, labelFactory: @Composable (String) -> Unit = { Text(it) }, saveCardCheckbox: @Composable ((Boolean) -> Unit) -> Unit? = null, textFieldPadding: PaddingValues = TextFieldDefaults.outlinedTextFieldPadding(), onValidCreditCardInfo: (CardBrand, CreditCardInfo?) -> Unit)

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

Parameters

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.

walletEnvironment

The environment for OCR detection, should be a WalletConstants.ENVIRONMENT_* value.

labelFactory

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

saveCardCheckbox

The composable function used to render the save card checkbox.

textFieldPadding

The padding to be applied to the input fields.

onValidCreditCardInfo

The callback function triggered when valid credit card information is provided. It provides the detected card brand and credit card info as parameters. Will be null if internal validation fails.