mirror of
https://github.com/rjNemo/payit
synced 2026-06-06 02:16:40 +00:00
Refactor JavaScript to use querySelector for robustness. Update HTML form to use POST method and correct script loading. Fix message div syntax for better accessibility and compatibility.
29 lines
1,007 B
HTML
29 lines
1,007 B
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>PayIt Checkout</title>
|
|
<link
|
|
rel="stylesheet"
|
|
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
|
|
/>
|
|
<link rel="stylesheet" href="/static/main.css" />
|
|
<script defer src="/static/app.js"></script>
|
|
</head>
|
|
<body>
|
|
<main class="card">
|
|
<h1>{{ .ProductName }}</h1>
|
|
<p>{{ .ProductDescription }}</p>
|
|
<div class="price">
|
|
{{ .PriceDisplay }} <span class="currency">{{ .Currency }}</span>
|
|
</div>
|
|
<form id="checkout-form" action="/api/checkout/" method="POST">
|
|
<label for="quantity">Quantity</label>
|
|
<input id="quantity" name="quantity" type="number" value="1" min="1" />
|
|
<button id="checkout-button" type="submit">Buy now</button>
|
|
</form>
|
|
<div id="message" role="status" aria-live="polite" />
|
|
</main>
|
|
</body>
|
|
</html>
|