web-next: change-race/faction/level-up/gold por SumUp + rastreador de misiones
- /change-race-character (3€), /change-faction-character (5€, valida condiciones: sin hermandad/correo/subastas/capitán-arena y oro <= cap por nivel), /level-up-character (10€), /gold-character (oro por correo SOAP). Cada uno borra su ruta antigua y actualiza el link del panel. - SumUp: hook precheck en PaidServiceConfig (condiciones cambio de facción); columna home_stripelog.metadata para campos extra (gold_amount). - /quest-character: rastreador de estado de misiones/cadenas (clase, Hijos de Hodir, misión por ID) en personaje offline; cooldowns por categoría, Turnstile, IDs de misión verificados en wotlkdb 3.3.5a. Tabla home_questsearchhistory. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,9 @@ export function GoldForm({ characters, options }: { characters: CharOption[]; op
|
||||
async function handleSubmit(e: React.FormEvent) {
|
||||
e.preventDefault()
|
||||
if (busy || !character || !amount) return
|
||||
const opt = options.find((o) => String(o.gold_amount) === amount)
|
||||
const price = opt?.price ?? 0
|
||||
if (!window.confirm(`¿Estás seguro de enviar ${amount} de oro a ${character} por ${price} € (SumUp)?`)) return
|
||||
setBusy(true)
|
||||
setError(null)
|
||||
try {
|
||||
@@ -23,12 +26,12 @@ export function GoldForm({ characters, options }: { characters: CharOption[]; op
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
credentials: 'same-origin',
|
||||
body: JSON.stringify({ character, gold_amount: amount }),
|
||||
body: JSON.stringify({ character, gold_amount: amount, provider: 'sumup' }),
|
||||
})
|
||||
const data: { success?: boolean; url?: string } = await res.json()
|
||||
const data: { success?: boolean; url?: string; message?: string } = await res.json()
|
||||
if (data.success && data.url) window.location.href = data.url
|
||||
else {
|
||||
setError(t('genericError'))
|
||||
setError(data.message || t('genericError'))
|
||||
setBusy(false)
|
||||
}
|
||||
} catch {
|
||||
@@ -54,7 +57,7 @@ export function GoldForm({ characters, options }: { characters: CharOption[]; op
|
||||
</select>
|
||||
<br />
|
||||
<button type="submit" className="gold-button" disabled={busy || !character || !amount}>
|
||||
{busy ? t('processing') : tp('gold.buy')}
|
||||
{busy ? t('processing') : tp('gold.send')}
|
||||
</button>
|
||||
</form>
|
||||
<hr />
|
||||
|
||||
Reference in New Issue
Block a user