Pass `currency` to Stripe checkout for first-time buyers so Stripe picks the matching `currency_options` rate configured on the Price in the Dashboard (multi-currency Prices: one Price, per-currency unit_amount). Operator configures the rates on existing Prices prod_UaZ0xCpCboUGCN/price_*; this commit is the application-side signal. Currency precedence: explicit request body > Cloudflare cf-ipcountry header > Accept-Language locale > GBP fallback. Only honoured when the user has no stripe_customer_id yet — Stripe locks currency to the customer record at first checkout, so existing customers keep their original currency (they can switch via the portal). Adds 4 tests: sniffed currency on new customer, body override beats sniff, currency omitted for existing customer, and unit-tests for the sniffing fallback chain. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| api.py | ||
| auth.py | ||
| chat.py | ||
| email.py | ||
| ops.py | ||
| pages.py | ||
| polar_webhook.py | ||
| public.py | ||
| stripe_billing.py | ||
| sync.py | ||
| ticker_validate.py | ||
| universe.py | ||