- Add Stripe payment provider with Checkout Session flow - Payment provider abstraction layer (EasyPay + Stripe unified interface) - Stripe webhook with proper raw body handling and signature verification - Frontend: Stripe button with URL validation, anti-duplicate click, noopener - Active timeout cancellation: query platform before expiring, recover paid orders - Singleton Stripe client, idempotency keys, Math.round for amounts - Handle async_payment events, return null for unknown webhook events - Set Checkout Session expires_at aligned with order timeout - Add cancelPayment to provider interface (Stripe: sessions.expire, EasyPay: no-op) - Enable stripe in frontend payment type list
29 lines
645 B
YAML
29 lines
645 B
YAML
services:
|
|
app:
|
|
build: .
|
|
ports:
|
|
- '${APP_PORT:-3001}:3000'
|
|
env_file: .env
|
|
environment:
|
|
- DATABASE_URL=postgresql://sub2apipay:${DB_PASSWORD:-password}@db:5432/sub2apipay
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
db:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_USER: sub2apipay
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-password}
|
|
POSTGRES_DB: sub2apipay
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'pg_isready -U sub2apipay']
|
|
interval: 5s
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
pgdata:
|