| 1 | {{/* abono/owner-stripe: GET /admin/stripe, how payments are taken: the |
| 2 | sandbox, Stripe in test mode, Stripe live, or not at all (and what to |
| 3 | do about it), and the address Stripe's webhook must call. |
| 4 | |
| 5 | Data: |
| 6 | Title string, the page title's message key |
| 7 | Mode string, sandbox, test, live or off |
| 8 | WebhookURL string, the site's origin plus abono.WebhookPath |
| 9 | L the request's localizer */}} |
| 10 | {{define "content"}}{{$L := localizer $}} |
| 11 | {{template "page-header" dict "L" $L "Title" (T $L .Title)}} |
| 12 | {{if eq .Mode "sandbox"}}{{template "callout" dict "L" $L "Tone" "warning" "Body" (T $L "abono.owner.stripe_sandbox")}} |
| 13 | {{else if eq .Mode "test"}}{{template "callout" dict "L" $L "Tone" "info" "Body" (T $L "abono.owner.stripe_test")}} |
| 14 | {{else if eq .Mode "live"}}{{template "callout" dict "L" $L "Tone" "positive" "Body" (T $L "abono.owner.stripe_on")}} |
| 15 | {{else}}{{template "callout" dict "L" $L "Tone" "warning" "Body" (T $L "abono.owner.stripe_off")}} |
| 16 | <p>{{T $L "abono.owner.stripe_off_help"}}</p> |
| 17 | {{end}} |
| 18 | {{if or (eq .Mode "test") (eq .Mode "live")}}<section rst-box> |
| 19 | <p>{{T $L "abono.owner.stripe_webhook"}}</p> |
| 20 | <p><code>{{.WebhookURL}}</code></p> |
| 21 | <p>{{T $L "abono.owner.stripe_webhook_help"}}</p> |
| 22 | </section> |
| 23 | {{end}} |
| 24 | {{end}} |
| 25 | |