I have built PayPulse, a feature-rich credit card input web application featuring live 3D card preview, automatic flip for CVV, real-time card type detection, Luhn algorithm checksum validation, and satisfying micro-interactions.
🌟 Key Features Built:
-
Interactive 3D Card Preview Engine:
- 3D Flip Mechanism: Card smoothly rotates 180° along the Y-axis when the CVV input is focused or when clicking the "Flip for CVV" button.
- Mouse 3D Parallax & Glare: Dynamic specular lighting and 3D tilt effect that responds to mouse cursor movement.
- Back Side Details: Features magnetic stripe, signature strip with debossed handwritten styling, CVV code highlight, and holographic security seal.
- Masking & Theme Customizer: Toggle card number masking (
•••) and switch between 8 custom card styles (Midnight Platinum, Titanium Matte, Cyberpunk Neon, Ocean Sapphire, 24K Gold, Emerald VIP, Carbon Fiber, Rose Quartz).
-
Smart Card Type Detection:
- Automatic regex pattern matching for Visa, Mastercard, American Express, Discover, JCB, Diners Club, UnionPay, Maestro, and Elo.
- Adjusts number length rules, CVV length requirement (3 digits vs 4 digits for AMEX), and gap formatting (e.g.
4-4-4-4 vs 4-6-5 for AMEX).
-
Expiry Formatting & Auto-Advancing Focus:
- Formats
MM/YY with automatic slash insertion.
- Automatically advances input focus from Month → Year → CVV as fields are completed.
- Validates past expiry dates and invalid month entries (
01-12).
-
Satisfying Validation States & Feedback:
- Luhn Algorithm Check: Performs MOD 10 checksum verification on card numbers with an interactive tooltip explaining the standard.
- Progress Satisfaction Meter: Animated visual completion bar tracking form readiness (0% → 100%).
- Micro-Animations & Audio: Error shake animations on invalid fields, and Web Audio API synthesized tactile sound feedback (clicks, flip sounds, success arpeggios, error buzzes).
- Confetti Particle Burst: Celebratory confetti explosion upon successful payment authorization.
-
Quick Fill Test Card Presets:
- 1-Click test data loader for rapid testing of Visa, Mastercard, AMEX, Discover, Failing Luhn Checksum cards, and Expired cards.
-
Saved Cards Digital Wallet:
- Persists cards in
localStorage with options to copy formatted details, assign nicknames, or reload cards into the form.
-
E-Commerce Checkout Simulator & Digital Receipt:
- Includes order summary breakdown, tax calculations, promo code application (
SAVE20 or VIP50), and digital receipt modal with printable view and copyable transaction references.
-
Camera OCR Scanner Simulation:
- Interactive camera viewfinder modal with animated scanning laser beam that simulates scanning a credit card.
Files built: index.html, src/index.css, src/types/card.ts, src/utils/cardUtils.ts, src/components/CreditCard3D.tsx, src/components/CreditCard3D.tsx,replacement:, src/components/TestCardPresets.tsx, src/components/CardForm.tsx, src/components/CardWallet.tsx, src/components/CheckoutSimulator.tsx, src/components/CameraScannerModal.tsx, src/App.tsx