1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-28 16:22:22 +00:00
plateforme-tfjm2/server_files/views/paiement.php

57 lines
2.4 KiB
PHP
Raw Normal View History

<?php
require_once "header.php"
?>
<div class="mt-4 mb-4">
<h1 class="display-4">Paiement</h1>
</div>
<?php
2020-01-01 20:53:46 +00:00
if ($payment->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
<div class="alert alert-danger">
2020-01-01 23:09:02 +00:00
Il faut payer <?= $tournament->getPrice() ?> € maintenant.
2020-01-01 20:53:46 +00:00
</div>
<div class="alert alert-info">
2020-01-01 23:09:02 +00:00
<form method="POST" enctype="multipart/form-data">
2020-01-01 20:53:46 +00:00
<label for="method"><strong>Mode de paiement :</strong></label>
<select class="custom-select" id="method" name="method">
<?php
for ($method = PaymentMethod::NOT_PAID; $method <= PaymentMethod::SCHOLARSHIP; ++$method) { ?>
<option value="<?= strtolower(PaymentMethod::getName($method)) ?>"><?= PaymentMethod::getTranslatedName($method) ?></option>
<?php } ?>
</select>
<label for="infos"><strong>Informations sur le paiement :</strong></label>
<textarea class="form-control" name="infos" id="infos"></textarea>
<label for="scholarship"><strong>Notification de bourse :</strong></label>
<input type="file" class="form-control" name="scholarship" id="scholarship" />
<input class="btn btn-primary btn-block" type="submit" name="pay" value="Envoyer" />
</form>
</div>
2020-01-01 23:09:02 +00:00
<?php } else {
if ($payment->getValidationStatus() == ValidationStatus::WAITING) { ?>
<div class="alert alert-warning">
Votre paiement est en attente de validation.
</div>
<?php } else { ?>
<div class="alert alert-success">
Votre paiement a bien été validé.
</div>
<?php } ?>
<div class="alert alert-info">
<strong>Récapitulatif du paiement :</strong><br /><br />
<strong>Tournoi :</strong> <?= $tournament->getName() ?><br />
<strong>Montant :</strong> <?= $payment->getAmount() ?> €<br />
<strong>Moyen de paiement :</strong> <?= PaymentMethod::getTranslatedName($payment->getMethod()) ?><br />
<?php if ($payment->getMethod() == PaymentMethod::SCHOLARSHIP) { ?>
<strong>Notification de bourse :</strong> <a href="/file/<?= $payment->getTransactionInfos() ?>">Télécharger</a><br />
<?php } else { ?>
<strong>Informations sur le paiement :</strong> <?= $payment->getTransactionInfos() ?><br />
<?php } ?>
2020-01-01 20:53:46 +00:00
</div>
<?php }
require_once "footer.php";