Creating the form

This commit is contained in:
vinchent 2024-08-04 14:40:32 +02:00
parent a5f92f7ffa
commit 00b58c5b3a
2 changed files with 60 additions and 6 deletions

View File

@ -3,7 +3,61 @@
Virtual Terminal Virtual Terminal
{{ end }} {{ end }}
{{ define "content" }} {{ define "content" }}
<h2>Virtual Terminal</h2> <h2 class="mt-3 text-center">Virtual Terminal</h2>
<hr>
<form action="/payment-succecded"
method="post"
name="charge_form"
id="charge_form"
class="d-blick needs-validation charge-form"
autocomplete="off"
novalidate="">
<div class="mb-3">
<label for="amount" class="form-label">Amount</label>
<input type="text"
id="amount"
name="amount"
autocomplete="amount-new"
required=""
class="form-control">
</div>
<div class="mb-3">
<label for="cardholder-name" class="form-label">Cardholder Name</label>
<input type="text"
id="cardholder-name"
name="cardholder_name"
autocomplete="cardholder-name-new"
required=""
class="form-control">
</div>
<div class="mb-3">
<label for="cardholder-email" class="form-label">Cardholder Email</label>
<input type="text"
id="cardholder-email"
name="cardholder_email"
autocomplete="cardholder-email-new"
required=""
class="form-control">
</div>
<!-- card number will be built by stripe -->
<div class="mb-3">
<label for="card-element" class="form-label">Credit Card</label>
<div class="form-control" id="card-element"></div>
<div class="alert-danger text-center" id="card-errors" role="alert"></div>
<div class="alert-success text-center" id="card-success" role="alert"></div>
</div>
<hr>
<a href="javastript:void(0)"
id="pay-button"
class="btn btn-primary"
onclick="val()">Charge Card</a>
</form>
{{ end }} {{ end }}
{{ define "js" }} {{ define "js" }}
<script src="https://js.stripe.com/v3/"></script>
<script>
function val() {
}
</script>
{{ end }} {{ end }}