Show prices in the shop currency (STRIPE_CURRENCY), not hard-coded EUR
formatPrice always formatted EUR, so the public shop, checkout, basket and order confirmation showed € even when Stripe charged another currency. It now takes a currency; both apps pass STRIPE_CURRENCY to the blocks as layout data `currency` (like `timezone`), so one setting drives what Stripe charges and every price shown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qq6FzyGitv5gDZEcCHDGoo
This commit is contained in:
parent
de8d29beb4
commit
e29eaaa8e8
9 changed files with 93 additions and 65 deletions
97
.env.example
97
.env.example
|
|
@ -1,47 +1,50 @@
|
|||
# Secrets read by docker-compose.yml via ${VAR:-} substitution.
|
||||
# Copy to .env at the project root and fill in.
|
||||
|
||||
# Stripe. The secret key and webhook secret go to PocketBase only (the shop
|
||||
# API in pocketbase/pb_hooks); the public app gets just the publishable key.
|
||||
STRIPE_SECRET_KEY=sk_test_...
|
||||
PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
|
||||
STRIPE_WEBHOOK_SECRET=whsec_...
|
||||
STRIPE_CURRENCY=eur
|
||||
|
||||
# Shared by PocketBase and the public app so the public app can record
|
||||
# booking-email status on orders (its only write). Generate a long random
|
||||
# value, e.g.: openssl rand -hex 32
|
||||
INTERNAL_API_SECRET=
|
||||
|
||||
# Booking emails via Brevo's SMTP relay (Brevo → SMTP & API → SMTP).
|
||||
# Leave SMTP_HOST empty in development: emails are then written to the
|
||||
# app logs instead of being sent.
|
||||
# Brevo: smtp-relay.brevo.com
|
||||
SMTP_HOST=
|
||||
# 587 (STARTTLS); use 2525 if your network blocks 587, or 465 for implicit TLS
|
||||
SMTP_PORT=587
|
||||
# The SMTP login Brevo shows (xxxx@smtp-brevo.com), NOT your account email
|
||||
SMTP_USER=
|
||||
# The SMTP key generated in Brevo (not your account password)
|
||||
SMTP_PASS=
|
||||
# Must be a sender on a domain authenticated in Brevo
|
||||
EMAIL_FROM=bookings@example.com
|
||||
EMAIL_FROM_NAME=Eva Shafik
|
||||
# Timezone used for booking times in emails (IANA name)
|
||||
SITE_TIMEZONE=Europe/Oslo
|
||||
|
||||
# Public URLs the browser uses: <URL_SCHEME>://admin.<DOMAIN><URL_PORT>.
|
||||
# They must match the address bar exactly (SvelteKit's form CSRF check).
|
||||
# Local default: http + :8080. Behind a reverse proxy / TLS on 443, e.g.:
|
||||
# URL_SCHEME=https
|
||||
# URL_PORT=
|
||||
# (empty URL_PORT = no port in the URL; leave the line out to get :8080)
|
||||
DOMAIN=localhost
|
||||
URL_SCHEME=http
|
||||
URL_PORT=:8080
|
||||
|
||||
# Caddy scheme for the reverse proxy on port 8080.
|
||||
# http (default) — plain HTTP; matches the ORIGIN vars in docker-compose.yml
|
||||
# https — HTTPS on :8080 (self-signed unless you add a cert issuer;
|
||||
# also update ORIGIN/PUBLIC_* URLs to https://...)
|
||||
CADDY_SCHEME=http
|
||||
# Secrets read by docker-compose.yml via ${VAR:-} substitution.
|
||||
# Copy to .env at the project root and fill in.
|
||||
|
||||
# Stripe. The secret key and webhook secret go to PocketBase only (the shop
|
||||
# API in pocketbase/pb_hooks); the public app gets just the publishable key.
|
||||
STRIPE_SECRET_KEY=sk_test_...
|
||||
PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
|
||||
STRIPE_WEBHOOK_SECRET=whsec_...
|
||||
# Shop currency (ISO 4217, e.g. eur, nok): what Stripe charges in and what
|
||||
# every price on the site, in the admin and in booking emails is shown in.
|
||||
# Item prices are entered in this currency.
|
||||
STRIPE_CURRENCY=eur
|
||||
|
||||
# Shared by PocketBase and the public app so the public app can record
|
||||
# booking-email status on orders (its only write). Generate a long random
|
||||
# value, e.g.: openssl rand -hex 32
|
||||
INTERNAL_API_SECRET=
|
||||
|
||||
# Booking emails via Brevo's SMTP relay (Brevo → SMTP & API → SMTP).
|
||||
# Leave SMTP_HOST empty in development: emails are then written to the
|
||||
# app logs instead of being sent.
|
||||
# Brevo: smtp-relay.brevo.com
|
||||
SMTP_HOST=
|
||||
# 587 (STARTTLS); use 2525 if your network blocks 587, or 465 for implicit TLS
|
||||
SMTP_PORT=587
|
||||
# The SMTP login Brevo shows (xxxx@smtp-brevo.com), NOT your account email
|
||||
SMTP_USER=
|
||||
# The SMTP key generated in Brevo (not your account password)
|
||||
SMTP_PASS=
|
||||
# Must be a sender on a domain authenticated in Brevo
|
||||
EMAIL_FROM=bookings@example.com
|
||||
EMAIL_FROM_NAME=Eva Shafik
|
||||
# Timezone used for booking times in emails (IANA name)
|
||||
SITE_TIMEZONE=Europe/Oslo
|
||||
|
||||
# Public URLs the browser uses: <URL_SCHEME>://admin.<DOMAIN><URL_PORT>.
|
||||
# They must match the address bar exactly (SvelteKit's form CSRF check).
|
||||
# Local default: http + :8080. Behind a reverse proxy / TLS on 443, e.g.:
|
||||
# URL_SCHEME=https
|
||||
# URL_PORT=
|
||||
# (empty URL_PORT = no port in the URL; leave the line out to get :8080)
|
||||
DOMAIN=localhost
|
||||
URL_SCHEME=http
|
||||
URL_PORT=:8080
|
||||
|
||||
# Caddy scheme for the reverse proxy on port 8080.
|
||||
# http (default) — plain HTTP; matches the ORIGIN vars in docker-compose.yml
|
||||
# https — HTTPS on :8080 (self-signed unless you add a cert issuer;
|
||||
# also update ORIGIN/PUBLIC_* URLs to https://...)
|
||||
CADDY_SCHEME=http
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue