Skip to content

IA-972:`feat: Invoice paid email notification service and new API path constants`

khadija.elbachouri a demandé de fusionner feature/IA-972 vers develop

MR Description

Summary

Introduces a dedicated notification endpoint for sending invoice payment confirmation emails to parents, backed by a Thymeleaf template resolved from messages.properties. Also adds two new API path constants for email verification flows.

Changes

InvoiceNotificationService (interface)

  • Added sendInvoicePaidEmail() covering all invoice fields: parent info, invoice number, receipt, dates, plan name, card last 4 digits InvoiceNotificationServiceImpl
  • Renders email body via SpringTemplateEngine with a Thymeleaf context populated from all notification fields
  • Resolves template name and subject via ResourceBundleMessageSource (locale-aware)
  • Dispatches via EmailService
  • Validates that parentEmail is non-null and non-blank before proceeding InvoicePaidNotificationRequest (DTO)
  • New request body DTO replacing the old InvoicePaidByCustomerRequest
  • Carries: parentEmail, parentFirstName, invoiceNumber, receiptNumber, invoiceDate, total, downloadUrl, pdfUrl, periodStart, periodEnd, planName, lastFourDigits NotificationController
  • Exposes POST /api/user-management/notifications/invoice-paid
  • Returns 400 if parentEmail is blank, 500 on TechnicalException / FunctionalException ApiPaths
  • Added NOTIFICATION_URL = BASE_URL + "/notifications"
  • Added VERIFY_EMAIL and INITIATE_EMAIL_CHANGE constants messages.properties
  • Added invoicePaidEmailTemplate=invoice-paid-email
  • Added invoicePaidEmailSubject=Votre facture Brainboost - Paiement confirmée
Modification effectuée par khadija.elbachouri

Rapports de requête de fusion