feat: add Stripe checkout, order persistence, and webhook handling
Stripe-hosted Checkout integration with full order lifecycle: - stripity_stripe ~> 3.2 with sandbox/prod config via env vars - Order and OrderItem schemas with price snapshots at purchase time - CheckoutController creates pending order then redirects to Stripe - StripeWebhookController verifies signatures and confirms payment - Success page with real-time PubSub updates from webhook - Shop flash messages for checkout error feedback - Cart cleared after successful payment Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -112,4 +112,13 @@ if config_env() == :prod do
|
||||
# config :swoosh, :api_client, Swoosh.ApiClient.Req
|
||||
#
|
||||
# See https://hexdocs.pm/swoosh/Swoosh.html#module-installation for details.
|
||||
|
||||
# Stripe payment processing
|
||||
config :stripity_stripe,
|
||||
api_key:
|
||||
System.get_env("STRIPE_SECRET_KEY") ||
|
||||
raise("Missing STRIPE_SECRET_KEY environment variable"),
|
||||
signing_secret:
|
||||
System.get_env("STRIPE_WEBHOOK_SECRET") ||
|
||||
raise("Missing STRIPE_WEBHOOK_SECRET environment variable")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user