0fef9ac35b
- pagos_sumup.py: crear_checkout_battlepay(reference,...) y obtener_checkout() - battlepay_view: lista las órdenes PENDING de la cuenta de juego - battlepay_pay_view: crea checkout SumUp para una orden concreta (checkout_reference=reference) - sumup_webhook: marca la orden PAID (valida estado contra la API de SumUp si falta) - plantillas account/battlepay.html y partials/pago_sumup.html - sql/battlepay_sumup.sql (tablas battlepay_orders/battlepay_price) y docs actualizados Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
39 lines
1.2 KiB
HTML
39 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="es">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Pago con SumUp</title>
|
|
<script src="https://gateway.sumup.com/gateway/ecom/card/v2/sdk.js"></script>
|
|
</head>
|
|
<body>
|
|
<h1>Pago con SumUp</h1>
|
|
|
|
{% if error %}
|
|
<p style="color: red;">Error: {{ error }}</p>
|
|
<p><a href="battlepay">Volver a mis compras</a></p>
|
|
{% else %}
|
|
{% if product_name %}
|
|
<p>Producto: <strong>{{ product_name }}</strong></p>
|
|
<p>Importe: <strong>{{ price_eur }} €</strong></p>
|
|
{% endif %}
|
|
<div id="sumup-card"></div>
|
|
|
|
<script>
|
|
SumUpCard.mount({
|
|
checkoutId: "{{ checkout_id }}",
|
|
onResponse: function (type, body) {
|
|
if (type === 'success') {
|
|
alert("Pago exitoso. El producto se entregará en el juego en breve.");
|
|
window.location = "battlepay";
|
|
} else if (type === 'error') {
|
|
alert("Error en el pago: " + body.message);
|
|
console.error("Error en el pago:", body);
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
<p><a href="battlepay">Cancelar y volver</a></p>
|
|
{% endif %}
|
|
</body>
|
|
</html>
|