IA-972:`feat: Invoice paid email notification service and new API path constants`
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 digitsInvoiceNotificationServiceImpl - Renders email body via
SpringTemplateEnginewith a Thymeleaf context populated from all notification fields - Resolves template name and subject via
ResourceBundleMessageSource(locale-aware) - Dispatches via
EmailService - Validates that
parentEmailis non-null and non-blank before proceedingInvoicePaidNotificationRequest(DTO) - New request body DTO replacing the old
InvoicePaidByCustomerRequest - Carries:
parentEmail,parentFirstName,invoiceNumber,receiptNumber,invoiceDate,total,downloadUrl,pdfUrl,periodStart,periodEnd,planName,lastFourDigitsNotificationController - Exposes
POST /api/user-management/notifications/invoice-paid - Returns
400ifparentEmailis blank,500onTechnicalException/FunctionalExceptionApiPaths - Added
NOTIFICATION_URL = BASE_URL + "/notifications" - Added
VERIFY_EMAILandINITIATE_EMAIL_CHANGEconstantsmessages.properties - Added
invoicePaidEmailTemplate=invoice-paid-email - Added
invoicePaidEmailSubject=Votre facture Brainboost - Paiement confirmée