rastrillo / abono Public

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

Plain git — no account needed to clone.

Download

Download this file

1{{/* abono-billing-button — a POST form that opens Stripe's billing
2 portal, where a subscriber changes their card or cancels. A POST
3 because the handler mints a portal session.
4
5 A reader may pay through more than one Stripe customer (see
6 Service.Customers): render one button per customer, each posting its
7 id as "customer", for Service.Portal.
8
9 Keys:
10 Action string, required — where the form posts
11 Customer string, optional — the Stripe customer, posted as "customer"
12 L *ui.Localizer */}}
13{{define "abono-billing-button"}}{{$L := localizer $}}<form rst-form-actions method="post" action="{{.Action}}">{{with opt . "Customer"}}<input type="hidden" name="customer" value="{{.}}">{{end}}<button type="submit" rst-btn>{{T $L "abono.button.manage"}}</button></form>{{end}}
14