Implementacion Inicial SumUP

This commit is contained in:
adevopg
2025-03-02 17:37:33 +01:00
parent 34eec87bf2
commit 6365624e25
9 changed files with 193 additions and 3 deletions
+9
View File
@@ -0,0 +1,9 @@
<!DOCTYPE html>
{% include 'partials/head.html' %}
{% include 'partials/header.html' %}
{% include 'partials/video.html' %}
{% include 'partials/pago_sumup.html' %}
{% include 'partials/social.html' %}
{% include 'partials/footer.html' %}
{% include 'partials/final.html' %}
+32
View File
@@ -0,0 +1,32 @@
<!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>
{% else %}
<div id="sumup-card"></div>
<script>
SumUpCard.mount({
checkoutId: "{{ checkout_id }}",
onResponse: function (type, body) {
if (type === 'success') {
alert("Pago exitoso. ID de transacción: " + body.transaction_code);
console.log("Pago exitoso:", body);
} else if (type === 'error') {
alert("Error en el pago: " + body.message);
console.error("Error en el pago:", body);
}
}
});
</script>
{% endif %}
</body>
</html>