diff --git a/cmd/web/templates/terminal.page.gohtml b/cmd/web/templates/terminal.page.gohtml
index e1c63af..7570a4a 100644
--- a/cmd/web/templates/terminal.page.gohtml
+++ b/cmd/web/templates/terminal.page.gohtml
@@ -5,6 +5,7 @@ Virtual Terminal
{{ define "content" }}
Virtual Terminal
+
{{ end }}
{{ define "js" }}
@@ -59,11 +65,22 @@ Virtual Terminal
let card;
let stripe;
+const cardMessages = document.getElementById("card-messages");
+const payButton = document.getElementById("pay-button");
+const processing = document.getElementById("processing-payment");
stripe = Stripe(''); // TODO: Publish key to be added
function val() {
+ let form = document.getElementById("charge_form");
+ if (form.checkValidity() === false) {
+ this.event.preventDefault();
+ this.event.stopPropagation();
+ form.classList.add("was-validated");
+ return;
+ }
+ form.classList.add("was-validated");
}
(function () {