← all projects

pay-sheet

A drop-in Jetpack Compose payment sheet: card input with Luhn + card-brand detection, tokenization, a 3-D-Secure-style step-up state machine, PCI-conscious notes.

View on GitHub ↗Kotlinupdated 4d ago

KotlinComposePCI

High-level design

A self-contained Compose module a host app can drop in without touching raw card data itself.

card input

Luhn check + brand detection as the user types

tokenization client

raw PAN never leaves this module — only a token crosses the boundary

step-up state machine

models the 3-D-Secure-style challenge flow as explicit states

Low-level design

11 tests, plus a sample app exercising the full flow end to end.

  • Card number is redacted in every log line by construction — the type itself refuses a raw toString()
  • Step-up flow is a sealed class state machine, not boolean flags standing in for state