How cybersource/cybersource-unified-checkout-sample-java works
This is a Spring Boot/Thymeleaf sample for Cybersource Unified Checkout, with an additional Click to Pay Drop-in UI and payer-authentication/payment-related screens and services. The documented user journey is to open the local checkout page, use the hosted checkout widget, and let the sample invoke Cybersource’s REST client. The README also documents the widget’s handling of payment data and Flex API calls. No source excerpts were provided, so links between local controllers, services, and screens are omitted rather than inferred from filenames.
Main entry points: checkout.html Checkout page · UnifiedCheckoutApplication.java Sample application
Components 21
Web experience
- Sample application
src/main/java/com/cybersource/example/UnifiedCheckoutApplication.java - Checkout page
src/main/resources/templates/checkout.html - Unified Checkout controller
src/main/java/com/cybersource/example/web/UnifiedCheckoutController.java - Click to Pay controller
src/main/java/com/cybersource/example/web/ClickToPayDropInUIController.java - Click to Pay overview
src/main/resources/templates/ctp-drop-in-ui-overview.html - Unified Checkout overview
src/main/resources/templates/uc-overview.html - Authentication setup
src/main/resources/templates/payer-authentication-setup.html - Authentication enrollment
src/main/resources/templates/payer-authentication-enrollment.html - Authentication validation
src/main/resources/templates/payer-authentication-validation.html - Credentials page
src/main/resources/templates/payment-credentials.html - Receipt page
src/main/resources/templates/receipt.html
Checkout services
- Capture context
src/main/java/com/cybersource/example/service/CaptureContextService.java - JWT processing
src/main/java/com/cybersource/example/service/JwtProcessorService.java
Payment services
- Payments
src/main/java/com/cybersource/example/service/PaymentsService.java - Payment credentials
src/main/java/com/cybersource/example/service/PaymentCredentialsService.java - Payer authentication
src/main/java/com/cybersource/example/service/PayerAuthenticationService.java
Request and response models
- Capture context response
src/main/java/com/cybersource/example/domain/CaptureContextResponseBody.java - JWK model
src/main/java/com/cybersource/example/domain/JWK.java
Other components
- Customer
- Hosted checkout widget
- Cybersource services
Connections 4
- Customer → Checkout page: opens
README.md - Checkout page → Hosted checkout widget: embeds
README.md - Hosted checkout widget → Cybersource services: calls Flex API
README.md - Sample application → Cybersource services: invokes REST client
README.md