Initial commit

This commit is contained in:
Piet Nijbacker committed 2026-10-10 21:32:00 +02:00
commit 2b9e58beee
822 files changed
+62544

No files matched your search

+103
View File
@@ -0,0 +1,103 @@
<?php
require_once 'config.php';
require_once 'vendor/autoload.php';
$status = 'onbekend';
$payment = null;
$paymentId = $_SESSION['order']['payment_id'] ?? null;
if ($paymentId) {
try {
$mollie = new \Mollie\Api\MollieApiClient();
$mollie->setApiKey(MOLLIE_API_KEY);
$payment = $mollie->payments->get($paymentId);
$status = $payment->status->value;
} catch (\Exception $e) {
$status = 'fout';
}
}
?>
<!DOCTYPE html>
<html lang="nl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Betaling — <?= htmlspecialchars(ACTIE_NAAM) ?></title>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: 'Segoe UI', sans-serif;
background: #f4f4f2;
color: #2c2c2c;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
}
.card {
background: #fff;
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0,0,0,0.08);
max-width: 480px;
width: 100%;
padding: 2.5rem;
text-align: center;
}
.icon { font-size: 3rem; margin-bottom: 1rem; }
h1 { font-size: 1.6rem; margin-bottom: 0.6rem; }
p { color: #666; line-height: 1.6; margin-bottom: 1.5rem; }
.detail { font-size: 0.85rem; color: #aaa; margin-bottom: 2rem; }
.btn {
display: inline-block;
background: #3a6b3e;
color: #fff;
text-decoration: none;
padding: 0.8rem 2rem;
border-radius: 8px;
font-weight: 600;
}
.btn-secondary {
background: #e8e8e4;
color: #444;
margin-left: 0.5rem;
}
</style>
</head>
<body>
<div class="card">
<?php if ($status === 'paid'): ?>
<div class="icon">✅</div>
<h1>Betaling geslaagd!</h1>
<p>Bedankt voor je bestelling. De registratie is verwerkt.</p>
<?php if ($payment): ?>
<p class="detail">
Betaald: €<?= htmlspecialchars($payment->amount->value) ?><br>
Referentie: <?= htmlspecialchars($payment->id) ?>
</p>
<?php endif; ?>
<a href="form.php" class="btn">Nieuwe bestelling</a>
<a href="index.php" class="btn btn-secondary">Home</a>
<?php elseif ($status === 'canceled' || $status === 'failed'): ?>
<div class="icon">❌</div>
<h1>Betaling mislukt</h1>
<p>De betaling is geannuleerd of mislukt. Je kunt het opnieuw proberen.</p>
<a href="form.php" class="btn">Opnieuw proberen</a>
<?php elseif ($status === 'open' || $status === 'pending'): ?>
<div class="icon">⏳</div>
<h1>Betaling in behandeling</h1>
<p>Je betaling wordt nog verwerkt. Dit kan enkele minuten duren.</p>
<a href="index.php" class="btn btn-secondary">Terug naar home</a>
<?php else: ?>
<div class="icon">❓</div>
<h1>Status onbekend</h1>
<p>We konden de betaalstatus niet ophalen. Neem contact op als je vragen hebt.</p>
<a href="index.php" class="btn btn-secondary">Terug naar home</a>
<?php endif; ?>
</div>
</body>
</html>