Generaliza los servicios de personaje de pago (5) con infra común

- lib/paid-services.ts: config PAID_SERVICES (rename/customize/change-race/
  change-faction/level-up) con comando SOAP, precio y productName por servicio.
- app/api/character/[service]/checkout: ruta de checkout GENÉRICA (valida servicio +
  personaje, crea la sesión Stripe con successUrl /service-success?service=...).
- app/[locale]/service-success: página de éxito ÚNICA que verifica el pago
  (claimPaidCheckout) y ejecuta el comando SOAP del servicio.
- components/ServicePageContent: contenido común (guardas + PaidServiceForm).
- 5 páginas mínimas /rename /customize /change-race /change-faction /level-up.
- Catálogo Paid (por servicio: title/pay/success) sustituye a Rename.

Verificado: 5 páginas redirigen a login, checkout 401 sin sesión, servicio inválido
404, service-success con pago inválido no entrega (muestra error). Pendiente: gold
(cantidad) y transfer (destino+token), variantes del patrón.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-12 23:25:57 +00:00
parent e7cff56954
commit 87f9b0b003
11 changed files with 224 additions and 51 deletions
+27 -8
View File
@@ -136,13 +136,32 @@
"soapError": "Server communication error. Please try again later.",
"genericError": "Something went wrong. Please try again later."
},
"Rename": {
"title": "Rename character",
"pay": "Rename for {price} €",
"successTitle": "Rename character",
"success": "Character {name} has been flagged for rename. The change will apply on next login.",
"error": "The operation could not be completed. If you were charged, contact support.",
"invalidCharacter": "Select a valid character.",
"stripeError": "Could not start the payment. Please try again later."
"Paid": {
"rename": {
"title": "Rename character",
"pay": "Rename for {price} €",
"success": "Character {name} has been flagged for rename (applies on next login)."
},
"customize": {
"title": "Customize character",
"pay": "Customize for {price} €",
"success": "Character {name} has been flagged for customization."
},
"change-race": {
"title": "Change race",
"pay": "Change race for {price} €",
"success": "Character {name} has been flagged for race change."
},
"change-faction": {
"title": "Change faction",
"pay": "Change faction for {price} €",
"success": "Character {name} has changed faction successfully."
},
"level-up": {
"title": "Level up to 80",
"pay": "Level up to 80 for {price} €",
"success": "Character {name} has been leveled to 80."
},
"error": "The operation could not be completed. If you were charged, contact support."
}
}