Saving more details, redirecting and simplifying the succeed handler
This commit is contained in:
8
cmd/web/templates/home.page.gohtml
Normal file
8
cmd/web/templates/home.page.gohtml
Normal file
@ -0,0 +1,8 @@
|
||||
{{ template "base" . }}
|
||||
{{ define "title" }}
|
||||
Widget
|
||||
{{ end }}
|
||||
{{ define "content" }}
|
||||
<h2 class="mt-5">Widget</h2>
|
||||
{{ end }}
|
||||
|
18
cmd/web/templates/receipt.page.gohtml
Normal file
18
cmd/web/templates/receipt.page.gohtml
Normal file
@ -0,0 +1,18 @@
|
||||
{{ template "base" . }}
|
||||
{{ define "title" }}
|
||||
Payment Succedded!
|
||||
{{ end }}
|
||||
{{ define "content" }}
|
||||
{{$txn := index .Data "txn"}}
|
||||
<h2 class="mt-5">Payment Succeeded</h2>
|
||||
<hr>
|
||||
<p>Payment Intent: {{$txn.PaymentIntentID}}</p>
|
||||
<p>Customer Name: {{ $txn.FirstName }} {{ $txn.LastName }}</p>
|
||||
<p>Email: {{ $txn.Email }}</p>
|
||||
<p>Payment Method: {{ $txn.PaymentMethodID }}</p>
|
||||
<p>Payment Amount: {{ $txn.PaymentAmount }}</p>
|
||||
<p>Currency: {{ $txn.PaymentCurrency }}</p>
|
||||
<p>Last Four: {{ $txn.LastFour }}</p>
|
||||
<p>Bank Return Code: {{ $txn.BankReturnCode }}</p>
|
||||
<p>Expiry Date: {{ $txn.ExpiryMonth }}/{{$txn.ExpiryYear}}</p>
|
||||
{{ end }}
|
@ -1,17 +0,0 @@
|
||||
{{ template "base" . }}
|
||||
{{ define "title" }}
|
||||
Payment Succedded!
|
||||
{{ end }}
|
||||
{{ define "content" }}
|
||||
<h2 class="mt-5">Payment Succeeded</h2>
|
||||
<hr>
|
||||
<p>Payment Intent: {{ index .Data "pi" }}</p>
|
||||
<p>Customer Name: {{ index .Data "first_name" }} {{ index .Data "last_name" }}</p>
|
||||
<p>Email: {{ index .Data "email" }}</p>
|
||||
<p>Payment Method: {{ index .Data "pm" }}</p>
|
||||
<p>Payment Amount: {{ index .Data "pa" }}</p>
|
||||
<p>Currency: {{ index .Data "pc" }}</p>
|
||||
<p>Last Four: {{ index .Data "last_four" }}</p>
|
||||
<p>Bank Return Code: {{ index .Data "bank_return_code" }}</p>
|
||||
<p>Expiry Date: {{ index .Data "expiry_month" }}/{{index .Data "expiry_year"}}</p>
|
||||
{{ end }}
|
Reference in New Issue
Block a user