Added support for stripe
This commit is contained in:
1 parent
3de5c8b0f1
commit
cefc5314f2
16 files changed
+365
-72
No files matched your search
+27
-4
@@ -13,6 +13,9 @@
|
||||
tr > td:nth-child(2) {
|
||||
text-align: right;
|
||||
}
|
||||
tr > th:nth-child(2) {
|
||||
text-align: right;
|
||||
}
|
||||
td, th {
|
||||
padding: 0 8px;
|
||||
}
|
||||
@@ -24,7 +27,7 @@
|
||||
<body class="container">
|
||||
<h2>Novo plačanje</h2>
|
||||
|
||||
<form method="get" action="/initial">
|
||||
<form method="get" action="/methods">
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="amount">Vrijednost</label>
|
||||
<input class="form-control" id="amount" required name="amount" type="number" step="0.01" min="0">
|
||||
@@ -33,7 +36,7 @@
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<h2>Plačanja</h2>
|
||||
<h2>WsPay</h2>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -43,9 +46,29 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Entries}}
|
||||
{{range .WsPay}}
|
||||
<tr>
|
||||
<td><a class="link-primary" href="/info/{{.Id}}">{{.Id}}</a></td>
|
||||
<td><a class="link-primary" href="/wspay/info/{{.Id}}">{{.Id}}</a></td>
|
||||
<td>{{formatCurrency .TotalAmount}}</td>
|
||||
<td>{{formatState .State}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h2>Stripe</h2>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Vrijednost</th>
|
||||
<th>Stanje</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Stripe}}
|
||||
<tr>
|
||||
<td><a class="link-primary" href="/stripe/info/{{.Id}}">{{.Id}}</a></td>
|
||||
<td>{{formatCurrency .TotalAmount}}</td>
|
||||
<td>{{formatState .State}}</td>
|
||||
</tr>
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Index</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script>
|
||||
<style>
|
||||
th {text-align: left}
|
||||
tr > td:nth-child(2) {
|
||||
text-align: right;
|
||||
}
|
||||
td, th {
|
||||
padding: 0 8px;
|
||||
}
|
||||
h2 {
|
||||
margin-top: 16px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="container">
|
||||
<h2>Izaberi metodu plačanja</h2>
|
||||
<a class="btn btn-success" href="/wspay?amount={{.Amount}}">WsPay</a>
|
||||
<a class="btn btn-success" href="/stripe?amount={{.Amount}}">Stripe</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,28 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Info</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script>
|
||||
<style>
|
||||
th {text-align: left}
|
||||
h2 {
|
||||
margin-top: 16px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="container">
|
||||
<h2>Plačanje {{.Entry.Id}}</h2>
|
||||
|
||||
<table class="table">
|
||||
<tr><th>Id: </th><td>{{.Entry.Id}}</td></tr>
|
||||
<tr><th>Ukupna vrijednost: </th><td>{{formatCurrency .Entry.TotalAmount}}</td></tr>
|
||||
<tr><th>Jezik: </th><td>{{omitempty .Entry.Lang}}</td></tr>
|
||||
<tr><th>Stanje: </th><td>{{formatState .Entry.State}}</td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user