65 lines
3.2 KiB
PHP
65 lines
3.2 KiB
PHP
<?php
|
|
require_once 'includes/header.php';
|
|
|
|
if (!isset($_SESSION['user_id'])) {
|
|
header("Location: login.php");
|
|
exit;
|
|
}
|
|
?>
|
|
<script src="https://js.stripe.com/v3/"></script>
|
|
|
|
<main class="container">
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-6">
|
|
<div class="card text-center shadow-lg">
|
|
<div class="card-header">
|
|
<h2 class="fw-bold">Elige tu método de pago</h2>
|
|
</div>
|
|
<div class="card-body">
|
|
<p>Selecciona cómo te gustaría pagar para activar tu suscripción Premium.</p>
|
|
<div class="d-grid gap-2 my-4">
|
|
<button id="card-payment-btn" class="btn btn-primary btn-lg">Pagar con tarjeta</button>
|
|
<button id="spei-payment-btn" class="btn btn-secondary btn-lg">Pagar con SPEI</button>
|
|
</div>
|
|
|
|
<div id="card-payment-form" class="d-none">
|
|
<h5 class="fw-bold">Pago con Tarjeta</h5>
|
|
<form id="payment-form">
|
|
<div id="card-element" class="form-control mb-3">
|
|
<!-- A Stripe Element will be inserted here. -->
|
|
</div>
|
|
<button id="submit-button" class="btn btn-success w-100">Pagar $180.00 MXN</button>
|
|
<div id="card-errors" role="alert" class="text-danger mt-2"></div>
|
|
</form>
|
|
</div>
|
|
|
|
<div id="spei-info" class="alert alert-info mt-4 d-none">
|
|
<h5 class="fw-bold">Transferencia SPEI</h5>
|
|
<p>Realiza la transferencia a la siguiente CLABE:</p>
|
|
<p class="fw-bold fs-4">058597000079852715</p>
|
|
<p><small>Una vez realizado el pago, envía tu comprobante a <a href="mailto:applesaucetoaboss1413@gmail.com">applesaucetoaboss1413@gmail.com</a> para activar tu cuenta.</small></p>
|
|
</div>
|
|
|
|
<div id="payment-success" class="alert alert-success mt-4 d-none">
|
|
<h5 class="fw-bold">¡Premium activado!</h5>
|
|
<p>Gracias por tu pago. Ahora tienes acceso ilimitado.</p>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
<script src="assets/js/payment.js"></script>
|
|
<script>
|
|
document.getElementById('spei-payment-btn').addEventListener('click', function() {
|
|
document.getElementById('spei-info').classList.remove('d-none');
|
|
document.getElementById('card-payment-form').classList.add('d-none');
|
|
});
|
|
document.getElementById('card-payment-btn').addEventListener('click', function() {
|
|
document.getElementById('card-payment-form').classList.remove('d-none');
|
|
document.getElementById('spei-info').classList.add('d-none');
|
|
});
|
|
</script>
|
|
<?php require_once 'includes/footer.php'; ?>
|