diff --git a/backend/src/billing/billing.service.ts b/backend/src/billing/billing.service.ts index cff791a..757bd9d 100644 --- a/backend/src/billing/billing.service.ts +++ b/backend/src/billing/billing.service.ts @@ -348,6 +348,11 @@ export class BillingService { if (!si.id || si.amount_paid <= 0) return; const storeId = await this.storeIdForCustomer(String(si.customer)); if (!storeId) { + // Inscription en ligne : la facture peut arriver avant checkout.session.completed. + // Erreur → Stripe renverra l'événement une fois le magasin créé (facture jamais perdue). + const subId = typeof si.subscription === 'string' ? si.subscription : si.subscription?.id; + const signupId = subId ? (await this.stripe.subscriptions.retrieve(subId)).metadata.signupId : undefined; + if (signupId) throw new Error(`Facture ${si.id} : inscription ${signupId} pas encore finalisée, réessai`); this.logger.warn(`Facture Stripe ${si.id} : client ${si.customer} inconnu`); return; } diff --git a/backend/src/main.ts b/backend/src/main.ts index c23dcb8..a760ad7 100644 --- a/backend/src/main.ts +++ b/backend/src/main.ts @@ -39,6 +39,9 @@ async function bootstrap() { .split(',') .map((s) => s.trim()) .filter(Boolean); + // Inscription et espace du Dirigeant sont servis par le site public (WEB_URL) : toujours autorisé. + const web = config.get('webUrl'); + if (origins.length && web && !origins.includes(web)) origins.push(web); app.enableCors({ origin: origins.length ? origins : false, credentials: true }); // Pages clients : toujours sur le domaine public (WEB_URL). Un ancien lien // api.monespacepro.eu/c/… (affichette déjà imprimée) est redirigé, pas servi. diff --git a/site-src/build.js b/site-src/build.js index 43220bf..06aa43a 100644 --- a/site-src/build.js +++ b/site-src/build.js @@ -159,7 +159,14 @@ function transform(file, body) { body = body.replace(COOKIE_RE, ''); body = body.replace(' diff --git a/site/abonnement/merci/index.html b/site/abonnement/merci/index.html index cbc82e4..8f13b50 100644 --- a/site/abonnement/merci/index.html +++ b/site/abonnement/merci/index.html @@ -73,7 +73,7 @@ Fonctionnalités Tarif FAQ -Demander une démo +Commencer diff --git a/site/cgv/index.html b/site/cgv/index.html index 8e92b93..7e6dacc 100644 --- a/site/cgv/index.html +++ b/site/cgv/index.html @@ -72,7 +72,7 @@ Fonctionnalités Tarif FAQ -Demander une démo +Commencer diff --git a/site/comment-ca-marche/index.html b/site/comment-ca-marche/index.html index 7ce2a72..a3d540f 100644 --- a/site/comment-ca-marche/index.html +++ b/site/comment-ca-marche/index.html @@ -72,7 +72,7 @@ Fonctionnalités Tarif FAQ -Demander une démo +Commencer @@ -152,7 +152,7 @@

Prêt à démarrer l’étape 1 ?

Demandez une démo, nous vous répondons par e-mail.

- +
diff --git a/site/confidentialite/index.html b/site/confidentialite/index.html index 5e560f7..b95299f 100644 --- a/site/confidentialite/index.html +++ b/site/confidentialite/index.html @@ -72,7 +72,7 @@ Fonctionnalités Tarif FAQ -Demander une démo +Commencer diff --git a/site/contact/index.html b/site/contact/index.html index 9d82c69..bf9dbaf 100644 --- a/site/contact/index.html +++ b/site/contact/index.html @@ -72,7 +72,7 @@ Fonctionnalités Tarif FAQ -Demander une démo +Commencer diff --git a/site/faq/index.html b/site/faq/index.html index 96b372a..d5cb86d 100644 --- a/site/faq/index.html +++ b/site/faq/index.html @@ -72,7 +72,7 @@ Fonctionnalités Tarif FAQ -Demander une démo +Commencer diff --git a/site/fonctionnalites/index.html b/site/fonctionnalites/index.html index f7370e5..a290ae3 100644 --- a/site/fonctionnalites/index.html +++ b/site/fonctionnalites/index.html @@ -72,7 +72,7 @@ Fonctionnalités Tarif FAQ -Demander une démo +Commencer @@ -204,7 +204,7 @@

Envie de le voir en vrai ?

Nous vous montrons l’app et la carte en démo.

- +
diff --git a/site/index.html b/site/index.html index 9b23e85..b00a398 100644 --- a/site/index.html +++ b/site/index.html @@ -72,7 +72,7 @@ Fonctionnalités Tarif FAQ -Demander une démo +Commencer @@ -87,7 +87,7 @@

La carte de fidélité, directement dans le téléphone de vos clients.

Vos clients scannent un QR code au comptoir et ajoutent votre carte à leur Wallet en quelques secondes. Rien à installer pour eux, un tarif clair pour vous.

-Équiper mon commerce +Équiper mon commerce Voir comment ça marche
@@ -238,7 +238,7 @@

À partir de

19 €

par mois et par magasin

-Équiper mon commerce +Équiper mon commerce
diff --git a/site/tarif/index.html b/site/tarif/index.html index 3c2f65e..baa3fe3 100644 --- a/site/tarif/index.html +++ b/site/tarif/index.html @@ -72,7 +72,7 @@ Fonctionnalités Tarif FAQ -Demander une démo +Commencer @@ -271,7 +271,7 @@

On démarre ?

Écrivez-nous, nous vous envoyons le lien d’abonnement.

- +