PCIFieldState
State holder for PCI-compliant input fields in the payment form. This class manages the state of secure input fields that handle sensitive payment information, ensuring compliance with Payment Card Industry (PCI) security standards.
Security note: PCI field data (card number, CVV, expiration date) is intentionally NOT persisted to the Android Bundle or disk. This means data will be lost on process death. This is the expected behavior to comply with PCI DSS — sensitive card data must never be written to persistent storage.
To preserve PCI field state across configuration changes (e.g., screen rotation), host the PCIFieldState instances in your ViewModel:
class PaymentViewModel : ViewModel() {
val cardNumberState = PCIFieldState.create()
val expirationDateState = PCIFieldState.create()
val securityCodeState = PCIFieldState.create()
}Content copied to clipboard
See also
Types
Link copied to clipboard
object Companion
Factory methods for creating PCIFieldState instances outside of a Composable context.