Tienda Battlepay: pago de órdenes pendientes vía Stripe

Reutiliza la infraestructura Stripe (sin depender de SumUp/credenciales externas):
- lib/battlepay.ts: getPendingOrders/getPendingOrder/markOrderPaid sobre
  acore_auth.battlepay_orders (PENDING->PAID, el mod-battlepay entrega en juego).
- fulfill.ts: rama battlepay (metadata.battlepay_reference -> markOrderPaid),
  idempotente vía el claim atómico compartido con el webhook.
- API POST /api/battlepay/pay (valida orden PENDING de la cuenta, crea checkout).
- UI: /battlepay (lista + pagar) y /battlepay-success (entrega compartida),
  enlace "Tienda" en la cabecera para usuarios logueados.
- i18n es/en: namespace Battlepay + Nav.store.

Verificado: build OK, /battlepay 307->login, API 401 sin sesión, success 200.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-13 01:12:12 +00:00
parent 00c03d84e1
commit f721aac7e5
9 changed files with 268 additions and 2 deletions
+15 -1
View File
@@ -12,7 +12,8 @@
"language": "Language",
"forum": "Forums",
"vote": "Vote",
"recruit": "Recruit"
"recruit": "Recruit",
"store": "Store"
},
"Home": {
"brand": "Nova WoW",
@@ -422,5 +423,18 @@
"linkText": "link text",
"quoteText": "quote",
"listItem": "item"
},
"Battlepay": {
"title": "Store (Battlepay)",
"intro": "Pay your pending in-game store purchases here. They are delivered in-game automatically.",
"noOrders": "You have no pending purchases.",
"reference": "Reference",
"pay": "Pay",
"redirecting": "Redirecting…",
"paidOk": "Payment confirmed! Your purchase will be delivered in-game.",
"alreadyPaid": "This purchase was already paid.",
"backToStore": "Back to the store",
"orderNotFound": "Order not found or already processed.",
"genericError": "An error occurred. Please try again."
}
}