Added payment update action
This commit is contained in:
1 parent
b6203d8a03
commit
fe6f3b6672
12 files changed
+420
-105
No files matched your search
+10
-1
@@ -24,7 +24,15 @@
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="container">
|
||||
<body>
|
||||
<!-- As a link -->
|
||||
<nav class="navbar navbar-dark bg-dark">
|
||||
<section class="container">
|
||||
<a class="navbar-brand" href="/">Payment-poc</a>
|
||||
</section>
|
||||
</nav>
|
||||
|
||||
<section class="container">
|
||||
<h2>Novo plaćanje</h2>
|
||||
|
||||
<form method="get" action="/methods">
|
||||
@@ -58,5 +66,6 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
+17
-3
@@ -15,16 +15,30 @@
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="container">
|
||||
<body>
|
||||
<!-- As a link -->
|
||||
<nav class="navbar navbar-dark bg-dark">
|
||||
<section class="container">
|
||||
<a class="navbar-brand" href="/">Payment-poc</a>
|
||||
</section>
|
||||
</nav>
|
||||
|
||||
<section class="container">
|
||||
|
||||
<h2>Plaćanje {{.Entry.Id}}</h2>
|
||||
|
||||
{{if not (eq .Entry.State "preinitialized")}}
|
||||
<form method="post" action="/entries/{{.Entry.Id}}/refresh">
|
||||
<button class="btn btn-primary">Ažuriraj</button>
|
||||
</form>
|
||||
{{end}}
|
||||
|
||||
<table class="table">
|
||||
<tr><th>Id: </th><td>{{.Entry.Id}}</td></tr>
|
||||
<tr><th>Datum izrade: </th><td>{{.Entry.Created.Format "Jan 02, 2006 15:04:05 UTC"}}</td></tr>
|
||||
<tr><th>Zadnja izmjena: </th><td>{{or (.Entry.Modified.Format "Jan 02, 2006 15:04:05 UTC") .Entry.Created.Format "Jan 02, 2006 15:04:05 UTC"}}</td></tr>
|
||||
<tr><th>Gateway: </th><td>{{.Entry.Gateway}}</td></tr>
|
||||
<tr><th>Naplaćena vrijednost: </th><td>{{or .Entry.Amount "-"}}</td></tr>
|
||||
<tr><th>Naplaćena vrijednost: </th><td>{{formatCurrencyPtr .Entry.Amount}}</td></tr>
|
||||
<tr><th>Ukupna vrijednost: </th><td>{{formatCurrency .Entry.TotalAmount}}</td></tr>
|
||||
<tr><th>Jezik: </th><td>{{or .Entry.Lang "-"}}</td></tr>
|
||||
<tr><th>Greške: </th><td>{{or .Entry.Error "-"}}</td></tr>
|
||||
@@ -32,7 +46,6 @@
|
||||
|
||||
{{if eq .Entry.Gateway "wspay"}}
|
||||
<tr><th>WsPay</th><td></td></tr>
|
||||
<tr><th>Shopping cart ID: </th><td>{{or .Entry.ShoppingCartID "-"}}</td></tr>
|
||||
<tr><th>Success: </th><td>{{or .Entry.Success "-"}}</td></tr>
|
||||
{{end}}
|
||||
|
||||
@@ -61,5 +74,6 @@
|
||||
<button class="btn btn-primary" type="submit">Otkaži plaćanje</button>
|
||||
</form>
|
||||
{{end}}
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
@@ -21,10 +21,19 @@
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="container">
|
||||
<body>
|
||||
<!-- As a link -->
|
||||
<nav class="navbar navbar-dark bg-dark">
|
||||
<section class="container">
|
||||
<a class="navbar-brand" href="/">Payment-poc</a>
|
||||
</section>
|
||||
</nav>
|
||||
|
||||
<section class="container">
|
||||
<h2>Izaberi metodu plaćanja</h2>
|
||||
{{range .Gateways}}
|
||||
<a class="btn btn-success" href="/{{.}}?amount={{$.Amount}}">{{.}}</a>
|
||||
{{ range $key, $value := .Gateways }}
|
||||
<a class="btn btn-success" href="/methods/{{$key}}?amount={{$.Amount}}">{{$value}}</a>
|
||||
{{end}}
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,27 @@
|
||||
<!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>
|
||||
</head>
|
||||
<body>
|
||||
<!-- As a link -->
|
||||
<nav class="navbar navbar-dark bg-dark">
|
||||
<section class="container">
|
||||
<a class="navbar-brand" href="/">Payment-poc</a>
|
||||
</section>
|
||||
</nav>
|
||||
|
||||
<section class="container">
|
||||
<h2>Mock gateway {{.Entry.Id.String}}</h2>
|
||||
<p>{{formatCurrency .Entry.TotalAmount}}</p>
|
||||
<a href="/mock/success?id={{.Entry.Id.String}}" class="btn btn-success">Potvrdi plaćanje</a>
|
||||
<a href="/mock/error?id={{.Entry.Id.String}}" class="btn btn-danger">Otkaži plaćanje</a>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,7 +5,7 @@
|
||||
<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>Izradi plančanje</title>
|
||||
<title>Izradi planćanje</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>
|
||||
@@ -15,7 +15,7 @@
|
||||
</style>
|
||||
</head>
|
||||
<body class="container" style="margin-top: 32px">
|
||||
<h2>Započni proces plačanja</h2>
|
||||
<h2>Započni proces plaćanja</h2>
|
||||
|
||||
<form id="wspay-form" action="{{.Action}}" method="POST">
|
||||
<input type="hidden" name="ShopID" value="{{.Form.ShopID}}">
|
||||
|
||||
Reference in new issue
Block a user