rastrillo / abono Public

Clone
git clone https://amadan.net/rastrillo/abono

Plain git — no account needed to clone.

Download

Download this file

1{{/* abono/done: GET /subscribe/done, where Checkout sends the reader
2 back. Paid, it thanks them; a reader who paid signed out is asked to
3 sign in with the address they paid with. Processing (Checkout
4 completed, the payment still on its way), it says so and offers no
5 second purchase. Not paid, it says nothing was charged and offers the
6 plans again.
7
8 Data:
9 Title string, the page title's message key
10 Paid bool
11 Processing bool, complete but the payment still processing
12 Email string, the address paid with
13 SignedIn bool
14 AccountURL string, the account page
15 PlansURL string, the pricing page
16 Error string, a message key, or ""
17 L the request's localizer */}}
18{{define "content"}}{{$L := localizer $}}
19{{template "page-header" dict "L" $L "Title" (T $L .Title)}}
20{{if .Paid}}
21<p>{{T $L "abono.pages.done_paid"}}</p>
22{{if .SignedIn}}<p><a rst-btn="primary" href="{{.AccountURL}}">{{T $L "abono.button.go_to_account"}}</a></p>
23{{else}}<p>{{Tf $L "abono.pages.done_signin" "email" .Email}}</p>
24{{end}}
25{{else if .Processing}}
26<p>{{T $L "abono.pages.done_processing"}}</p>
27{{if .SignedIn}}<p><a rst-btn="primary" href="{{.AccountURL}}">{{T $L "abono.button.go_to_account"}}</a></p>{{end}}
28{{else if .Error}}
29{{template "callout" dict "L" $L "Tone" "negative" "Focus" true "Body" (T $L .Error)}}
30{{if .SignedIn}}<p><a rst-btn="primary" href="{{.AccountURL}}">{{T $L "abono.button.go_to_account"}}</a></p>{{end}}
31{{else}}
32<p>{{T $L "abono.pages.done_unpaid_body"}}</p>
33<p><a rst-btn="primary" href="{{.PlansURL}}">{{T $L "abono.button.try_again"}}</a></p>
34{{end}}
35{{end}}
36