Upgraded the Stripe SDK from v78 to v83 in go.mod and go.sum, and
updated
all code references to match the new API. Refactored session creation to
use the new method signatures and types. Adjusted tests and
documentation
to reflect the updated dependency and API usage.
Introduced LoggerMiddleware for HTTP request logging. Refactored handler
methods to return http.HandlerFunc for improved composability. Updated
route registration and tests to use new handler signatures.
Refactor JavaScript to use querySelector for robustness. Update HTML
form to use POST method and correct script loading. Fix message div
syntax for better accessibility and compatibility.
Add .air.toml for live reload development with Air. Update Makefile to
include a 'dev' target that starts Air with custom cache directories.
Improve .gitignore to exclude 'tmp' directory used by Air.
Refactor frontend JS to use querySelector for robustness. Update HTML
template to fix form method, script loading, and message div syntax.
c
Refactored web server to move route registration into a dedicated method
and extracted static CSS into its own file for better maintainability.
Updated HTML template to use external stylesheet and improved JS code
style consistency. This enhances separation of concerns and prepares
for easier future asset management.
- Integrate Stripe Go SDK and implement a checkout service for creating
Stripe Checkout sessions for a demo product.
- Add request/response types for checkout sessions.
- Create HTTP handler for /api/checkout to initiate sessions via POST.
- Provide comprehensive unit tests for Stripe client and web handler.
- Wire Stripe-backed endpoint in server setup.