update payment method, remove stripe, paypal, amanapay
Build & Push / Pipeline Tests (push) Failing after 59s
Build & Push / Build & Push Docker Image (push) Has been skipped
Test / Type Check (all packages) (push) Failing after 48s
Test / API Unit Tests (push) Has been skipped
Test / Homepage Unit Tests (push) Has been skipped
Test / Carplace Unit Tests (push) Has been skipped
Test / Admin Unit Tests (push) Has been skipped
Test / Dashboard Unit Tests (push) Has been skipped
Test / API Integration Tests (push) Has been skipped
Build & Push / Pipeline Tests (push) Failing after 59s
Build & Push / Build & Push Docker Image (push) Has been skipped
Test / Type Check (all packages) (push) Failing after 48s
Test / API Unit Tests (push) Has been skipped
Test / Homepage Unit Tests (push) Has been skipped
Test / Carplace Unit Tests (push) Has been skipped
Test / Admin Unit Tests (push) Has been skipped
Test / Dashboard Unit Tests (push) Has been skipped
Test / API Integration Tests (push) Has been skipped
This commit is contained in:
@@ -163,10 +163,6 @@ Open `.env.docker.production` and fill in every value. The minimum required secr
|
||||
| `MAIL_USERNAME` | Gmail address used to send transactional mail |
|
||||
| `MAIL_PASSWORD` | Gmail app password, not the normal Google account password |
|
||||
| `PGMANAGE_DOMAIN` | Hostname for pgManage, e.g. `pgmanage.rentaldrivego.ma` |
|
||||
| `STRIPE_API_KEY` | Live Stripe secret key or restricted key for production billing (`sk_live_` or `rk_live_`) |
|
||||
| `STRIPE_WEBHOOK_SECRET` | Stripe webhook signing secret for `/api/v1/subscriptions/webhooks/stripe` (`whsec_`) |
|
||||
|
||||
Direct production script runs require Stripe billing by default. If you need to deploy production before Stripe is ready, set `STRIPE_BILLING_REQUIRED=false` in the production env file. Gitea Actions deploys default this flag to `false` when the `STRIPE_BILLING_REQUIRED` secret is unset; set the secret to `true` when CI should fail unless live Stripe keys are configured. The app will still start with Stripe disabled, but Stripe subscription checkout and Stripe webhooks will remain unavailable until live Stripe keys are configured.
|
||||
|
||||
For Gitea Actions deploys, either store the completed production env file as the raw `ENV_DOCKER_PRODUCTION` secret or as the base64-encoded `ENV_DOCKER_PRODUCTION_B64` secret:
|
||||
|
||||
@@ -176,10 +172,6 @@ base64 < .env.docker.production | tr -d '\n'
|
||||
|
||||
Paste that single-line output into `ENV_DOCKER_PRODUCTION_B64` when using the base64 option. During deploy, the workflow writes the env file to `/opt/rentaldrivego/.env.docker.production` on the VPS with `600` permissions before running `scripts/docker-prod-deploy.sh`. If neither production env secret is set, the workflow reuses `/opt/rentaldrivego/.env.docker.production` when it already exists on the VPS.
|
||||
|
||||
You can also store `STRIPE_API_KEY` and `STRIPE_WEBHOOK_SECRET` as separate Gitea Actions secrets. When those secrets are present, the deploy workflow overwrites the Stripe values from `ENV_DOCKER_PRODUCTION`/`ENV_DOCKER_PRODUCTION_B64` before deploying. This is useful when the production env file secret still contains placeholders for billing secrets.
|
||||
|
||||
If `/opt/rentaldrivego/.env.docker.production` already exists on the VPS and a newly supplied env-file secret omits `STRIPE_API_KEY` or `STRIPE_WEBHOOK_SECRET`, the deploy workflow preserves the existing VPS values for those keys. Final production validation still fails if the merged env file does not contain a live `sk_live_`/`rk_live_` key and a `whsec_` webhook signing secret.
|
||||
|
||||
Production now derives `DATABASE_URL` inside the app container from `POSTGRES_HOST`, `POSTGRES_PORT`, `POSTGRES_DB`, `POSTGRES_USER`, and `POSTGRES_PASSWORD` when `DATABASE_URL_FROM_POSTGRES=true`. That avoids Prisma auth failures when the database password contains reserved URL characters such as `@`, `:`, or `/`.
|
||||
|
||||
The example file uses `rentaldrivego.ma` for the carplace and public site. The dashboard and admin panel are routed under that same host at `/dashboard` and `/admin`.
|
||||
|
||||
+11
-11
@@ -2,7 +2,7 @@
|
||||
|
||||
## Platform Model
|
||||
|
||||
**Rental Companies (B2B)** — pay RentalDriveGoa subscription (AmanPay or PayPal), get:
|
||||
**Rental Companies (B2B)** — pay RentalDriveGo a subscription via manual bank transfer or check, get:
|
||||
- A fully private dashboard (zero data overlap with any other company)
|
||||
- Fleet management with vehicle photo upload (photos auto-appear on global carplace)
|
||||
- Promotional offers management
|
||||
@@ -16,16 +16,16 @@
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ Payment Providers — Stripe Has Been Removed
|
||||
## Payment Model — Manual Bank Transfer and Check Only
|
||||
|
||||
| Provider | Purpose |
|
||||
|----------|---------|
|
||||
| **AmanPay** (amanpay.net) | Primary. National/international cards, cash (3000+ points), e-wallet. Moroccan PCI-DSS Level-1 PSP. |
|
||||
| **PayPal** | Secondary. Global coverage. |
|
||||
All subscription and rental payments are recorded manually:
|
||||
|
||||
**Two payment contexts:**
|
||||
1. Company pays RentalDriveGosubscription → RentalDriveGo's own AmanPay/PayPal account
|
||||
2. Renter pays company for rental → Company's own AmanPay merchant + PayPal account (direct, no intermediary)
|
||||
| Context | Methods |
|
||||
|---------|---------|
|
||||
| **Company subscription billing** | Bank transfer or check via manual checkout and payment submissions |
|
||||
| **Rental payments (dashboard)** | Bank transfer or check recorded against reservations |
|
||||
|
||||
Online checkout providers (Stripe, AmanPay, PayPal) have been removed from the platform.
|
||||
|
||||
---
|
||||
|
||||
@@ -85,8 +85,8 @@ See **`docs/design/README.md`** for what changed during the production-readiness
|
||||
|
||||
| Concern | Technology |
|
||||
|---------|-----------|
|
||||
| Subscription payment | AmanPay (primary) + PayPal (secondary) |
|
||||
| Rental payment | Company's own AmanPay merchant + PayPal |
|
||||
| Subscription payment | Manual bank transfer or check |
|
||||
| Rental payment | Manual bank transfer or check |
|
||||
| PDF generation | `@react-pdf/renderer` — server-side, on-demand, never stored |
|
||||
| Damage diagrams | SVG top-down car map (22 zones, React interactive + PDF static render) |
|
||||
| Insurance | Per-company configurable policies with per-day/flat/% charge types |
|
||||
|
||||
@@ -119,7 +119,7 @@ Additional options:
|
||||
| Field | Options |
|
||||
|---|---|
|
||||
| Billing period | Monthly / Annual |
|
||||
| Primary provider | AmanPay / PayPal |
|
||||
| Subscription payment | Bank transfer or check |
|
||||
|
||||
Currency is fixed to **MAD**.
|
||||
|
||||
@@ -178,8 +178,7 @@ POST /api/v1/auth/company/signup
|
||||
"preferredLanguage": "en | fr | ar",
|
||||
"plan": "STARTER | GROWTH | PRO",
|
||||
"billingPeriod": "MONTHLY | ANNUAL",
|
||||
"currency": "MAD",
|
||||
"paymentProvider": "AMANPAY | PAYPAL"
|
||||
"currency": "MAD"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -213,7 +212,7 @@ Navigate to `/en/light/sign-in`. Enter the owner email and the password set duri
|
||||
After first sign-in, the user is directed to the **onboarding** page (`/onboarding`) where they can:
|
||||
|
||||
1. **Step 1 — Company profile**: Set display name, tagline, brand color, and public location.
|
||||
2. **Step 2 — Payments**: Configure AmanPay merchant ID / PayPal email and carplace listing preference.
|
||||
2. **Step 2 — Payments**: Review that rental payments are recorded as bank transfer or check, then set carplace listing preference.
|
||||
3. **Step 3 — Completion**: Redirect to the dashboard home.
|
||||
|
||||
### Subscription
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
# Manual Subscription Payment Plan
|
||||
|
||||
**Methods:** Bank transfer and check
|
||||
**Existing online method:** Stripe remains available
|
||||
**Scope:** Platform subscription payments, not rental-reservation/customer payments
|
||||
**Status:** Implementation proposal based on the supplied code archive
|
||||
**Revision:** 1.3 — adds company-driven Arabic, English, and French communication policy
|
||||
**Status:** Historical design note. Stripe was later removed; subscription billing is bank transfer and check only.
|
||||
|
||||
## 1. Target outcome
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ Until then, the accurate label remains **capable beta / pre-scale**, not product
|
||||
| Domain depth | Prisma: fleet, reservations, billing, payments, notifications, collections, admin |
|
||||
| API shape | Express modular monolith |
|
||||
| Auth / tenancy | JWT actors, HttpOnly cookies, admin 2FA, company middleware, subscription gates |
|
||||
| Payments foundation | Stripe / PayPal / AmanPay; webhook signature verify; `WebhookEvent` |
|
||||
| Payments foundation | Manual bank transfer and check for subscription and rental billing; `WebhookEvent` retained for other inbound webhooks |
|
||||
| Upload validation | Magic bytes + MIME + size limits |
|
||||
| Deploy intent | Compose + Traefik configs, backup/restore scripts present |
|
||||
|
||||
@@ -127,7 +127,7 @@ flowchart LR
|
||||
| Session cookies HttpOnly / Secure / SameSite | `sessionCookies.ts` |
|
||||
| Hashed company API keys (legacy plaintext removed) | Hardening reports + schema |
|
||||
| Upload magic-byte validation | `http/upload` |
|
||||
| Payment webhook signatures | Stripe / PayPal / AmanPay paths |
|
||||
| Payment webhook signatures | Online payment webhooks removed; remaining webhooks still verify signatures |
|
||||
| Forwarded-header scrubbing by default | `sanitizeForwardedHeaders` unless `TRUSTED_FORWARD_HEADERS=true` |
|
||||
| Site payment redirect allowlist | `assertAllowedPaymentRedirect` in `site.service.ts` |
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|--------|---------|-----------------|
|
||||
| `JWT_SECRET` | API token signing | Invalidates existing employee/admin/renter sessions |
|
||||
| Company API keys | Partner/Carplace integrations | Per-company reissue via admin/API |
|
||||
| Payment provider webhooks | Stripe/PayPal/AmanPay | Update dashboard + env together |
|
||||
| DB / Redis passwords | Compose / managed services | Coordinated restart |
|
||||
| Object storage keys | S3/MinIO driver | Dual-key period preferred |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user