Show the member a paid plan paused under a grant, with Cancel, Keep and Pay invoice

Tenth section of #269's change. When a grant holds the ladder a
subscription pays for and Stripe has confirmed the console's pause, the
member's Products page draws the paid plan's own card: "Paused while
Pro is granted" (M0), with ", payment due" when the subscription is
past_due or unpaid (M1, then Pay invoice and Cancel plan, and no
suspension line), or ", moves to Basic on {date}" when a downgrade was
scheduled before the grant (M8). The card offers Cancel plan, whose
confirmation reads "Plus ends on {date}; Pro stays granted." (M2), or
"Your subscription ends on {date}; Plus stays granted." under a grant
of the subscription's own tier (M9), followed by "The unpaid invoice
stays due." when payment is due (M7). A cancellation scheduled shows
the ladder heading's "Cancels on {date}" badge and Keep plan; on a
ladder a grant holds the badge carries no title, as on a suspended
plan, because the grant keeps delivering past the date. A pause Stripe
has not confirmed keeps the existing lines (M5). A paying row with no
period end shows the existing "Billing details are still being
processed." line and no control.

Cancel plan cancels at the period end (decision 16), Keep plan clears
only cancel_at_period_end, and Pay invoice opens the paying
subscription's open invoice: the plan-change resolver falls back to
the paying subscription when no subscription holds the ladder
(resolveSubscriptionOnLadder), with its product and a suspended
position for past_due, unpaid and paused, and the hosted-invoice route
lists that subscription's open invoices. No move sets or clears the
pause. The Stripe mock answers GET /v1/invoices.

Sandbox check (task 10.1, on a test clock with the console's restricted
key): Stripe accepts cancel_at_period_end=true and then false on a
subscription paused with behavior void and the marker, creates no
invoice, keeps the pause and the marker, and voids the next renewal.

docs/stripe.md and docs/plan-management.md describe the card and its
moves.

Tests: TestMemberPlansGolden states paid-plus-under-granted-pro (with
M0 and Cancel plan), its past-due, cancellation-scheduled,
downgrade-scheduled, paused and unconfirmed forms, granted-plus-own-tier,
and paid-retired-plus-under-granted-pro; the 22 earlier states' .json
gain three zero-valued fields and no .html changes.
TestPaidPlanCardUnderAGrant, TestCancelBodyOnThePaidCard (a tier with
the same name included), TestCancelBadgeOnAPaidCardUnderAGrant,
TestPlansOfferPaidMoveGate's paidDue, TestPlanUnpaidInvoiceForAPausedPlan,
TestCancelAPausedSubscription and TestKeepAPausedSubscription (the
pause stays), TestAPastDuePayingSubscriptionIsNotCancelledImmediately.

Review: no blocker or major. Five minors applied: the own-tier case read
from the card's relation instead of the tier's name, which is no
identity; the cancel and keep tests given the console's pause; the
paying row with no period end; two stale doc comments; and the badge's
title, false on a grant-held ladder, dropped as on a suspended
plan. Nine nits applied; payingByLadder, left test-only, is replaced
by the functions it composed.

Breaks: 22 of 22 caught. Full suite on reset databases: 4930 pass, 14
skip. make screens: no demo state reaches the paid card, so no capture
of this section's changes; hand captures of the seven states and both
confirmations sit beside the change's screens.
This commit is contained in:
2026-10-28 16:50:11 -05:00
parent ec6cf1e479
commit 1d0e2be9f0
60 changed files with 7389 additions and 429 deletions
+1 -1
View File
@@ -161,7 +161,7 @@ An operator can issue a grant to move a pool to a specific tier:
The system:
- Creates a grant with the chosen reason and the resumption mark, then calls the conferral boundary (`internal/entitlements/conferral.go`) through the operator handler in `internal/server/operator_enrollment.go`: it writes the grant decree, confers the position onto the organization's default pool, then materializes the organization's effective entitlements
- Registers a **Temporal workflow** to expire the grant at `valid_until` when one is set
- Keeps the ladder for a grant that supersedes a tier a subscription pays for: the subscription delivers nothing there while the grant lasts, and the console pauses its collection at Stripe, and the organization page's Billing card and the subscription's row in the operator's subscriptions list carry a **Not delivering** badge whose title reads "Billing paused while a grant holds {ladder}." once Stripe confirms the pause ("grants hold" when several grants hold the ladders) and "Billing continues while a grant holds {ladder}." until it does; the subscription delivers again in the act that ends the grant
- Keeps the ladder for a grant that supersedes a tier a subscription pays for: the subscription delivers nothing there while the grant lasts, and the console pauses its collection at Stripe, and the organization page's Billing card and the subscription's row in the operator's subscriptions list carry a **Not delivering** badge whose title reads "Billing paused while a grant holds {ladder}." once Stripe confirms the pause ("grants hold" when several grants hold the ladders) and "Billing continues while a grant holds {ladder}." until it does; the subscription delivers again in the act that ends the grant. The member sees the subscription's own card on the Products page: "Paused while {granted tier} is granted" once the pause is confirmed, with Cancel plan (the subscription ends at its period end and the grant stays), Keep plan while a cancellation or a downgrade is scheduled, and Pay invoice when its payment is due
While Temporal is not connected, which on a deployment without
`temporal-host` is always, a grant with **Valid until** is refused before
+1 -1
View File
@@ -211,7 +211,7 @@ A member moves between the paid tiers of a plan ladder on the Products page, and
- **Cancellation.** Every paid plan offers **Cancel plan** on its card. Access continues until the end of the paid period (`cancel_at_period_end`), after which the organization moves to its type's default plan, when one is configured, or leaves the ladder.
- **Taking a scheduled move back.** While a downgrade or a cancellation is scheduled, the plan's card offers **Keep plan**, which releases the schedule or clears `cancel_at_period_end` at no charge. While a downgrade is scheduled, **Cancel plan** follows it and replaces the downgrade; while a cancellation is scheduled, **Keep plan** is the only control.
- **A plan whose payment is due.** A subscription Stripe holds as `past_due` or `unpaid` keeps its card on the Products page, shown as the current plan with its state, while its entitlements are suspended. No switch is offered in either direction and a posted one is refused before any Stripe call, because a switch would invoice while the failed invoice is still open. **Keep plan** and **Cancel plan** at the period end work as on an active plan. A posted immediate cancellation is refused, because Stripe's immediate cancellation stops automatic collection of the customer's finalized invoices, and a **Keep plan** over a downgrade that Stripe has already applied is refused, because there is nothing left to take back. The unpaid invoice stays due after a cancellation: once the cancellation takes effect, Stripe stops retrying that subscription's open invoice and leaves the customer's other subscriptions collecting, so the member pays it through the invoice's **Pay invoice**. A paused subscription shows its state and is refused every act; only a subscription made outside the console reaches `paused`, which follows a trial that ends without a payment method, because the console's Checkout creates no trial.
- **A grant over a paid plan.** An operator's grant over a tier a subscription pays for keeps the ladder until it ends or is revoked, and the subscription delivers nothing there. The console pauses the subscription's collection at Stripe (`pause_collection` with `behavior=void`, and the marker `member_console_collection=paused_for_grant` in the subscription's metadata) within seconds, through the outbox, and sets no `resumes_at`. Each renewal Stripe makes while the grant holds is a draft for about an hour and is then voided, so nothing is charged. When the grant ends, the tier is delivered again in the act that ends the grant, and the console clears the pause and the marker within seconds; no money moves at either edge. While the grant holds the ladder, the organization page's Billing card and the subscription's row in the operator's subscriptions list carry a **Not delivering** badge. Once Stripe confirms the pause, which the subscription row records, its title reads "Billing paused while a grant holds {ladder}." ("grants hold" when several grants hold the ladders); until it does, and while the pause has failed, it reads "Billing continues while a grant holds {ladder}." When the ladder is left to the default or to nothing in another way, such as a tier removal, the subscription's next reconcile delivers its tier again. A new purchase over a grant still replaces the grant. A switch to the granted tier or above ends the grant's hold, and the subscription delivers the new tier. What this accepts until the exact money rule (#280): the renewal date decides which way a grant that is not whole periods falls, because a period's renewal is voided or charged whole; a pause landing after a renewal's finalization lets that renewal be charged, and a clear landing before the finalization of a renewal made while paused lets it be charged; a pause or clear that lands late moves a whole period one way or the other, and a void cannot be undone; the first charge after a grant can come without Stripe's upcoming-renewal reminder. A subscription item with no entitlement set, such as a donation line added in the Dashboard, stops billing with the tier beside it while the pause holds. An invoice open before the grant stays due: Stripe keeps retrying it, and the account's dunning setting can cancel the paused subscription.
- **A grant over a paid plan.** An operator's grant over a tier a subscription pays for keeps the ladder until it ends or is revoked, and the subscription delivers nothing there. The console pauses the subscription's collection at Stripe (`pause_collection` with `behavior=void`, and the marker `member_console_collection=paused_for_grant` in the subscription's metadata) within seconds, through the outbox, and sets no `resumes_at`. Each renewal Stripe makes while the grant holds is a draft for about an hour and is then voided, so nothing is charged. When the grant ends, the tier is delivered again in the act that ends the grant, and the console clears the pause and the marker within seconds; no money moves at either edge. While the grant holds the ladder, the organization page's Billing card and the subscription's row in the operator's subscriptions list carry a **Not delivering** badge. Once Stripe confirms the pause, which the subscription row records, its title reads "Billing paused while a grant holds {ladder}." ("grants hold" when several grants hold the ladders); until it does, and while the pause has failed, it reads "Billing continues while a grant holds {ladder}." When the ladder is left to the default or to nothing in another way, such as a tier removal, the subscription's next reconcile delivers its tier again. The member's Products page draws the card of the tier the subscription pays for with its own price and its pause as the subscription row records it: "Paused while {granted} is granted" once Stripe confirmed the pause, and the ordinary "{price}, renews {date}" line until it has. That card offers Cancel plan, which sets `cancel_at_period_end` on the subscription and leaves the pause as it is, so the subscription ends at its period end with no final invoice and the grant keeps the ladder; Keep plan, which clears that flag and any scheduled downgrade and likewise sends no pause change; and, for a subscription whose payment is due, Pay invoice, which opens the hosted page of the subscription's open invoice rather than its latest invoice, because the latest invoice is a renewal voided while the grant holds. If the grant ends before the cancellation date, the subscription delivers its tier until its period ends. A new purchase over a grant still replaces the grant. A switch to the granted tier or above ends the grant's hold, and the subscription delivers the new tier. What this accepts until the exact money rule (#280): the renewal date decides which way a grant that is not whole periods falls, because a period's renewal is voided or charged whole; a pause landing after a renewal's finalization lets that renewal be charged, and a clear landing before the finalization of a renewal made while paused lets it be charged; a pause or clear that lands late moves a whole period one way or the other, and a void cannot be undone; the first charge after a grant can come without Stripe's upcoming-renewal reminder. A subscription item with no entitlement set, such as a donation line added in the Dashboard, stops billing with the tier beside it while the pause holds. An invoice open before the grant stays due: Stripe keeps retrying it, and the account's dunning setting can cancel the paused subscription.
- **Pay invoice.** The card of a plan whose payment is due, and the detail of an open invoice, link to Stripe's hosted invoice page. The console reads the page's URL from Stripe when the member opens the link and redirects there; it never stores or logs the URL, which is a bearer link, and it needs no key permission beyond the reads of subscriptions and invoices that the reconciles already make. Paying there makes the new card the customer's default for invoices but leaves the subscription's own default on the card that failed, which Stripe charges first, so the next renewal charges the failed card again. Stripe's page still takes payment for an invoice Stripe has marked uncollectible, which the console shows as open until the invoice sweep reads it again.
A restricted key needs permission for the calls these moves make, beyond those the console already uses: `POST /v1/subscription_schedules`, `POST /v1/subscription_schedules/{id}`, `POST /v1/subscription_schedules/{id}/release` and `POST /v1/invoices/{id}/void`. The console also updates a subscription with `POST /v1/subscriptions/{id}` to set `pause_collection` while a grant holds its ladder and to clear it when the grant no longer does, which is the Subscriptions write the plan moves already need. Stripe names the missing permission in the error a key without it receives.
@@ -57,10 +57,32 @@
reads "payment due" or "paused" (a scheduled cancellation's
"ends" and a pending downgrade's "moves to" stay), and one
fact line under it says the entitlements are suspended. A
paused card draws no control. */}}
{{ if eq .Relation "current" }}
paused card draws no control.
The card of the tier a subscription pays for under a grant
(.PaidUnderGrant; the current card too when the grant is of
that tier) states the subscription's own state. Its pause
reads from the row's mirror, never from the rule: confirmed,
the line reads "Paused while {granted} is granted" with
", moves to {tier} on {date}" for a downgrade scheduled before
the grant (it wins over payment due) or ", payment due" for an
unpaid invoice, and a scheduled cancellation keeps the plain
line, its date on the ladder heading's badge; not confirmed,
the existing lines. The entitlements are the grant's, so a
payment due draws no suspension fact line; Stripe's own
"paused" status keeps its line and its fact line, and no
control. Controls: Pay invoice when the payment is due, then
Keep plan while a move is scheduled, then Cancel plan unless a
cancellation is. */}}
{{ if or (eq .Relation "current") .PaidUnderGrant }}
{{ if .BillingPending }}
<p class="text-muted small mb-2">Billing details are still being processed.</p>
{{ else if and .PaidUnderGrant .CollectionPaused .MovesTo }}
<p class="text-muted small mb-2">Paused while {{ .GrantedName }} is granted, moves to {{ .MovesTo }} on {{ .MovesOn }}</p>
{{ else if and .PaidUnderGrant .CollectionPaused (eq .Suspension "payment_due") }}
<p class="text-muted small mb-2">Paused while {{ .GrantedName }} is granted, payment due</p>
{{ else if and .PaidUnderGrant .CollectionPaused }}
<p class="text-muted small mb-2">Paused while {{ .GrantedName }} is granted</p>
{{ else if .MovesTo }}
<p class="text-muted small mb-2">{{ .BillingPriceText }}, moves to {{ .MovesTo }} on {{ .MovesOn }}</p>
{{ else if .EndsOn }}
@@ -72,7 +94,7 @@
{{ else if .BillingPriceText }}
<p class="text-muted small mb-2">{{ .BillingPriceText }}, renews {{ .BillingRenewsOn }}</p>
{{ end }}
{{- if .Suspension }}
{{- if and .Suspension (or (not .PaidUnderGrant) (eq .Suspension "paused")) }}
<p class="small text-danger mb-2">{{ if eq .Suspension "paused" }}Entitlements are suspended.{{ else }}Entitlements are suspended until the invoice is paid.{{ end }}</p>
{{- end }}
{{ else if .Held }}
@@ -99,7 +121,7 @@
held rung's and the free rung's controls below, which carry
the same body (grant-resumption D10, D16). A plan whose
payment is due offers Pay invoice first (design D8). */}}
{{ if eq .Relation "current" }}{{ $pay := .PaysInvoice }}{{ if $pay }}
{{ if or (eq .Relation "current") .PaidUnderGrant }}{{ $pay := .PaysInvoice }}{{ if $pay }}
<a href="/billing/plans/{{ .LadderID }}/unpaid-invoice" target="_blank" rel="noopener" hx-boost="false" class="btn btn-outline-primary btn-sm w-100 mt-auto"{{ if $.BillingFacts.Shown }} aria-describedby="{{ $.BillingFacts.ID }}"{{ end }}>Pay invoice</a>
{{ end }}
{{ if .CanKeep }}
+4 -2
View File
@@ -25,8 +25,10 @@ func PositionsByLadder(rows []ListLadderPositionsByPoolRow) map[string]ListLadde
// holding its rung: of the live subscriptions that pay for a tier of the
// ladder, the one with the lowest id that is not the one backing the held
// position, so the pick does not depend on the order the ids arrive in. The
// offer decision's paying fact (payingByLadder) chooses through this function
// (grant-pauses-subscription-billing D9). held is the ladder's row from
// offer decision's paying fact (payingRowsByLadder), the resolver of the member's
// moves on a ladder (resolveSubscriptionOnLadder) and the by-plan Pay invoice
// route (payingPlan) all choose through this function, so the rule is stated
// once (grant-pauses-subscription-billing D9, D11). held is the ladder's row from
// PositionsByLadder, the zero row when the organization holds nothing there;
// ok is false when no subscription pays without holding.
func PayingSubscription(held ListLadderPositionsByPoolRow, subscriptionIDs []string) (id string, ok bool) {
+109 -39
View File
@@ -144,11 +144,15 @@ type ladderSubscription struct {
// "suspended", and the second says whether the subscription is paused.
positionStatus string
subscriptionStatus string
coreSubID string
stripeSubID string
currentProductID string
stripeItemID string // Stripe si_ id of the item on this ladder
sub billing.Subscription
// holdsLadder is true when the subscription backs the org's position on
// the ladder, false when it only pays for a tier of the ladder while a
// grant, a purchase or nothing holds the rung (resolveSubscriptionOnLadder).
holdsLadder bool
coreSubID string
stripeSubID string
currentProductID string
stripeItemID string // Stripe si_ id of the item on this ladder
sub billing.Subscription
// coreItemID and the two mapping stamps are what a caller needs to ask
// whether the ids above can be reached under the current API key
// (stripe-environment-stamp D5). Resolving already reads both mapping
@@ -193,7 +197,7 @@ func SwitchPlan(ctx context.Context, db *sql.DB, logger *slog.Logger, keyMode st
billingQ := billing.New(db)
stripeQ := internalstripe.New(db)
ls, err := resolveLadderSubscription(ctx, db, orgID, ladderID)
ls, err := resolveSubscriptionOnLadder(ctx, db, orgID, ladderID)
if err != nil {
return err
}
@@ -471,7 +475,7 @@ func KeepCurrentPlan(ctx context.Context, db *sql.DB, logger *slog.Logger, keyMo
logger = slog.Default()
}
billingQ := billing.New(db)
ls, err := resolveLadderSubscription(ctx, db, orgID, ladderID)
ls, err := resolveSubscriptionOnLadder(ctx, db, orgID, ladderID)
if err != nil {
return err
}
@@ -551,7 +555,7 @@ func PreviewSwitch(ctx context.Context, db *sql.DB, logger *slog.Logger, orgID,
return SwitchPreview{}
}
ls, err := resolveLadderSubscription(ctx, db, orgID, ladderID)
ls, err := resolveSubscriptionOnLadder(ctx, db, orgID, ladderID)
if err != nil {
logger.Debug("preview: resolve ladder subscription", slog.Any("error", err))
return SwitchPreview{}
@@ -616,7 +620,7 @@ func CancelSubscription(ctx context.Context, db *sql.DB, logger *slog.Logger, ke
}
billingQ := billing.New(db)
ls, err := resolveLadderSubscription(ctx, db, orgID, ladderID)
ls, err := resolveSubscriptionOnLadder(ctx, db, orgID, ladderID)
if err != nil {
return err
}
@@ -742,17 +746,19 @@ func isDowngradeOnLadder(ctx context.Context, billingQ *billing.Queries, ladderI
return tgt < cur, nil
}
// SubscriptionBacksLadder reports whether a subscription backs orgID's
// position on ladderID, active or suspended. The switch preview reads it
// after the offer decision, which refuses a suspended position first, to
// refuse, with the switch's own answer, a ladder no subscription pays for
// rather than quote a charge nothing will make. Checkout once used it against
// a second concurrent subscription on a ladder (finding #10); that protection
// is now the offer decision (plans.Offer and plans.Across, asked in
// internal/server/billing.go). A grant- or purchase-backed rung (no
// subscription) does not count.
// SubscriptionBacksLadder reports whether the member's moves on ladderID have
// a subscription to act on: the one that backs orgID's position, active or
// suspended, or, when none does, the one that pays for a tier of the ladder
// without holding it (resolveSubscriptionOnLadder). A rung a grant or a
// purchase holds counts only through such a paying subscription. The switch
// preview reads it after the offer decision, which refuses a suspended
// position first, to refuse, with the switch's own answer, a ladder no
// subscription acts on rather than quote a charge nothing will make. Checkout
// once used it against a second concurrent subscription on a ladder (finding
// #10); that protection is now the offer decision (plans.Offer and
// plans.Across, asked in internal/server/billing.go).
func SubscriptionBacksLadder(ctx context.Context, db *sql.DB, orgID, ladderID string) (bool, error) {
_, err := resolveLadderSubscription(ctx, db, orgID, ladderID)
_, err := resolveSubscriptionOnLadder(ctx, db, orgID, ladderID)
if err == nil {
return true, nil
}
@@ -762,12 +768,22 @@ func SubscriptionBacksLadder(ctx context.Context, db *sql.DB, orgID, ladderID st
return false, err
}
// resolveLadderSubscription finds the subscription behind a live position
// (active or suspended) on ladderID for the member's org and resolves the
// Stripe subscription + item ids needed to mutate it. The position's and the
// subscription's status come back in the result; the callers decide what a
// suspended position means to them.
func resolveLadderSubscription(ctx context.Context, db *sql.DB, orgID, ladderID string) (ladderSubscription, error) {
// resolveSubscriptionOnLadder finds the subscription a member's move on
// ladderID acts on for the member's org and resolves the Stripe subscription
// and item ids needed to mutate it. When a subscription backs the org's live
// position (active or suspended) on the ladder, that is the subscription and
// holdsLadder is true. When the position is not subscription-backed (a grant
// or a purchase holds the rung) or the pool holds no position on the ladder at
// all (a bundle's vacated ladder), it is the live subscription that pays for a
// tier of the ladder without holding the rung, the one
// entitlements.PayingSubscription chooses (the lowest subscription id), and
// holdsLadder is false (grant-pauses-subscription-billing D11). Then
// currentProductID is the product of the paying item, not the held position's,
// because the move compares its target with it and finds the item by it, and
// positionStatus reads "suspended" when the subscription's status is past_due,
// unpaid or paused. The callers decide what a suspended position means to
// them.
func resolveSubscriptionOnLadder(ctx context.Context, db *sql.DB, orgID, ladderID string) (ladderSubscription, error) {
var ls ladderSubscription
billingQ := billing.New(db)
entQ := entitlements.New(db)
@@ -788,21 +804,34 @@ func resolveLadderSubscription(ctx context.Context, db *sql.DB, orgID, ladderID
if err != nil {
return ls, ErrNoActivePaidSubscription
}
pos, ok := entitlements.PositionsByLadder(rows)[ladderID]
if !ok {
return ls, ErrNoActivePaidSubscription
}
provisionID, currentProductID := pos.ProvisionID, pos.ProductID
held := entitlements.PositionsByLadder(rows)[ladderID]
prov, err := entQ.GetPoolProvisionByProvisionID(ctx, provisionID)
if err != nil {
return ls, fmt.Errorf("resolve: provision %s: %w", provisionID, err)
var coreSubID, currentProductID, positionStatus, subscriptionStatus string
holdsLadder := false
if held.ProvisionID != "" {
prov, err := entQ.GetPoolProvisionByProvisionID(ctx, held.ProvisionID)
if err != nil {
return ls, fmt.Errorf("resolve: provision %s: %w", held.ProvisionID, err)
}
if prov.SubscriptionID.Valid {
holdsLadder = true
coreSubID = prov.SubscriptionID.UUID.String()
currentProductID = held.ProductID
positionStatus = held.PositionStatus
subscriptionStatus = held.SubscriptionStatus.String
}
}
if !prov.SubscriptionID.Valid {
// Grant- or purchase-backed rung: not a paid subscription.
return ls, ErrNoActivePaidSubscription
if !holdsLadder {
paying, err := payingOnLadder(ctx, billingQ, orgID, ladderID, held)
if err != nil {
return ls, err
}
coreSubID, currentProductID, subscriptionStatus = paying.subscriptionID, paying.productID, paying.status
positionStatus = "active"
if paying.status == "past_due" || paying.status == "unpaid" || paying.status == "paused" {
positionStatus = "suspended"
}
}
coreSubID := prov.SubscriptionID.UUID.String()
subMapping, err := stripeQ.GetSubscriptionMappingBySubscriptionID(ctx, coreSubID)
if err != nil || !subMapping.StripeSubscriptionID.Valid {
@@ -833,8 +862,9 @@ func resolveLadderSubscription(ctx context.Context, db *sql.DB, orgID, ladderID
}
ls = ladderSubscription{
positionStatus: pos.PositionStatus,
subscriptionStatus: pos.SubscriptionStatus.String,
holdsLadder: holdsLadder,
positionStatus: positionStatus,
subscriptionStatus: subscriptionStatus,
coreSubID: coreSubID,
stripeSubID: subMapping.StripeSubscriptionID.String,
currentProductID: currentProductID,
@@ -848,3 +878,43 @@ func resolveLadderSubscription(ctx context.Context, db *sql.DB, orgID, ladderID
}
return ls, nil
}
// payingSubscription is the live subscription that pays for a tier of a
// ladder without holding its rung, and the lowest product id it pays with there.
type payingSubscription struct {
subscriptionID string
productID string
status string
}
// payingOnLadder finds the subscription that pays on ladderID without holding
// its rung, from ListSubscriptionRungsByOrg, choosing through
// entitlements.PayingSubscription as the offer decision's payingRowsByLadder does.
// held is the ladder's row from PositionsByLadder, zero when the pool holds
// nothing there. ErrNoActivePaidSubscription when none pays.
func payingOnLadder(ctx context.Context, billingQ billing.Querier, orgID, ladderID string, held entitlements.ListLadderPositionsByPoolRow) (payingSubscription, error) {
rungs, err := billingQ.ListSubscriptionRungsByOrg(ctx, orgID)
if err != nil {
return payingSubscription{}, fmt.Errorf("resolve: subscriptions of org %s on ladder %s: %w", orgID, ladderID, err)
}
var onLadder []billing.ListSubscriptionRungsByOrgRow
ids := make([]string, 0, len(rungs))
for _, r := range rungs {
if r.PlanLadderID == ladderID {
onLadder = append(onLadder, r)
ids = append(ids, r.SubscriptionID)
}
}
id, ok := entitlements.PayingSubscription(held, ids)
if !ok {
return payingSubscription{}, ErrNoActivePaidSubscription
}
// The rows are ordered by subscription id, then product id: the first row
// of the subscription names the lowest product id it pays with.
for _, r := range onLadder {
if r.SubscriptionID == id {
return payingSubscription{subscriptionID: id, productID: r.ProductID, status: r.Status}, nil
}
}
return payingSubscription{}, ErrNoActivePaidSubscription
}
@@ -0,0 +1,125 @@
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
// SPDX-FileCopyrightText: 2025-2026 Christian Galo
package fulfillment_test
// The member's moves on a subscription that pays for a tier a grant displaced
// (openspec change grant-pauses-subscription-billing, design D11): Cancel plan
// and Keep plan reach the paying subscription through the resolver's fallback,
// change nothing about its pause, and a past-due one is not cancelled at once.
import (
"context"
"database/sql"
"errors"
"strings"
"testing"
"git.coopcloud.tech/wiki-cafe/member-console/internal/fulfillment"
"git.coopcloud.tech/wiki-cafe/member-console/internal/stripetest"
stripe "github.com/stripe/stripe-go/v81"
)
// payingUnderGrant is a subscription on the fixture's tier with an operator's
// grant of the second tier over it, so the subscription pays for a tier of
// the ladder without holding it. The mock behaves like Stripe for the calls
// the moves make.
func payingUnderGrant(t *testing.T) (*sql.DB, fixture, *stripetest.MockBackend) {
t.Helper()
database, fx, mock := subscribed(t)
stripeLike(mock)
pro, _, _ := secondTier(t, database, fx)
g := issueGrant(t, database, fx, pro, false)
if !grantDelivers(t, database, g.GrantID) {
t.Fatalf("precondition: the grant does not deliver over the subscription")
}
// The console's pause, as the grant puts it on the subscription, mirrored
// into the row.
mock.Sub.PauseCollection = &stripe.SubscriptionPauseCollection{Behavior: stripe.SubscriptionPauseCollectionBehaviorVoid}
if mock.Sub.Metadata == nil {
mock.Sub.Metadata = map[string]string{}
}
mock.Sub.Metadata["member_console_collection"] = "paused_for_grant"
reconcile(t, database, fx.stripeSubID, "test:paused")
return database, fx, mock
}
// updates are the calls that changed the Stripe subscription, from mark on.
func updates(mock *stripetest.MockBackend, stripeSub string, mark int) []stripetest.Call {
var out []stripetest.Call
for _, c := range mock.Calls[mark:] {
if c.Method == "POST" && c.Path == "/v1/subscriptions/"+stripeSub {
out = append(out, c)
}
}
return out
}
// touchesPause reports whether a call's form changes the collection pause or
// its marker.
func touchesPause(c stripetest.Call) bool {
for k := range c.Form {
if strings.HasPrefix(k, "pause_collection") || strings.Contains(k, "member_console_collection") {
return true
}
}
return false
}
// Cancel plan on the paid card cancels the subscription at the period end and
// leaves its pause alone.
func TestCancelAPausedSubscription(t *testing.T) {
database, fx, mock := payingUnderGrant(t)
mark := len(mock.Calls)
err := fulfillment.CancelSubscription(context.Background(), database, discardLogger(), stripetest.KeyMode(), fx.orgID, fx.ladderID, fulfillment.CancelAtPeriodEnd, "member:cancel")
calls := updates(mock, fx.stripeSubID, mark)
if err != nil || len(calls) != 1 || calls[0].Form.Get("cancel_at_period_end") != "true" || touchesPause(calls[0]) {
t.Fatalf("cancel call form = %v (error %v), want cancel_at_period_end and no pause change", calls, err)
}
core := coreSubID(t, database, fx.stripeSubID)
if n := rowCount(t, database, core, "cancellation", "period_end", "scheduled"); n != 1 {
t.Errorf("scheduled cancellations = %d, want 1", n)
}
reads := 0
for _, c := range mock.Calls[mark:] {
if c.Method == "GET" && c.Path == "/v1/subscriptions/"+fx.stripeSubID {
reads++
}
}
if reads < 2 {
t.Errorf("subscription reads = %d, want the cancel's own and the reconcile's", reads)
}
}
// Keep plan on the cancelled paid card clears the flag and supersedes the
// cancellation, and sends no pause change.
func TestKeepAPausedSubscription(t *testing.T) {
database, fx, mock := payingUnderGrant(t)
ctx := context.Background()
if err := fulfillment.CancelSubscription(ctx, database, discardLogger(), stripetest.KeyMode(), fx.orgID, fx.ladderID, fulfillment.CancelAtPeriodEnd, "member:cancel"); err != nil {
t.Fatalf("cancel: %v", err)
}
mark := len(mock.Calls)
err := fulfillment.KeepCurrentPlan(ctx, database, discardLogger(), stripetest.KeyMode(), fx.orgID, fx.ladderID, "member:keep")
calls := updates(mock, fx.stripeSubID, mark)
if err != nil || len(calls) != 1 || calls[0].Form.Get("cancel_at_period_end") != "false" || touchesPause(calls[0]) {
t.Fatalf("keep call form = %v (error %v)", calls, err)
}
core := coreSubID(t, database, fx.stripeSubID)
if n := rowCount(t, database, core, "cancellation", "period_end", "scheduled"); n != 0 {
t.Errorf("scheduled cancellations = %d, want 0", n)
}
}
// A past-due paying subscription is not cancelled at once: the resolver's
// fallback reads the suspension from the subscription's status.
func TestAPastDuePayingSubscriptionIsNotCancelledImmediately(t *testing.T) {
database, fx, mock := payingUnderGrant(t)
mock.Sub = withStatus(mock.Sub, stripe.SubscriptionStatusPastDue)
reconcile(t, database, fx.stripeSubID, "test:past_due")
mark := len(mock.Calls)
err := fulfillment.CancelSubscription(context.Background(), database, discardLogger(), stripetest.KeyMode(), fx.orgID, fx.ladderID, fulfillment.CancelImmediate, "member:cancel")
if !errors.Is(err, fulfillment.ErrImmediateCancelSuspended) || len(mock.Calls) != mark {
t.Fatalf("an immediate cancellation of a past-due paying subscription = %v (calls %v), want ErrImmediateCancelSuspended before any Stripe call", err, mock.Calls[mark:])
}
}
+1 -1
View File
@@ -92,7 +92,7 @@ func init() {
{Label: "Confirm switch", Method: "POST", Path: "/partials/member/plans/switch"},
{Label: "Cancel plan", Method: "POST", Path: "/partials/member/plans/cancel", Modal: true},
{Label: "Keep plan", Method: "POST", Path: "/partials/member/plans/keep",
Note: "the current plan's control, while a downgrade or a cancellation is scheduled"},
Note: "the current plan's control, and the paid plan's card under a grant, while a downgrade or a cancellation is scheduled"},
{Label: "Checkout", Method: "POST", Path: "/billing/checkout",
Note: "fired from a plan's move control and from an add-on's Add"},
+6 -3
View File
@@ -6,6 +6,7 @@ package server
import (
"fmt"
"net/url"
"slices"
"strconv"
"strings"
"time"
@@ -1531,11 +1532,13 @@ func (t TierViewModel) CurrentBadge() Badge {
// CancelBadge marks a ladder whose subscription cancels at period end; the
// member-facing chip carries the date itself (unlike the operator's
// Canceling badge, the date is the fact a member needs). It drops its
// tooltip on a suspended plan, whose entitlements are suspended, so access
// does not continue until the date.
// tooltip in two cases where access does not continue until the date: on a
// suspended plan, whose entitlements are suspended, and on a ladder a grant
// holds while a subscription pays for it (the paid card under a grant),
// where the grant keeps delivering past the date.
func (l LadderViewModel) CancelBadge() Badge {
badge := Badge{Label: "Cancels on " + l.CancelsOn, Tone: "warning", Title: "The plan does not renew; access continues until this date."}
if currentTier(&l).Suspension != "" {
if currentTier(&l).Suspension != "" || slices.ContainsFunc(l.Tiers, func(t TierViewModel) bool { return t.PaidUnderGrant }) {
badge.Title = ""
}
return badge
@@ -133,9 +133,13 @@ func TestPlansOfferPaidMoveGate(t *testing.T) {
paymentDue := []LadderViewModel{{Tiers: []TierViewModel{{Relation: "current", LadderID: "l1", Suspension: suspensionPaymentDue}}}}
paused := []LadderViewModel{{Tiers: []TierViewModel{{Relation: "current", LadderID: "l1", Suspension: suspensionPaused}}}}
unprojected := []LadderViewModel{{Tiers: []TierViewModel{{Relation: "current", Suspension: suspensionPaymentDue}}}}
paidDue := []LadderViewModel{{Tiers: []TierViewModel{{Relation: "upgrade", PaidUnderGrant: true, LadderID: "l1", Suspension: suspensionPaymentDue}}}}
if !plansOfferPaidMove(paymentDue) {
t.Error("a plan whose payment is due does not earn the line")
}
if !plansOfferPaidMove(paidDue) {
t.Error("a paid card whose payment is due does not earn the line")
}
if plansOfferPaidMove(paused) || plansOfferPaidMove(unprojected) {
t.Error("a plan that draws no Pay invoice earned the line")
}
+101 -29
View File
@@ -164,16 +164,19 @@ func (h *MemberInvoicesHandler) hostedInvoicePage(ctx context.Context, orgID, in
// GetPlanUnpaidInvoice handles GET /billing/plans/{ladderID}/unpaid-invoice,
// the current plan card's Pay invoice, for a card that knows the plan and not
// the invoice. The position the organization holds on the ladder is picked as
// every reader picks it (entitlements.PositionsByLadder); a malformed ladder
// id, no position, a position no subscription backs, and a subscription whose
// billing account is not the organization's each answer 404. A position that
// is not suspended answers 303 to /billing with no Stripe call, because the
// route exists to pay the invoice that suspended a plan, and an active
// subscription's open latest invoice can be an upgrade the member walked away
// from, which paying would apply. Otherwise it reads the subscription with
// its latest invoice expanded and answers 303 to that invoice's hosted page
// when the invoice is open, and 303 to /billing otherwise. It never writes
// the URL to a log line: the URL is a bearer link.
// every reader picks it (entitlements.PositionsByLadder); a position no
// subscription backs falls back to the subscription that pays for a tier of
// the ladder without holding it (subscriptionForPlan). A malformed ladder id, no
// subscription either way, and a subscription whose billing account is not the
// organization's each answer 404. A plan that is not suspended answers 303 to
// /billing with no Stripe call, because the route exists to pay the invoice
// that suspended a plan, and an active subscription's open latest invoice can
// be an upgrade the member walked away from, which paying would apply.
// Otherwise it reads the subscription with its latest invoice expanded and
// answers 303 to that invoice's hosted page when the invoice is open, and 303
// to /billing otherwise; for a paying subscription it lists the open invoices
// instead (unpaidInvoicePage). It never writes the URL to a log line: the URL
// is a bearer link.
func (h *MemberInvoicesHandler) GetPlanUnpaidInvoice(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Cache-Control", "no-store")
session := h.AuthConfig.GetUserSession(r.Context())
@@ -186,25 +189,30 @@ func (h *MemberInvoicesHandler) GetPlanUnpaidInvoice(w http.ResponseWriter, r *h
h.pageRefused(w, r, http.StatusNotFound)
return
}
pos, status := h.planPosition(r.Context(), session.OrgID, ladderID)
plan, status := h.subscriptionForPlan(r.Context(), session.OrgID, ladderID)
if status != http.StatusOK {
h.pageRefused(w, r, status)
return
}
if pos.PositionStatus != "suspended" {
if !plan.suspended {
seeOther(w, billingPagePath)
return
}
seeOther(w, h.unpaidInvoicePage(r.Context(), session.OrgID, pos.SubscriptionID.UUID.String()))
seeOther(w, h.unpaidInvoicePage(r.Context(), session.OrgID, plan))
}
// planPosition is the by-plan route's gate: the organization's position on
// the ladder, which a subscription backs and whose billing account is the
// organization's. It answers http.StatusOK with the position,
// http.StatusNotFound for every other case that is the member's to know
// nothing about, and http.StatusInternalServerError when a read fails.
func (h *MemberInvoicesHandler) planPosition(ctx context.Context, orgID, ladderID string) (entitlements.ListLadderPositionsByPoolRow, int) {
none := entitlements.ListLadderPositionsByPoolRow{}
// subscriptionForPlan is the by-plan route's gate: the subscription behind the
// organization's plan on the ladder, whose billing account is the
// organization's. It is the subscription that backs the position, or, when
// none does (a grant holds the rung, or nothing does), the subscription that
// pays for a tier of the ladder without holding it, the one
// entitlements.PayingSubscription chooses
// (grant-pauses-subscription-billing D10). It answers http.StatusOK with the
// subscription, http.StatusNotFound for every other case that is the
// member's to know nothing about, and http.StatusInternalServerError when a
// read fails.
func (h *MemberInvoicesHandler) subscriptionForPlan(ctx context.Context, orgID, ladderID string) (planSubscription, int) {
none := planSubscription{}
pool, err := h.EntitlementsQ.GetDefaultPoolByOrgID(ctx, orgID)
if errors.Is(err, sql.ErrNoRows) {
return none, http.StatusNotFound
@@ -218,17 +226,27 @@ func (h *MemberInvoicesHandler) planPosition(ctx context.Context, orgID, ladderI
h.Logger.Error("failed to read the positions", slog.String("org_id", orgID), slog.Any("error", err))
return none, http.StatusInternalServerError
}
pos, ok := entitlements.PositionsByLadder(rows)[ladderID]
if !ok || !pos.SubscriptionID.Valid {
return none, http.StatusNotFound
held := entitlements.PositionsByLadder(rows)[ladderID]
plan := planSubscription{}
if held.SubscriptionID.Valid {
plan = planSubscription{subscriptionID: held.SubscriptionID.UUID.String(), suspended: held.PositionStatus == "suspended"}
} else {
var found bool
if plan, found, err = h.payingPlan(ctx, orgID, ladderID, held); err != nil {
h.Logger.Error("failed to read the subscriptions that pay on the ladder",
slog.String("org_id", orgID), slog.Any("error", err))
return none, http.StatusInternalServerError
} else if !found {
return none, http.StatusNotFound
}
}
sub, err := h.BillingQ.GetSubscriptionByID(ctx, pos.SubscriptionID.UUID.String())
sub, err := h.BillingQ.GetSubscriptionByID(ctx, plan.subscriptionID)
if errors.Is(err, sql.ErrNoRows) {
return none, http.StatusNotFound
}
if err != nil {
h.Logger.Error("failed to read the subscription",
slog.String("org_id", orgID), slog.String("subscription_id", pos.SubscriptionID.UUID.String()), slog.Any("error", err))
slog.String("org_id", orgID), slog.String("subscription_id", plan.subscriptionID), slog.Any("error", err))
return none, http.StatusInternalServerError
}
owned, ok := h.orgOwnsAccount(ctx, orgID, sub.BillingAccountID)
@@ -238,13 +256,41 @@ func (h *MemberInvoicesHandler) planPosition(ctx context.Context, orgID, ladderI
case !owned:
return none, http.StatusNotFound
}
return pos, http.StatusOK
return plan, http.StatusOK
}
// planSubscription is the subscription the by-plan route acts on. suspended
// is true for the route's Pay invoice case: the position it backs is
// suspended, or, for a paying subscription (paying), its status is past_due
// or unpaid. A paying subscription's latest invoice can be a renewal voided
// while a grant holds the ladder, so its open invoice is listed instead.
type planSubscription struct {
subscriptionID string
suspended bool
paying bool
}
// payingPlan is the subscription that pays for a tier of the ladder without
// holding its rung. found is false when none does.
func (h *MemberInvoicesHandler) payingPlan(ctx context.Context, orgID, ladderID string, held entitlements.ListLadderPositionsByPoolRow) (plan planSubscription, found bool, err error) {
rungs, err := h.BillingQ.ListSubscriptionRungsByOrg(ctx, orgID)
if err != nil {
return planSubscription{}, false, err
}
row, ok := payingRowsByLadder(rungs, map[string]entitlements.ListLadderPositionsByPoolRow{ladderID: held})[ladderID]
if !ok {
return planSubscription{}, false, nil
}
return planSubscription{subscriptionID: row.SubscriptionID, suspended: paymentDue(row.Status), paying: true}, true, nil
}
// unpaidInvoicePage is where the by-plan route redirects for a suspended
// position: the hosted page of the subscription's latest invoice when that
// invoice is open, the Billing page otherwise.
func (h *MemberInvoicesHandler) unpaidInvoicePage(ctx context.Context, orgID, subscriptionID string) string {
// plan: the hosted page of the subscription's latest invoice when that
// invoice is open, the Billing page otherwise. For a paying subscription it is
// the hosted page of the first open invoice the subscription has, because its
// latest invoice is a renewal voided while the grant holds.
func (h *MemberInvoicesHandler) unpaidInvoicePage(ctx context.Context, orgID string, plan planSubscription) string {
subscriptionID := plan.subscriptionID
if h.StripeQ == nil {
return billingPagePath
}
@@ -253,6 +299,9 @@ func (h *MemberInvoicesHandler) unpaidInvoicePage(ctx context.Context, orgID, su
!stripedb.MappingReachable(mapping.Livemode, mapping.SyncStatus, h.StripeMode) {
return billingPagePath
}
if plan.paying {
return h.openInvoicePage(ctx, orgID, subscriptionID, mapping.StripeSubscriptionID.String)
}
params := &stripe.SubscriptionParams{Expand: []*string{stripe.String("latest_invoice")}}
params.Context = ctx
sub, err := stripesubscription.Get(mapping.StripeSubscriptionID.String, params)
@@ -269,3 +318,26 @@ func (h *MemberInvoicesHandler) unpaidInvoicePage(ctx context.Context, orgID, su
}
return billingPagePath
}
// openInvoicePage is the hosted page of the first open invoice the Stripe
// subscription has, the Billing page when it has none or Stripe cannot say.
func (h *MemberInvoicesHandler) openInvoicePage(ctx context.Context, orgID, subscriptionID, stripeSubscriptionID string) string {
params := &stripe.InvoiceListParams{
Subscription: stripe.String(stripeSubscriptionID),
Status: stripe.String(string(stripe.InvoiceStatusOpen)),
}
params.Context = ctx
params.Limit = stripe.Int64(1)
it := stripeinvoice.List(params)
if !it.Next() {
if err := it.Err(); err != nil {
h.Logger.Warn("member hosted invoice: stripe read failed",
slog.String("org_id", orgID), slog.String("subscription_id", subscriptionID), slog.Any("error", err))
}
return billingPagePath
}
if page := hostedPage(it.Invoice()); page != "" {
return page
}
return billingPagePath
}
@@ -414,3 +414,104 @@ func checkPayInvoiceLink(t *testing.T, link *htmltest.Node, href string) {
}
}
}
// TestPlanUnpaidInvoiceForAPausedPlan: the by-plan route on a ladder a grant
// holds against a subscription that pays for a tier of it
// (grant-pauses-subscription-billing D10). The route finds the paying
// subscription and, when its payment is due, lists its open invoices rather
// than reading its latest invoice, which is a renewal voided while the grant
// holds.
func TestPlanUnpaidInvoiceForAPausedPlan(t *testing.T) {
db := dbtest.Open(t)
w := world.New(t, db)
mock := &stripetest.MockBackend{Invoices: map[string]*stripe.Invoice{}}
t.Cleanup(stripetest.Install(mock))
token := "tok" + w.Sfx
hosted := func(name string) string { return "https://invoice.stripe.com/i/acct_test/" + token + "_" + name }
orgType := w.OrgType("paying")
person := w.Person("Paused Plan Member")
org := w.Org("Paused Plan Org", orgType, person)
other := w.Org("Paused Plan Other", orgType, w.Person("Paused Plan Other Member"))
// plan gives o a Plus subscription under a grant of Pro on a ladder of
// its own, with the pause recorded and the status given.
plan := func(o world.Org, name, status string) (world.Ladder, world.Subscription) {
plus, pro := w.Product(name+" Plus"), w.Product(name+" Pro")
w.Price(plus, 1000)
ladder := w.Ladder(name, plus, pro)
sub := w.Subscribe(o, world.SubOpts{}, plus)
w.Issue(o, pro, world.IssueOpts{})
w.PauseCollection(sub)
if status != "active" {
w.Suspend(sub, status)
}
w.MapSubscriptionIn(sub, false)
return ladder, sub
}
// openInvoice serves an invoice of the Stripe subscription in the status given.
openInvoice := func(sub world.Subscription, name string, status stripe.InvoiceStatus) {
id := "in_" + name + sub.ID
mock.Invoices[id] = &stripe.Invoice{
ID: id, Status: status, Subscription: &stripe.Subscription{ID: "sub_" + sub.ID},
HostedInvoiceURL: hosted(name),
}
}
dueLadder, dueSub := plan(org, "due", "past_due")
openInvoice(dueSub, "open", stripe.InvoiceStatusOpen)
// The subscription's latest invoice is the renewal voided while the grant
// holds, which the route does not follow.
mock.Sub = &stripe.Subscription{
ID: "sub_" + dueSub.ID,
LatestInvoice: &stripe.Invoice{ID: "in_latest_void", Status: stripe.InvoiceStatusVoid, HostedInvoiceURL: hosted("void")},
}
activeLadder, activeSub := plan(org, "active", "active")
openInvoice(activeSub, "active-open", stripe.InvoiceStatusOpen)
noneLadder, noneSub := plan(org, "none", "past_due")
openInvoice(noneSub, "paid", stripe.InvoiceStatusPaid)
otherLadder, _ := plan(other, "other", "past_due")
sm := authtest.NewSessionManager()
h, err := server.NewMemberInvoicesHandler(server.MemberInvoicesConfig{
BillingQ: billing.New(db), EntitlementsQ: entitlements.New(db), StripeQ: internalstripe.New(db),
AuthConfig: &auth.Config{SessionManager: sm}, Logger: slog.New(&capturedLog{}), StripeMode: "test",
})
if err != nil {
t.Fatalf("new handler: %v", err)
}
signIn := person.SignIn()
signIn.OrgID = org.ID
ctx := authtest.SignIn(t, sm, signIn)
rows := []struct {
name string
ladder world.Ladder
status int
location string
calls bool
}{
{"past due with an open invoice", dueLadder, 303, hosted("open"), true},
{"active", activeLadder, 303, "/billing", false},
{"no open invoice", noneLadder, 303, "/billing", true},
{"another organization's ladder", otherLadder, 404, "", false},
}
for _, row := range rows {
t.Run(row.name, func(t *testing.T) {
before := len(mock.Calls)
rec := authtest.Get(t, ctx, h.GetPlanUnpaidInvoice, "/billing/plans/"+row.ladder.ID+"/unpaid-invoice", authtest.PathValue("ladderID", row.ladder.ID))
if got := rec.Header().Get("Location"); rec.Code != row.status || got != row.location {
t.Errorf("%s: answered %d %q, want %d %q", row.name, rec.Code, got, row.status, row.location)
}
if called := len(mock.Calls) > before; called != row.calls {
t.Errorf("%s: called Stripe = %v, want %v", row.name, called, row.calls)
}
if row.name == "past due with an open invoice" {
want := "stripe GET /v1/invoices limit=1&status=open&subscription=sub_" + dueSub.ID
if got := mock.Calls[before:]; len(got) != 1 || stripetest.Line(got[0]) != want {
t.Errorf("%s: calls = %v, want one %q", row.name, got, want)
}
}
})
}
}
+2 -2
View File
@@ -81,8 +81,8 @@ func (h *MemberProductsHandler) GetSwitchPreview(w http.ResponseWriter, r *http.
h.renderPlansAfterMove(w, r.Context(), session.OrgID, err, "switch-preview")
return
}
// The switch changes the subscription that backs the org's position on
// this ladder, active or suspended, and refuses when there is none, so the
// The switch changes the subscription the member's moves on this ladder
// act on (resolveSubscriptionOnLadder) and refuses when there is none, so the
// preview refuses first with the same answer rather than quote a charge
// nothing will make. The offer decision above has already refused a
// suspended position.
+58 -9
View File
@@ -199,11 +199,21 @@ type TierViewModel struct {
// current rung it carries none, and the current card's "Cancel plan",
// whose body names the tier that follows, is the way there.
Held bool
// PaidUnderGrant marks the card of the tier a subscription pays for on a
// ladder a grant holds (grant-pauses-subscription-billing D10): it may be
// the current card, when the grant is of the subscription's own tier. Its
// price line, controls and facts read the paying subscription, not the
// position. GrantedName is the tier the grant holds there, and
// CollectionPaused is true when the subscription's row records a pause
// Stripe confirmed, which the price line then states.
PaidUnderGrant bool
GrantedName string
CollectionPaused bool
}
// PaysInvoice reports whether the card offers Pay invoice: a projected plan
// (LadderID set) whose payment is due. The template and the billing line read
// this one condition.
// (LadderID set), the current plan or the paid plan under a grant, whose
// payment is due. The template and the billing line read this one condition.
func (t TierViewModel) PaysInvoice() bool {
return t.LadderID != "" && t.Suspension == suspensionPaymentDue
}
@@ -377,12 +387,25 @@ func (h *MemberProductsHandler) buildLadder(ctx context.Context, b *plansBuild,
return LadderViewModel{}, fmt.Errorf("read the position on ladder %s: %w", ladder.Name, err)
}
if paying != nil && paying.GrantHolds {
if row, ok := b.loader.payingRowOn(ladder.PlanLadderID); ok {
facts.Paid = &payingCard{row: row, grantedName: tierName(tiers, held.ProductID), now: b.loader.now()}
}
}
lvm := LadderViewModel{
Name: ladder.Name,
SortOrder: ladder.SortOrder,
Enrolled: held.ProductID != "",
CancelsOn: facts.CancelsOn,
}
// A cancellation armed on the subscription that pays under a grant has no
// position to read it from; its date comes from the paying row. The
// position's CancelScheduled stays unset: nothing the grant holds is
// cancelled.
if facts.Paid != nil && lvm.CancelsOn == "" {
lvm.CancelsOn = facts.Paid.cancelDate()
}
for _, t := range tiers {
tier, ok, err := h.buildTier(ctx, b, ladder.PlanLadderID, pos, facts, t)
if err != nil {
@@ -402,19 +425,21 @@ func (h *MemberProductsHandler) buildLadder(ctx context.Context, b *plansBuild,
func (h *MemberProductsHandler) buildTier(ctx context.Context, b *plansBuild, ladderID string, pos plans.Position, facts ladderFacts, t billing.ListTiersByLadderWithProductsRow) (tier TierViewModel, ok bool, err error) {
isCurrent := t.ProductID == pos.Current
isHeld := pos.Held != nil && t.ProductID == pos.Held.ProductID
paid, isPaid := facts.paidCard(pos, t.ProductID)
product, listed := b.planByID[t.ProductID]
if !listed {
if !isCurrent && !isHeld {
if !isCurrent && !isHeld && !isPaid {
return tier, false, nil // tier product is not a public plan
}
// The member's current rung, or the rung a grant holds, was excluded
// The member's current rung, the rung a grant holds, or the tier a
// subscription pays for under a grant, was excluded
// by the published-only listing query (the operator drafted or retired
// it after the org enrolled, or the grant confers a non-public tier)
// — fetch it directly so the org keeps seeing what it is actually on.
// Other unpublished tiers stay hidden by the return above.
if product, err = h.BillingQ.GetProductByID(ctx, t.ProductID); err != nil {
return tier, false, fmt.Errorf("read current or held rung product %s: %w", t.ProductID, err)
return tier, false, fmt.Errorf("read the product of tier %s: %w", t.ProductID, err)
}
}
@@ -442,13 +467,32 @@ func (h *MemberProductsHandler) buildTier(ctx context.Context, b *plansBuild, la
move := plans.Offer(pos, target)
b.moves[t.ProductID] = append(b.moves[t.ProductID], move)
tier.setMove(move, ladderID, price)
if isPaid {
tier.setPaidUnderGrant(ladderID, paid)
}
return tier, true, nil
}
// tierName is the name of the ladder's tier with productID, "" when it has none.
func tierName(tiers []billing.ListTiersByLadderWithProductsRow, productID string) string {
for _, t := range tiers {
if t.ProductID == productID {
return t.ProductName
}
}
return ""
}
// setCurrent fills the card of the tier the organization holds: its billing
// line and the next step on its own card.
func (h *MemberProductsHandler) setCurrent(ctx context.Context, tier *TierViewModel, ladderID string, pos plans.Position, facts ladderFacts) {
tier.Relation = "current"
// A grant of the tier a subscription pays for: the grant holds the rung,
// and the card is also the paid plan's.
if paid, ok := facts.paidCard(pos, tier.ProductID); ok {
tier.setPaidUnderGrant(ladderID, paid)
return
}
tier.Suspension = facts.Suspension
tier.BillingPriceText, tier.BillingRenewsOn, tier.BillingPending =
h.resolveCurrentPlanBilling(ctx, facts.Position)
@@ -569,7 +613,10 @@ func setCancelBodies(lvm *LadderViewModel, prediction *cancelPrediction) {
body = "You keep your current plan until the end of this billing period."
}
for i := range lvm.Tiers {
if lvm.Tiers[i].CanCancel || lvm.Tiers[i].MoveKind == "cancel" {
switch {
case lvm.Tiers[i].PaidUnderGrant && lvm.Tiers[i].CanCancel:
lvm.Tiers[i].CancelBody = lvm.Tiers[i].paidCancelBody()
case lvm.Tiers[i].CanCancel || lvm.Tiers[i].MoveKind == "cancel":
lvm.Tiers[i].CancelBody = body
}
}
@@ -588,7 +635,7 @@ func currentTier(lvm *LadderViewModel) TierViewModel {
// plansOfferPaidMove reports whether any tier's control is enabled and leads
// to a page that charges a card: a checkout, a switch, or the Pay invoice of a
// current tier whose payment is due (design D8; it opens Stripe's hosted
// current tier or paid card whose payment is due (design D8; it opens Stripe's hosted
// invoice page, as Approve payment does). All of them charge the card on file
// or take a new one, now or at renewal. A cancel costs nothing, and a
// disabled control leads nowhere, so neither earns the Plans section a
@@ -599,7 +646,7 @@ func plansOfferPaidMove(ladders []LadderViewModel) bool {
if t.MoveEnabled && (t.MoveKind == "checkout" || t.MoveKind == "switch") {
return true
}
if t.Relation == "current" && t.PaysInvoice() {
if (t.Relation == "current" || t.PaidUnderGrant) && t.PaysInvoice() {
return true
}
}
@@ -757,7 +804,9 @@ func clauseWords(keeps, moves, leaves []*predictedClause) []string {
// Empty/false results mean the current tier carries no subscription at all —
// the free/default rung, or a paid tier an operator issued as a grant rather
// than through Stripe — and nothing renders; that is not billing information
// silently omitted, there genuinely is none. pending=true means the tier IS
// silently omitted, there genuinely is none here. A subscription that pays
// for a tier a grant displaced is not behind the position: its own card
// states it (setPaidUnderGrant). pending=true means the tier IS
// subscription-backed (the provision names a subscription_id) but its price
// or period could not be resolved yet: checkout completed and the ladder
// attachment landed, but the subscription's projection has not (still
+110 -22
View File
@@ -4,7 +4,8 @@
package server
// The Products page's plans region, characterized state by state: for each of
// twenty-three organizations, the view model buildPlansData returns, cut to the
// twenty-nine organizations, and of one more in a world of its own, the view
// model buildPlansData returns, cut to the
// fixture's ladders and without the billing paragraph and the preview, and the
// member_plans.html render of that data, compared byte for byte with the files
// under testdata/member_plans. A change to anything else a member sees on the
@@ -16,6 +17,7 @@ import (
"context"
"database/sql"
"encoding/json"
"html/template"
"io"
"log/slog"
"path/filepath"
@@ -93,7 +95,7 @@ func registerGoldenKeys(t testing.TB, w *world.World) {
}
}
// plansGoldenFixture is the three ladders and twenty-three organizations the
// plansGoldenFixture is the three ladders and twenty-nine organizations the
// plans golden reads, built once. Every date a state prints is fixed, far
// enough ahead that the clock never reaches it, and falls at 12:00 UTC.
type plansGoldenFixture struct {
@@ -136,7 +138,7 @@ func newPlansGoldenFixture(ctx context.Context, t *testing.T, w *world.World) *p
}
free, _ := product("Free", 0, false)
basic, _ := product("Basic", 500, true)
basic, basicPrice := product("Basic", 500, true)
plus, plusPrice := product("Plus", 1000, true)
standard, standardPrice := product("Standard", 2000, true)
pro, _ := product("Pro", 3000, true)
@@ -269,6 +271,42 @@ func newPlansGoldenFixture(ctx context.Context, t *testing.T, w *world.World) *p
w.Issue(o, pro, world.IssueOpts{})
w.PauseCollection(sub)
// The same grant over the same subscription in the states a paid card
// tells apart (design D10). The pause is the console's, confirmed, unless
// the state says otherwise.
paidUnderPro := func(state string, confirmed bool) world.Subscription {
o := org(state)
sub := w.Subscribe(o, world.SubOpts{PeriodEnd: periodEnd}, plus)
w.Issue(o, pro, world.IssueOpts{})
if confirmed {
w.PauseCollection(sub)
}
return sub
}
sub = paidUnderPro("paid-plus-under-granted-pro-past-due", true)
w.Suspend(sub, "past_due")
paidUnderPro("paid-plus-under-granted-pro-unconfirmed", false)
sub = paidUnderPro("paid-plus-under-granted-pro-cancellation-scheduled", true)
w.CancelAtPeriodEnd(sub)
// The downgrade is scheduled before the grant.
o = org("paid-plus-under-granted-pro-downgrade-scheduled")
sub = w.Subscribe(o, world.SubOpts{PeriodEnd: periodEnd}, plus)
w.ScheduleDowngrade(sub, basicPrice, periodEnd)
w.Issue(o, pro, world.IssueOpts{})
w.PauseCollection(sub)
// Stripe's own pause: the card keeps its line and draws no control, though
// the row also records the console's pause.
sub = paidUnderPro("paid-plus-paused-under-granted-pro", true)
w.Suspend(sub, "paused")
// A grant of the subscription's own tier: the current card is the paid card.
o = org("granted-plus-own-tier")
sub = w.Subscribe(o, world.SubOpts{PeriodEnd: periodEnd}, plus)
w.Issue(o, plus, world.IssueOpts{})
w.PauseCollection(sub)
w.Issue(org("retired-current-rung"), gone, world.IssueOpts{})
w.Retire(gone)
return f
@@ -287,6 +325,22 @@ func TestMemberPlansGolden(t *testing.T) {
ctx := context.Background()
db := dbtest.Open(t)
f := newPlansGoldenFixture(ctx, t, world.New(t, db))
h := newPlansGoldenHandler(t, db)
set := MemberSet(t)
for _, o := range f.orgs {
t.Run(o.state, func(t *testing.T) {
compareGoldenPlans(ctx, t, h, set, f.w, f.norm, o)
})
}
t.Run("paid-retired-plus-under-granted-pro", func(t *testing.T) {
w, norm, o := newRetiredPaidFixture(ctx, t, db)
compareGoldenPlans(ctx, t, h, set, w, norm, o)
})
}
func newPlansGoldenHandler(t *testing.T, db *sql.DB) *MemberProductsHandler {
t.Helper()
h, err := NewMemberProductsHandler(MemberProductsConfig{
BillingQ: billing.New(db), EntitlementsQ: entitlements.New(db),
Logger: slog.New(slog.NewTextHandler(io.Discard, nil)), Database: db, StripeMode: "test",
@@ -294,26 +348,60 @@ func TestMemberPlansGolden(t *testing.T) {
if err != nil {
t.Fatalf("member handler: %v", err)
}
set := MemberSet(t)
return h
}
for _, o := range f.orgs {
t.Run(o.state, func(t *testing.T) {
data := h.buildPlansData(ctx, o.id)
// The database holds every ladder a test has committed.
var ours []LadderViewModel
for _, l := range data.Ladders {
if strings.HasSuffix(l.Name, " "+f.w.Sfx) {
ours = append(ours, l)
}
}
data.Ladders = ours
data.BillingFacts = BillingFacts{}
data.Preview = nil
// compareGoldenPlans builds the page of the organization o names and compares
// the view model and the render with the state's files, cut to the ladders of
// w's fixture.
func compareGoldenPlans(ctx context.Context, t *testing.T, h *MemberProductsHandler, set *template.Template, w *world.World, norm *golden.Normalizer, o plansGoldenOrg) {
t.Helper()
data := h.buildPlansData(ctx, o.id)
// The database holds every ladder a test has committed.
var ours []LadderViewModel
for _, l := range data.Ladders {
if strings.HasSuffix(l.Name, " "+w.Sfx) {
ours = append(ours, l)
}
}
data.Ladders = ours
data.BillingFacts = BillingFacts{}
data.Preview = nil
base := filepath.Join("testdata", "member_plans", o.state)
view := plansGoldenView{Ladders: data.Ladders, Error: data.Error, Success: data.Success}
golden.Compare(t, base+".json", norm.Apply(indentedJSON(t, view)))
golden.Compare(t, base+".html", norm.Apply(Render(t, set, "member_plans.html", data)))
}
base := filepath.Join("testdata", "member_plans", o.state)
view := plansGoldenView{Ladders: data.Ladders, Error: data.Error, Success: data.Success}
golden.Compare(t, base+".json", f.norm.Apply(indentedJSON(t, view)))
golden.Compare(t, base+".html", f.norm.Apply(Render(t, set, "member_plans.html", data)))
})
// newRetiredPaidFixture is the world of the state paid-retired-plus-under-
// granted-pro: a Wiki ladder of Basic, Plus and Pro of its own, a Plus
// subscription under a grant of Pro with the pause recorded, and Plus retired
// afterwards. It is a world of its own so that the shared Plus of the other
// states is never retired: Retire deactivates the one product row, and
// buildTier skips an unlisted tier unless it is current or held, so the
// shared Plus would drop from every state where it is neither.
func newRetiredPaidFixture(ctx context.Context, t *testing.T, db *sql.DB) (*world.World, *golden.Normalizer, plansGoldenOrg) {
t.Helper()
w := world.New(t, db)
norm := newGoldenNormalizer(ctx, t, w)
product := func(name string, cents int32) world.Product {
p := w.Product(name)
norm.Name("product", name, p.ID)
price := w.Price(p, cents)
norm.Name("price", name, price.ID)
w.MapPrice(price)
return p
}
basic, plus, pro := product("Basic", 500), product("Plus", 1000), product("Pro", 3000)
wiki := w.Ladder("Wiki", basic, plus, pro)
norm.Name("ladder", "Wiki", wiki.ID)
owner := w.Person("Owner")
o := w.Org("paid-retired-plus-under-granted-pro", w.OrgType("retired"), owner)
sub := w.Subscribe(o, world.SubOpts{PeriodEnd: noon(2099, time.January, 15)}, plus)
w.Issue(o, pro, world.IssueOpts{})
w.PauseCollection(sub)
w.Retire(plus)
return w, norm, plansGoldenOrg{state: "paid-retired-plus-under-granted-pro", id: o.ID}
}
@@ -0,0 +1,117 @@
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
// SPDX-FileCopyrightText: 2025-2026 Christian Galo
package server
import (
"time"
"git.coopcloud.tech/wiki-cafe/member-console/internal/billing"
)
// payingCard is what the paid plan's card needs beside the offer
// decision (grant-pauses-subscription-billing D10): the row of the
// subscription that pays for a tier of a ladder a grant holds, and the name
// of the tier the grant holds there.
type payingCard struct {
row billing.ListSubscriptionRungsByOrgRow
grantedName string
// now decides whether a suspended subscription's scheduled downgrade has
// already been applied by Stripe.
now time.Time
}
// paymentDue reports whether a subscription status means an invoice is unpaid.
func paymentDue(status string) bool { return status == "past_due" || status == "unpaid" }
// The date form of every card.
const cardDateLayout = "Jan 2, 2006"
// cancelDate is the date the paying subscription's cancellation takes effect:
// its period end under cancel_at_period_end, otherwise the scheduled
// cancellation's date, "" when none is armed.
func (p payingCard) cancelDate() string {
if p.row.CancelAtPeriodEnd && p.row.CurrentPeriodEnd.Valid {
return p.row.CurrentPeriodEnd.Time.Format(cardDateLayout)
}
if p.row.CancellationAt.Valid {
return p.row.CancellationAt.Time.Format(cardDateLayout)
}
return ""
}
// setPaidUnderGrant draws the card of the tier a subscription pays for on a
// ladder a grant holds: the subscription's own price and renewal, the state of
// its collection, and its controls by D10's table. paying is the
// subscription's row and granted the name of the tier the grant holds. The
// pause reads as confirmed only from the row's mirror, never from the rule
// (D10, Copy O3): "Paused" while Stripe still charges would be false.
//
// A subscription Stripe holds as paused keeps its existing "paused" line and
// the fact line, and draws no control. A subscription whose payment is due
// draws Pay invoice first, and no suspension fact line: the grant delivers, so
// the entitlements are not what is suspended.
func (t *TierViewModel) setPaidUnderGrant(ladderID string, paying payingCard) {
row := paying.row
t.PaidUnderGrant = true
t.GrantedName = paying.grantedName
t.BillingPriceText = formatMoney(int64(row.UnitAmount), row.Currency)
if row.RecurringInterval.Valid && row.RecurringInterval.String != "" {
t.BillingPriceText += "/" + row.RecurringInterval.String
}
if row.CurrentPeriodEnd.Valid {
t.BillingRenewsOn = row.CurrentPeriodEnd.Time.Format(cardDateLayout)
}
if row.Status == "paused" {
t.Suspension = suspensionPaused
return
}
// A row with no period end is pending, as the current card reads it
// (resolveCurrentPlanBilling): no date to renew or cancel on, no control.
if !row.CurrentPeriodEnd.Valid {
t.BillingPending = true
return
}
if paymentDue(row.Status) {
t.Suspension = suspensionPaymentDue
}
t.CollectionPaused = row.PauseCollectionBehavior.Valid
t.LadderID = ladderID
// A suspended subscription's downgrade whose date is not after now has
// already been applied by Stripe, so it is left unset, as for a held
// position.
suspended := t.Suspension != ""
switch {
case paying.cancelDate() != "":
t.EndsOn = paying.cancelDate()
t.CanKeep = true
case row.DowngradeAt.Valid && (!suspended || row.DowngradeAt.Time.After(paying.now)):
t.MovesTo = row.DowngradeProductName.String
t.MovesOn = row.DowngradeAt.Time.Format(cardDateLayout)
t.CanKeep = true
t.CanCancel = true
default:
t.CanCancel = true
}
}
// paidCancelBody is the cancel confirmation on the paid plan's card: Copy M2
// when the grant is of another tier, M9 when it is of the subscription's own
// tier (the paid card is the current card), followed by the existing sentence that the
// unpaid invoice stays due when the payment is.
func (t TierViewModel) paidCancelBody() string {
var body string
// The paid card is the current card exactly when the grant holds the
// product the subscription pays for (setCurrent).
if t.Relation == "current" {
body = "Your subscription ends on " + t.BillingRenewsOn + "; " + t.GrantedName + " stays granted."
} else {
body = t.Name + " ends on " + t.BillingRenewsOn + "; " + t.GrantedName + " stays granted."
}
if t.Suspension == suspensionPaymentDue {
body += " The unpaid invoice stays due."
}
return body
}
@@ -0,0 +1,157 @@
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
// SPDX-FileCopyrightText: 2025-2026 Christian Galo
package server
import (
"database/sql"
"slices"
"testing"
"time"
"git.coopcloud.tech/wiki-cafe/member-console/internal/billing"
"git.coopcloud.tech/wiki-cafe/member-console/internal/testkit/htmltest"
)
// The paid plan's card states of design D10, as rows: the subscription's row
// and the grant's tier in, the price line and the controls the card draws out,
// compared with the Copy table.
var (
paidPeriodEnd = time.Date(2099, time.January, 15, 12, 0, 0, 0, time.UTC)
paidNow = time.Date(2026, time.October, 28, 12, 0, 0, 0, time.UTC)
)
func paidRow(mutate func(*billing.ListSubscriptionRungsByOrgRow)) billing.ListSubscriptionRungsByOrgRow {
row := billing.ListSubscriptionRungsByOrgRow{
SubscriptionID: "sub-1",
Status: "active",
CurrentPeriodEnd: sql.NullTime{Time: paidPeriodEnd, Valid: true},
PauseCollectionBehavior: sql.NullString{String: "void", Valid: true},
PauseCollectionMarked: true,
ProductID: "plus",
UnitAmount: 1000,
Currency: "usd",
RecurringInterval: sql.NullString{String: "month", Valid: true},
}
if mutate != nil {
mutate(&row)
}
return row
}
func TestPaidPlanCardUnderAGrant(t *testing.T) {
downgrade := func(r *billing.ListSubscriptionRungsByOrgRow) {
r.DowngradeAt = sql.NullTime{Time: paidPeriodEnd, Valid: true}
r.DowngradeProductName = sql.NullString{String: "Basic", Valid: true}
}
cancels := func(r *billing.ListSubscriptionRungsByOrgRow) { r.CancelAtPeriodEnd = true }
unconfirmed := func(r *billing.ListSubscriptionRungsByOrgRow) { r.PauseCollectionBehavior = sql.NullString{} }
status := func(s string) func(*billing.ListSubscriptionRungsByOrgRow) {
return func(r *billing.ListSubscriptionRungsByOrgRow) { r.Status = s }
}
both := func(fs ...func(*billing.ListSubscriptionRungsByOrgRow)) func(*billing.ListSubscriptionRungsByOrgRow) {
return func(r *billing.ListSubscriptionRungsByOrgRow) {
for _, f := range fs {
f(r)
}
}
}
const renews = "$10.00/month, renews Jan 15, 2099"
rows := []struct {
name string
mutate func(*billing.ListSubscriptionRungsByOrgRow)
granted string
line string
controls []string
}{
{"confirmed", nil, "Pro", "Paused while Pro is granted", []string{"Cancel plan"}},
{"confirmed, trialing", status("trialing"), "Pro", "Paused while Pro is granted", []string{"Cancel plan"}},
{"unconfirmed", unconfirmed, "Pro", renews, []string{"Cancel plan"}},
{"own tier", nil, "Plus", "Paused while Plus is granted", []string{"Cancel plan"}},
{"payment due", status("past_due"), "Pro", "Paused while Pro is granted, payment due", []string{"Pay invoice", "Cancel plan"}},
{"unpaid", status("unpaid"), "Pro", "Paused while Pro is granted, payment due", []string{"Pay invoice", "Cancel plan"}},
{"payment due, unconfirmed", both(status("past_due"), unconfirmed), "Pro", "$10.00/month, payment due", []string{"Pay invoice", "Cancel plan"}},
{"downgrade scheduled", downgrade, "Pro", "Paused while Pro is granted, moves to Basic on Jan 15, 2099", []string{"Keep plan", "Cancel plan"}},
{"downgrade scheduled, unconfirmed", both(downgrade, unconfirmed), "Pro", "$10.00/month, moves to Basic on Jan 15, 2099", []string{"Keep plan", "Cancel plan"}},
{"downgrade scheduled, payment due", both(downgrade, status("past_due")), "Pro", "Paused while Pro is granted, moves to Basic on Jan 15, 2099", []string{"Pay invoice", "Keep plan", "Cancel plan"}},
{"downgrade already applied, payment due", both(status("past_due"), func(r *billing.ListSubscriptionRungsByOrgRow) {
downgrade(r)
r.DowngradeAt = sql.NullTime{Time: paidNow.Add(-time.Hour), Valid: true}
}), "Pro", "Paused while Pro is granted, payment due", []string{"Pay invoice", "Cancel plan"}},
{"cancellation scheduled", cancels, "Pro", "Paused while Pro is granted", []string{"Keep plan"}},
{"cancellation scheduled, unconfirmed", both(cancels, unconfirmed), "Pro", "$10.00/month, ends Jan 15, 2099", []string{"Keep plan"}},
{"cancellation scheduled, payment due", both(cancels, status("past_due")), "Pro", "Paused while Pro is granted, payment due", []string{"Pay invoice", "Keep plan"}},
{"cancellation scheduled by a commitment", func(r *billing.ListSubscriptionRungsByOrgRow) {
r.CancellationAt = sql.NullTime{Time: paidPeriodEnd.AddDate(0, 1, 0), Valid: true}
}, "Pro", "Paused while Pro is granted", []string{"Keep plan"}},
{"period unknown", func(r *billing.ListSubscriptionRungsByOrgRow) { r.CurrentPeriodEnd = sql.NullTime{} }, "Pro", "Billing details are still being processed.", nil},
{"paused by Stripe", status("paused"), "Pro", "$10.00/month, paused", nil},
}
set := MemberSet(t)
for _, row := range rows {
t.Run(row.name, func(t *testing.T) {
tier := TierViewModel{ProductID: "plus", Name: "Plus", Relation: "upgrade"}
if row.granted == "Plus" {
tier.Relation = "current"
}
tier.setPaidUnderGrant("ladder-1", payingCard{row: paidRow(row.mutate), grantedName: row.granted, now: paidNow})
lvm := LadderViewModel{Name: "Wiki", Enrolled: true, Tiers: []TierViewModel{tier}}
setCancelBodies(&lvm, nil)
doc := htmltest.Parse(t, Render(t, set, "member_plans.html", PlansData{Ladders: []LadderViewModel{lvm}}))
line := doc.Texts("p.text-muted.small.mb-2")
controls := doc.Texts(".card-body a.btn, .card-body button.btn")
if len(line) != 1 || line[0] != row.line || !slices.Equal(controls, row.controls) {
t.Errorf("%s: price line %q and controls %v, want %q and %v", row.name, line, controls, row.line, row.controls)
}
})
}
}
// TestCancelBodyOnThePaidCard: the cancel confirmation on the paid plan's card
// is Copy M2 under a grant of another tier and M9 under a grant of the
// subscription's own tier, each followed by M7's sentence when the payment is
// due.
func TestCancelBodyOnThePaidCard(t *testing.T) {
rows := []struct {
name string
granted string
relation string
status string
want string
}{
{"a grant of another tier", "Pro", "upgrade", "active", "Plus ends on Jan 15, 2099; Pro stays granted."},
{"a grant of the subscription's own tier", "Plus", "current", "active", "Your subscription ends on Jan 15, 2099; Plus stays granted."},
{"a grant of another tier, payment due", "Pro", "upgrade", "past_due", "Plus ends on Jan 15, 2099; Pro stays granted. The unpaid invoice stays due."},
{"the own tier, payment due", "Plus", "current", "unpaid", "Your subscription ends on Jan 15, 2099; Plus stays granted. The unpaid invoice stays due."},
{"another tier with the same name", "Plus", "upgrade", "active", "Plus ends on Jan 15, 2099; Plus stays granted."},
}
for _, row := range rows {
t.Run(row.name, func(t *testing.T) {
tier := TierViewModel{ProductID: "plus", Name: "Plus", Relation: row.relation}
card := payingCard{row: paidRow(func(r *billing.ListSubscriptionRungsByOrgRow) { r.Status = row.status }), grantedName: row.granted, now: paidNow}
tier.setPaidUnderGrant("ladder-1", card)
lvm := LadderViewModel{Tiers: []TierViewModel{tier}}
setCancelBodies(&lvm, nil)
if got := lvm.Tiers[0].CancelBody; got != row.want {
t.Errorf("%s: cancel body = %q, want %q", row.name, got, row.want)
}
})
}
}
// TestCancelBadgeOnAPaidCardUnderAGrant: the "Cancels on" badge on a ladder a
// grant holds while a subscription pays for it carries no title, because the
// grant keeps delivering past the date.
func TestCancelBadgeOnAPaidCardUnderAGrant(t *testing.T) {
tier := TierViewModel{ProductID: "plus", Name: "Plus", Relation: "upgrade"}
tier.setPaidUnderGrant("ladder-1", payingCard{row: paidRow(nil), grantedName: "Pro", now: paidNow})
lvm := LadderViewModel{Name: "Wiki", CancelsOn: "Jan 15, 2099", Tiers: []TierViewModel{tier}}
if got := lvm.CancelBadge(); got.Title != "" || got.Label != "Cancels on Jan 15, 2099" {
t.Errorf("cancel badge of the paid card under a grant = %q titled %q, want the label and no title", got.Label, got.Title)
}
plain := LadderViewModel{CancelsOn: "Jan 15, 2099", Tiers: []TierViewModel{{Name: "Plus", Relation: "current"}}}
if got := plain.CancelBadge(); got.Title == "" {
t.Errorf("cancel badge of a held, active plan has no title, want the title kept")
}
}
+52 -18
View File
@@ -32,9 +32,12 @@ type positionLoader struct {
stripeQ internalstripe.Querier
now func() time.Time
predictions map[string]*cancelPrediction
// paying is payingByLadder over the organization's live subscriptions,
// paying is payingFacts over the organization's live subscriptions,
// read once per request and nil until then.
paying map[string]plans.Paying
// payingRows is the row of ListSubscriptionRungsByOrg behind each entry of
// paying, for the paid plan's card, read with it and nil until then.
payingRows map[string]billing.ListSubscriptionRungsByOrgRow
}
// newPositionLoader builds a loader over the billing and entitlements
@@ -80,7 +83,7 @@ func (l *positionLoader) positions(ctx context.Context, orgID string) (map[strin
// the map; a loader serves one organization. The organization's subscriptions are
// read once per request with ListSubscriptionRungsByOrg and cached, as the
// cancel predictions are, however many ladders ask; the choice from them is
// payingByLadder's. held are the organization's positions by ladder
// payingFacts's. held are the organization's positions by ladder
// (positions), which a request does not change.
func (l *positionLoader) payingOn(ctx context.Context, orgID, ladderID string, held map[string]entitlements.ListLadderPositionsByPoolRow) (*plans.Paying, error) {
if l.paying == nil {
@@ -88,7 +91,8 @@ func (l *positionLoader) payingOn(ctx context.Context, orgID, ladderID string, h
if err != nil {
return nil, fmt.Errorf("read the subscriptions of org %s that pay on a ladder: %w", orgID, err)
}
l.paying = payingByLadder(rows, held)
l.payingRows = payingRowsByLadder(rows, held)
l.paying = payingFacts(l.payingRows, held, rows)
}
p, ok := l.paying[ladderID]
if !ok {
@@ -97,23 +101,23 @@ func (l *positionLoader) payingOn(ctx context.Context, orgID, ladderID string, h
return &p, nil
}
// payingByLadder keys, by plan ladder, the subscription that pays for a tier
// of the ladder without holding its rung (entitlements.PayingSubscription
// chooses it), reading no row. rows are the rows of ListSubscriptionRungsByOrg
// and held the organization's positions by ladder. A subscription's row on the
// ladder that names the lowest product is the tier it pays for.
func payingByLadder(rows []billing.ListSubscriptionRungsByOrgRow, held map[string]entitlements.ListLadderPositionsByPoolRow) map[string]plans.Paying {
// payingRowOn is the row of the subscription payingOn returned for the ladder,
// the zero row and false when payingOn returned none. It reads what payingOn
// cached, so it is valid after payingOn has run.
func (l *positionLoader) payingRowOn(ladderID string) (billing.ListSubscriptionRungsByOrgRow, bool) {
row, ok := l.payingRows[ladderID]
return row, ok
}
// payingRowsByLadder keys, by plan ladder, the row that names the tier the
// ladder's paying subscription pays with: the subscription is
// entitlements.PayingSubscription's pick, the row its lowest product id.
func payingRowsByLadder(rows []billing.ListSubscriptionRungsByOrgRow, held map[string]entitlements.ListLadderPositionsByPoolRow) map[string]billing.ListSubscriptionRungsByOrgRow {
byLadder := make(map[string][]billing.ListSubscriptionRungsByOrgRow)
ladderSets := make(map[[2]string]map[string]bool)
for _, r := range rows {
byLadder[r.PlanLadderID] = append(byLadder[r.PlanLadderID], r)
key := [2]string{r.SubscriptionID, r.ProductID}
if ladderSets[key] == nil {
ladderSets[key] = make(map[string]bool)
}
ladderSets[key][r.PlanLadderID] = true
}
out := make(map[string]plans.Paying, len(byLadder))
out := make(map[string]billing.ListSubscriptionRungsByOrgRow, len(byLadder))
for ladderID, ladderRows := range byLadder {
ids := make([]string, len(ladderRows))
for i, r := range ladderRows {
@@ -123,8 +127,26 @@ func payingByLadder(rows []billing.ListSubscriptionRungsByOrgRow, held map[strin
if !ok {
continue
}
row := firstRowOf(ladderRows, id)
out[ladderID] = payingFrom(row, held[ladderID], len(ladderSets[[2]string{id, row.ProductID}]) > 1)
out[ladderID] = firstRowOf(ladderRows, id)
}
return out
}
// payingFacts states the offer decision's facts of each ladder's paying row.
// rows are all the rows of ListSubscriptionRungsByOrg, which say whether the
// paying product is a tier of another ladder too.
func payingFacts(chosen map[string]billing.ListSubscriptionRungsByOrgRow, held map[string]entitlements.ListLadderPositionsByPoolRow, rows []billing.ListSubscriptionRungsByOrgRow) map[string]plans.Paying {
ladderSets := make(map[[2]string]map[string]bool)
for _, r := range rows {
key := [2]string{r.SubscriptionID, r.ProductID}
if ladderSets[key] == nil {
ladderSets[key] = make(map[string]bool)
}
ladderSets[key][r.PlanLadderID] = true
}
out := make(map[string]plans.Paying, len(chosen))
for ladderID, row := range chosen {
out[ladderID] = payingFrom(row, held[ladderID], len(ladderSets[[2]string{row.SubscriptionID, row.ProductID}]) > 1)
}
return out
}
@@ -171,6 +193,18 @@ type ladderFacts struct {
// its subscription is paused and "payment_due" for every other status of
// a suspended position.
Suspension string
// Paid is the paid plan's card facts on a ladder a grant holds against a
// subscription that pays for a tier of it, nil otherwise.
Paid *payingCard
}
// paidCard reports the paying subscription's facts when productID is the tier
// it pays for on a ladder a grant holds.
func (f ladderFacts) paidCard(pos plans.Position, productID string) (payingCard, bool) {
if f.Paid == nil || pos.Paying == nil || pos.Paying.ProductID != productID {
return payingCard{}, false
}
return *f.Paid, true
}
// The words a suspended position's state is shown in.
+2 -2
View File
@@ -122,8 +122,8 @@ func TestPayingByLadder(t *testing.T) {
// The rows arrive in the order the query gives them, and the
// choice does not depend on it.
for _, rows := range [][]billing.ListSubscriptionRungsByOrgRow{tc.rows, reversed(tc.rows)} {
if got := payingByLadder(rows, tc.held); !reflect.DeepEqual(got, tc.want) {
t.Errorf("payingByLadder(%s) = %v, want %v", tc.name, got, tc.want)
if got := payingFacts(payingRowsByLadder(rows, tc.held), tc.held, rows); !reflect.DeepEqual(got, tc.want) {
t.Errorf("payingFacts(%s) = %v, want %v", tc.name, got, tc.want)
}
}
})
@@ -0,0 +1,414 @@
<div class="border-start border-3 ps-3 mb-4 border-primary">
<h3 class="fw-bold mb-3 h6">
Wiki
</h3>
<div class="row row-cols-1 row-cols-md-3 g-3">
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Free</h4>
</div>
<p class="text-muted small mb-2">Included</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Basic</h4>
</div>
<p class="text-muted small mb-2">$5.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100 border-primary">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Plus</h4>
<span class="badge text-bg-success">Current plan</span>
</div>
<p class="text-muted small mb-2">Paused while Plus is granted</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
<li class="mb-1">&middot; 1 Plan Site</li>
</ul>
<button type="button" class="btn btn-outline-secondary btn-sm w-100 mt-auto"
data-bs-toggle="modal"
data-bs-target="#confirmActionModal"
data-action-url="/partials/member/plans/cancel"
data-action-method="post"
data-action-target="#member-plans"
data-action-title="Cancel plan"
data-action-body="Your subscription ends on Jan 15, 2099; Plus stays granted."
data-action-confirm-label="Cancel plan"
data-action-style="warning"
data-action-fields='{"ladder_id": "<ladder:Wiki>"}'>Cancel plan</button>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Standard</h4>
</div>
<p class="text-muted small mb-2">$20.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Pro</h4>
</div>
<p class="text-muted small mb-2">$30.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
<li class="mb-1">&middot; 10 Plan Sites</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="border-start border-3 ps-3 mb-4 border-primary">
<h3 class="fw-bold mb-3 h6">
Duo
</h3>
<div class="row row-cols-1 row-cols-md-3 g-3">
<div class="col">
<div class="card h-100 border-primary">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Plus</h4>
<span class="badge text-bg-success">Current plan</span>
</div>
<p class="text-muted small mb-2">Paused while Plus is granted</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
<li class="mb-1">&middot; 1 Plan Site</li>
</ul>
<button type="button" class="btn btn-outline-secondary btn-sm w-100 mt-auto"
data-bs-toggle="modal"
data-bs-target="#confirmActionModal"
data-action-url="/partials/member/plans/cancel"
data-action-method="post"
data-action-target="#member-plans"
data-action-title="Cancel plan"
data-action-body="Your subscription ends on Jan 15, 2099; Plus stays granted."
data-action-confirm-label="Cancel plan"
data-action-style="warning"
data-action-fields='{"ladder_id": "<ladder:Duo>"}'>Cancel plan</button>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Duo Max</h4>
</div>
<p class="text-muted small mb-2">$40.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="border-start border-3 ps-3 mb-4 border-secondary-subtle">
<h3 class="fw-bold mb-3 h6 text-muted">
Prices
</h3>
<div class="row row-cols-1 row-cols-md-3 g-3">
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Entry</h4>
</div>
<p class="text-muted small mb-2">$5.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<button type="button" class="btn btn-outline-primary btn-sm w-100 mt-auto"
hx-post="/billing/checkout" hx-vals='{"price_id": "<price:Entry>"}'
hx-target="#checkout-error-<ladder:Prices>-<product:Entry>" hx-swap="innerHTML">Subscribe</button>
<div id="checkout-error-<ladder:Prices>-<product:Entry>" class="small text-danger mt-1"></div>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Once</h4>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Once>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Once>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Unmapped</h4>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Unmapped>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Unmapped>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Elsewhere</h4>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Elsewhere>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Elsewhere>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Bare</h4>
</div>
<p class="text-muted small mb-2">Included</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Bare>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Bare>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,432 @@
{
"Ladders": [
{
"Name": "Wiki",
"SortOrder": 1,
"Tiers": [
{
"ProductID": "<product:Free>",
"Name": "Free",
"Description": "",
"Rank": 0,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": true,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
"Name": "Basic",
"Description": "",
"Rank": 1,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Basic>",
"Purchasable": true,
"PriceText": "$5.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
"Name": "Plus",
"Description": "",
"Rank": 2,
"Relation": "current",
"EntitlementFeatures": [
"1 Plan Site"
],
"MetadataFeatures": null,
"PriceID": "",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "$10.00/month",
"BillingRenewsOn": "Jan 15, 2099",
"BillingPending": false,
"LadderID": "<ladder:Wiki>",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": true,
"CanKeep": false,
"CancelBody": "Your subscription ends on Jan 15, 2099; Plus stays granted.",
"Held": false,
"PaidUnderGrant": true,
"GrantedName": "Plus",
"CollectionPaused": true
},
{
"ProductID": "<product:Standard>",
"Name": "Standard",
"Description": "",
"Rank": 3,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Standard>",
"Purchasable": true,
"PriceText": "$20.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
"Name": "Pro",
"Description": "",
"Rank": 4,
"Relation": "",
"EntitlementFeatures": [
"10 Plan Sites"
],
"MetadataFeatures": null,
"PriceID": "<price:Pro>",
"Purchasable": true,
"PriceText": "$30.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
"CancelsOn": ""
},
{
"Name": "Duo",
"SortOrder": 2,
"Tiers": [
{
"ProductID": "<product:Plus>",
"Name": "Plus",
"Description": "",
"Rank": 0,
"Relation": "current",
"EntitlementFeatures": [
"1 Plan Site"
],
"MetadataFeatures": null,
"PriceID": "",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "$10.00/month",
"BillingRenewsOn": "Jan 15, 2099",
"BillingPending": false,
"LadderID": "<ladder:Duo>",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": true,
"CanKeep": false,
"CancelBody": "Your subscription ends on Jan 15, 2099; Plus stays granted.",
"Held": false,
"PaidUnderGrant": true,
"GrantedName": "Plus",
"CollectionPaused": true
},
{
"ProductID": "<product:Duo Max>",
"Name": "Duo Max",
"Description": "",
"Rank": 1,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Duo Max>",
"Purchasable": true,
"PriceText": "$40.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
"CancelsOn": ""
},
{
"Name": "Prices",
"SortOrder": 3,
"Tiers": [
{
"ProductID": "<product:Entry>",
"Name": "Entry",
"Description": "",
"Rank": 0,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Entry>",
"Purchasable": true,
"PriceText": "$5.00/month",
"NoPriceTier": false,
"MoveEnabled": true,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
"Name": "Once",
"Description": "",
"Rank": 1,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Once>",
"Purchasable": true,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
"Name": "Unmapped",
"Description": "",
"Rank": 2,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Unmapped>",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
"Name": "Elsewhere",
"Description": "",
"Rank": 3,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Elsewhere>",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
"Name": "Bare",
"Description": "",
"Rank": 4,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": true,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
"CancelsOn": ""
}
],
"Error": "",
"Success": ""
}
+48 -12
View File
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -94,7 +100,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -196,7 +211,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
+48 -12
View File
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -94,7 +100,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -196,7 +211,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": true,
"CanKeep": false,
"CancelBody": "You keep Basic until Jan 15, 2099, then move to Standard.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -94,7 +100,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": true
"Held": true,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -196,7 +211,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "You keep Basic until Jan 15, 2099, then move to Free.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": true,
"CanKeep": false,
"CancelBody": "You keep Basic until Jan 15, 2099, then move to Free.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -94,7 +100,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -196,7 +211,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "You keep Plus until Jan 15, 2099, then move to Free on Wiki and leave Duo.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -94,7 +100,10 @@
"CanCancel": true,
"CanKeep": false,
"CancelBody": "You keep Plus until Jan 15, 2099, then move to Free on Wiki and leave Duo.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -196,7 +211,10 @@
"CanCancel": true,
"CanKeep": false,
"CancelBody": "You keep Plus until Jan 15, 2099, then move to Free on Wiki and leave Duo.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -0,0 +1,391 @@
<div class="border-start border-3 ps-3 mb-4 border-primary">
<h3 class="fw-bold mb-3 h6">
Wiki
</h3>
<div class="row row-cols-1 row-cols-md-3 g-3">
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Free</h4>
</div>
<p class="text-muted small mb-2">Included</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Basic</h4>
</div>
<p class="text-muted small mb-2">$5.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Plus</h4>
</div>
<p class="text-muted small mb-2">$10.00/month, paused</p>
<p class="small text-danger mb-2">Entitlements are suspended.</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
<li class="mb-1">&middot; 1 Plan Site</li>
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Standard</h4>
</div>
<p class="text-muted small mb-2">$20.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100 border-primary">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Pro</h4>
<span class="badge text-bg-success">Current plan</span>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
<li class="mb-1">&middot; 10 Plan Sites</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="border-start border-3 ps-3 mb-4 border-secondary-subtle">
<h3 class="fw-bold mb-3 h6 text-muted">
Duo
</h3>
<div class="row row-cols-1 row-cols-md-3 g-3">
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Plus</h4>
</div>
<p class="text-muted small mb-2">$10.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
<li class="mb-1">&middot; 1 Plan Site</li>
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Duo Max</h4>
</div>
<p class="text-muted small mb-2">$40.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="border-start border-3 ps-3 mb-4 border-secondary-subtle">
<h3 class="fw-bold mb-3 h6 text-muted">
Prices
</h3>
<div class="row row-cols-1 row-cols-md-3 g-3">
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Entry</h4>
</div>
<p class="text-muted small mb-2">$5.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<button type="button" class="btn btn-outline-primary btn-sm w-100 mt-auto"
hx-post="/billing/checkout" hx-vals='{"price_id": "<price:Entry>"}'
hx-target="#checkout-error-<ladder:Prices>-<product:Entry>" hx-swap="innerHTML">Subscribe</button>
<div id="checkout-error-<ladder:Prices>-<product:Entry>" class="small text-danger mt-1"></div>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Once</h4>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Once>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Once>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Unmapped</h4>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Unmapped>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Unmapped>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Elsewhere</h4>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Elsewhere>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Elsewhere>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Bare</h4>
</div>
<p class="text-muted small mb-2">Included</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Bare>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Bare>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,432 @@
{
"Ladders": [
{
"Name": "Wiki",
"SortOrder": 1,
"Tiers": [
{
"ProductID": "<product:Free>",
"Name": "Free",
"Description": "",
"Rank": 0,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": true,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
"Name": "Basic",
"Description": "",
"Rank": 1,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Basic>",
"Purchasable": true,
"PriceText": "$5.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
"Name": "Plus",
"Description": "",
"Rank": 2,
"Relation": "",
"EntitlementFeatures": [
"1 Plan Site"
],
"MetadataFeatures": null,
"PriceID": "<price:Plus>",
"Purchasable": true,
"PriceText": "$10.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "$10.00/month",
"BillingRenewsOn": "Jan 15, 2099",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "paused",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": true,
"GrantedName": "Pro",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
"Name": "Standard",
"Description": "",
"Rank": 3,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Standard>",
"Purchasable": true,
"PriceText": "$20.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
"Name": "Pro",
"Description": "",
"Rank": 4,
"Relation": "current",
"EntitlementFeatures": [
"10 Plan Sites"
],
"MetadataFeatures": null,
"PriceID": "",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
"CancelsOn": ""
},
{
"Name": "Duo",
"SortOrder": 2,
"Tiers": [
{
"ProductID": "<product:Plus>",
"Name": "Plus",
"Description": "",
"Rank": 0,
"Relation": "",
"EntitlementFeatures": [
"1 Plan Site"
],
"MetadataFeatures": null,
"PriceID": "<price:Plus>",
"Purchasable": true,
"PriceText": "$10.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
"Name": "Duo Max",
"Description": "",
"Rank": 1,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Duo Max>",
"Purchasable": true,
"PriceText": "$40.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
"CancelsOn": ""
},
{
"Name": "Prices",
"SortOrder": 3,
"Tiers": [
{
"ProductID": "<product:Entry>",
"Name": "Entry",
"Description": "",
"Rank": 0,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Entry>",
"Purchasable": true,
"PriceText": "$5.00/month",
"NoPriceTier": false,
"MoveEnabled": true,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
"Name": "Once",
"Description": "",
"Rank": 1,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Once>",
"Purchasable": true,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
"Name": "Unmapped",
"Description": "",
"Rank": 2,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Unmapped>",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
"Name": "Elsewhere",
"Description": "",
"Rank": 3,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Elsewhere>",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
"Name": "Bare",
"Description": "",
"Rank": 4,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": true,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
"CancelsOn": ""
}
],
"Error": "",
"Success": ""
}
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "You keep your current plan until the end of this billing period.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -94,7 +100,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -196,7 +211,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -0,0 +1,394 @@
<div class="border-start border-3 ps-3 mb-4 border-primary">
<h3 class="fw-bold mb-3 h6">
Wiki
<span class="badge text-bg-warning">Cancels on Jan 15, 2099</span>
</h3>
<div class="row row-cols-1 row-cols-md-3 g-3">
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Free</h4>
</div>
<p class="text-muted small mb-2">Included</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Basic</h4>
</div>
<p class="text-muted small mb-2">$5.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Plus</h4>
</div>
<p class="text-muted small mb-2">Paused while Pro is granted</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
<li class="mb-1">&middot; 1 Plan Site</li>
</ul>
<button type="button" class="btn btn-outline-primary btn-sm w-100 mt-auto"
hx-post="/partials/member/plans/keep" hx-vals='{"ladder_id": "<ladder:Wiki>"}'
hx-target="#member-plans" hx-swap="innerHTML">Keep plan</button>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Standard</h4>
</div>
<p class="text-muted small mb-2">$20.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100 border-primary">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Pro</h4>
<span class="badge text-bg-success">Current plan</span>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
<li class="mb-1">&middot; 10 Plan Sites</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="border-start border-3 ps-3 mb-4 border-secondary-subtle">
<h3 class="fw-bold mb-3 h6 text-muted">
Duo
</h3>
<div class="row row-cols-1 row-cols-md-3 g-3">
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Plus</h4>
</div>
<p class="text-muted small mb-2">$10.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
<li class="mb-1">&middot; 1 Plan Site</li>
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Duo Max</h4>
</div>
<p class="text-muted small mb-2">$40.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="border-start border-3 ps-3 mb-4 border-secondary-subtle">
<h3 class="fw-bold mb-3 h6 text-muted">
Prices
</h3>
<div class="row row-cols-1 row-cols-md-3 g-3">
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Entry</h4>
</div>
<p class="text-muted small mb-2">$5.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<button type="button" class="btn btn-outline-primary btn-sm w-100 mt-auto"
hx-post="/billing/checkout" hx-vals='{"price_id": "<price:Entry>"}'
hx-target="#checkout-error-<ladder:Prices>-<product:Entry>" hx-swap="innerHTML">Subscribe</button>
<div id="checkout-error-<ladder:Prices>-<product:Entry>" class="small text-danger mt-1"></div>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Once</h4>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Once>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Once>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Unmapped</h4>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Unmapped>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Unmapped>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Elsewhere</h4>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Elsewhere>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Elsewhere>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Bare</h4>
</div>
<p class="text-muted small mb-2">Included</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Bare>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Bare>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,432 @@
{
"Ladders": [
{
"Name": "Wiki",
"SortOrder": 1,
"Tiers": [
{
"ProductID": "<product:Free>",
"Name": "Free",
"Description": "",
"Rank": 0,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": true,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
"Name": "Basic",
"Description": "",
"Rank": 1,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Basic>",
"Purchasable": true,
"PriceText": "$5.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
"Name": "Plus",
"Description": "",
"Rank": 2,
"Relation": "",
"EntitlementFeatures": [
"1 Plan Site"
],
"MetadataFeatures": null,
"PriceID": "<price:Plus>",
"Purchasable": true,
"PriceText": "$10.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "$10.00/month",
"BillingRenewsOn": "Jan 15, 2099",
"BillingPending": false,
"LadderID": "<ladder:Wiki>",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "Jan 15, 2099",
"Suspension": "",
"CanCancel": false,
"CanKeep": true,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": true,
"GrantedName": "Pro",
"CollectionPaused": true
},
{
"ProductID": "<product:Standard>",
"Name": "Standard",
"Description": "",
"Rank": 3,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Standard>",
"Purchasable": true,
"PriceText": "$20.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
"Name": "Pro",
"Description": "",
"Rank": 4,
"Relation": "current",
"EntitlementFeatures": [
"10 Plan Sites"
],
"MetadataFeatures": null,
"PriceID": "",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
"CancelsOn": "Jan 15, 2099"
},
{
"Name": "Duo",
"SortOrder": 2,
"Tiers": [
{
"ProductID": "<product:Plus>",
"Name": "Plus",
"Description": "",
"Rank": 0,
"Relation": "",
"EntitlementFeatures": [
"1 Plan Site"
],
"MetadataFeatures": null,
"PriceID": "<price:Plus>",
"Purchasable": true,
"PriceText": "$10.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
"Name": "Duo Max",
"Description": "",
"Rank": 1,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Duo Max>",
"Purchasable": true,
"PriceText": "$40.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
"CancelsOn": ""
},
{
"Name": "Prices",
"SortOrder": 3,
"Tiers": [
{
"ProductID": "<product:Entry>",
"Name": "Entry",
"Description": "",
"Rank": 0,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Entry>",
"Purchasable": true,
"PriceText": "$5.00/month",
"NoPriceTier": false,
"MoveEnabled": true,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
"Name": "Once",
"Description": "",
"Rank": 1,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Once>",
"Purchasable": true,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
"Name": "Unmapped",
"Description": "",
"Rank": 2,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Unmapped>",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
"Name": "Elsewhere",
"Description": "",
"Rank": 3,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Elsewhere>",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
"Name": "Bare",
"Description": "",
"Rank": 4,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": true,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
"CancelsOn": ""
}
],
"Error": "",
"Success": ""
}
@@ -0,0 +1,406 @@
<div class="border-start border-3 ps-3 mb-4 border-primary">
<h3 class="fw-bold mb-3 h6">
Wiki
</h3>
<div class="row row-cols-1 row-cols-md-3 g-3">
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Free</h4>
</div>
<p class="text-muted small mb-2">Included</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Basic</h4>
</div>
<p class="text-muted small mb-2">$5.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Plus</h4>
</div>
<p class="text-muted small mb-2">Paused while Pro is granted, moves to Basic on Jan 15, 2099</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
<li class="mb-1">&middot; 1 Plan Site</li>
</ul>
<button type="button" class="btn btn-outline-primary btn-sm w-100 mt-auto"
hx-post="/partials/member/plans/keep" hx-vals='{"ladder_id": "<ladder:Wiki>"}'
hx-target="#member-plans" hx-swap="innerHTML">Keep plan</button>
<button type="button" class="btn btn-outline-secondary btn-sm w-100 mt-2"
data-bs-toggle="modal"
data-bs-target="#confirmActionModal"
data-action-url="/partials/member/plans/cancel"
data-action-method="post"
data-action-target="#member-plans"
data-action-title="Cancel plan"
data-action-body="Plus ends on Jan 15, 2099; Pro stays granted."
data-action-confirm-label="Cancel plan"
data-action-style="warning"
data-action-fields='{"ladder_id": "<ladder:Wiki>"}'>Cancel plan</button>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Standard</h4>
</div>
<p class="text-muted small mb-2">$20.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100 border-primary">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Pro</h4>
<span class="badge text-bg-success">Current plan</span>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
<li class="mb-1">&middot; 10 Plan Sites</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="border-start border-3 ps-3 mb-4 border-secondary-subtle">
<h3 class="fw-bold mb-3 h6 text-muted">
Duo
</h3>
<div class="row row-cols-1 row-cols-md-3 g-3">
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Plus</h4>
</div>
<p class="text-muted small mb-2">$10.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
<li class="mb-1">&middot; 1 Plan Site</li>
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Duo Max</h4>
</div>
<p class="text-muted small mb-2">$40.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="border-start border-3 ps-3 mb-4 border-secondary-subtle">
<h3 class="fw-bold mb-3 h6 text-muted">
Prices
</h3>
<div class="row row-cols-1 row-cols-md-3 g-3">
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Entry</h4>
</div>
<p class="text-muted small mb-2">$5.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<button type="button" class="btn btn-outline-primary btn-sm w-100 mt-auto"
hx-post="/billing/checkout" hx-vals='{"price_id": "<price:Entry>"}'
hx-target="#checkout-error-<ladder:Prices>-<product:Entry>" hx-swap="innerHTML">Subscribe</button>
<div id="checkout-error-<ladder:Prices>-<product:Entry>" class="small text-danger mt-1"></div>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Once</h4>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Once>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Once>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Unmapped</h4>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Unmapped>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Unmapped>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Elsewhere</h4>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Elsewhere>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Elsewhere>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Bare</h4>
</div>
<p class="text-muted small mb-2">Included</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Bare>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Bare>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,432 @@
{
"Ladders": [
{
"Name": "Wiki",
"SortOrder": 1,
"Tiers": [
{
"ProductID": "<product:Free>",
"Name": "Free",
"Description": "",
"Rank": 0,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": true,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
"Name": "Basic",
"Description": "",
"Rank": 1,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Basic>",
"Purchasable": true,
"PriceText": "$5.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
"Name": "Plus",
"Description": "",
"Rank": 2,
"Relation": "",
"EntitlementFeatures": [
"1 Plan Site"
],
"MetadataFeatures": null,
"PriceID": "<price:Plus>",
"Purchasable": true,
"PriceText": "$10.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "$10.00/month",
"BillingRenewsOn": "Jan 15, 2099",
"BillingPending": false,
"LadderID": "<ladder:Wiki>",
"MovesTo": "Basic",
"MovesOn": "Jan 15, 2099",
"EndsOn": "",
"Suspension": "",
"CanCancel": true,
"CanKeep": true,
"CancelBody": "Plus ends on Jan 15, 2099; Pro stays granted.",
"Held": false,
"PaidUnderGrant": true,
"GrantedName": "Pro",
"CollectionPaused": true
},
{
"ProductID": "<product:Standard>",
"Name": "Standard",
"Description": "",
"Rank": 3,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Standard>",
"Purchasable": true,
"PriceText": "$20.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
"Name": "Pro",
"Description": "",
"Rank": 4,
"Relation": "current",
"EntitlementFeatures": [
"10 Plan Sites"
],
"MetadataFeatures": null,
"PriceID": "",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
"CancelsOn": ""
},
{
"Name": "Duo",
"SortOrder": 2,
"Tiers": [
{
"ProductID": "<product:Plus>",
"Name": "Plus",
"Description": "",
"Rank": 0,
"Relation": "",
"EntitlementFeatures": [
"1 Plan Site"
],
"MetadataFeatures": null,
"PriceID": "<price:Plus>",
"Purchasable": true,
"PriceText": "$10.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
"Name": "Duo Max",
"Description": "",
"Rank": 1,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Duo Max>",
"Purchasable": true,
"PriceText": "$40.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
"CancelsOn": ""
},
{
"Name": "Prices",
"SortOrder": 3,
"Tiers": [
{
"ProductID": "<product:Entry>",
"Name": "Entry",
"Description": "",
"Rank": 0,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Entry>",
"Purchasable": true,
"PriceText": "$5.00/month",
"NoPriceTier": false,
"MoveEnabled": true,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
"Name": "Once",
"Description": "",
"Rank": 1,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Once>",
"Purchasable": true,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
"Name": "Unmapped",
"Description": "",
"Rank": 2,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Unmapped>",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
"Name": "Elsewhere",
"Description": "",
"Rank": 3,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Elsewhere>",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
"Name": "Bare",
"Description": "",
"Rank": 4,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": true,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
"CancelsOn": ""
}
],
"Error": "",
"Success": ""
}
@@ -0,0 +1,404 @@
<div class="border-start border-3 ps-3 mb-4 border-primary">
<h3 class="fw-bold mb-3 h6">
Wiki
</h3>
<div class="row row-cols-1 row-cols-md-3 g-3">
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Free</h4>
</div>
<p class="text-muted small mb-2">Included</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Basic</h4>
</div>
<p class="text-muted small mb-2">$5.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Plus</h4>
</div>
<p class="text-muted small mb-2">Paused while Pro is granted, payment due</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
<li class="mb-1">&middot; 1 Plan Site</li>
</ul>
<a href="/billing/plans/<ladder:Wiki>/unpaid-invoice" target="_blank" rel="noopener" hx-boost="false" class="btn btn-outline-primary btn-sm w-100 mt-auto">Pay invoice</a>
<button type="button" class="btn btn-outline-secondary btn-sm w-100 mt-2"
data-bs-toggle="modal"
data-bs-target="#confirmActionModal"
data-action-url="/partials/member/plans/cancel"
data-action-method="post"
data-action-target="#member-plans"
data-action-title="Cancel plan"
data-action-body="Plus ends on Jan 15, 2099; Pro stays granted. The unpaid invoice stays due."
data-action-confirm-label="Cancel plan"
data-action-style="warning"
data-action-fields='{"ladder_id": "<ladder:Wiki>"}'>Cancel plan</button>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Standard</h4>
</div>
<p class="text-muted small mb-2">$20.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100 border-primary">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Pro</h4>
<span class="badge text-bg-success">Current plan</span>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
<li class="mb-1">&middot; 10 Plan Sites</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="border-start border-3 ps-3 mb-4 border-secondary-subtle">
<h3 class="fw-bold mb-3 h6 text-muted">
Duo
</h3>
<div class="row row-cols-1 row-cols-md-3 g-3">
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Plus</h4>
</div>
<p class="text-muted small mb-2">$10.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
<li class="mb-1">&middot; 1 Plan Site</li>
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Duo Max</h4>
</div>
<p class="text-muted small mb-2">$40.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="border-start border-3 ps-3 mb-4 border-secondary-subtle">
<h3 class="fw-bold mb-3 h6 text-muted">
Prices
</h3>
<div class="row row-cols-1 row-cols-md-3 g-3">
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Entry</h4>
</div>
<p class="text-muted small mb-2">$5.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<button type="button" class="btn btn-outline-primary btn-sm w-100 mt-auto"
hx-post="/billing/checkout" hx-vals='{"price_id": "<price:Entry>"}'
hx-target="#checkout-error-<ladder:Prices>-<product:Entry>" hx-swap="innerHTML">Subscribe</button>
<div id="checkout-error-<ladder:Prices>-<product:Entry>" class="small text-danger mt-1"></div>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Once</h4>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Once>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Once>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Unmapped</h4>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Unmapped>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Unmapped>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Elsewhere</h4>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Elsewhere>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Elsewhere>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Bare</h4>
</div>
<p class="text-muted small mb-2">Included</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Bare>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Bare>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,432 @@
{
"Ladders": [
{
"Name": "Wiki",
"SortOrder": 1,
"Tiers": [
{
"ProductID": "<product:Free>",
"Name": "Free",
"Description": "",
"Rank": 0,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": true,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
"Name": "Basic",
"Description": "",
"Rank": 1,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Basic>",
"Purchasable": true,
"PriceText": "$5.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
"Name": "Plus",
"Description": "",
"Rank": 2,
"Relation": "",
"EntitlementFeatures": [
"1 Plan Site"
],
"MetadataFeatures": null,
"PriceID": "<price:Plus>",
"Purchasable": true,
"PriceText": "$10.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "$10.00/month",
"BillingRenewsOn": "Jan 15, 2099",
"BillingPending": false,
"LadderID": "<ladder:Wiki>",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "payment_due",
"CanCancel": true,
"CanKeep": false,
"CancelBody": "Plus ends on Jan 15, 2099; Pro stays granted. The unpaid invoice stays due.",
"Held": false,
"PaidUnderGrant": true,
"GrantedName": "Pro",
"CollectionPaused": true
},
{
"ProductID": "<product:Standard>",
"Name": "Standard",
"Description": "",
"Rank": 3,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Standard>",
"Purchasable": true,
"PriceText": "$20.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
"Name": "Pro",
"Description": "",
"Rank": 4,
"Relation": "current",
"EntitlementFeatures": [
"10 Plan Sites"
],
"MetadataFeatures": null,
"PriceID": "",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
"CancelsOn": ""
},
{
"Name": "Duo",
"SortOrder": 2,
"Tiers": [
{
"ProductID": "<product:Plus>",
"Name": "Plus",
"Description": "",
"Rank": 0,
"Relation": "",
"EntitlementFeatures": [
"1 Plan Site"
],
"MetadataFeatures": null,
"PriceID": "<price:Plus>",
"Purchasable": true,
"PriceText": "$10.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
"Name": "Duo Max",
"Description": "",
"Rank": 1,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Duo Max>",
"Purchasable": true,
"PriceText": "$40.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
"CancelsOn": ""
},
{
"Name": "Prices",
"SortOrder": 3,
"Tiers": [
{
"ProductID": "<product:Entry>",
"Name": "Entry",
"Description": "",
"Rank": 0,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Entry>",
"Purchasable": true,
"PriceText": "$5.00/month",
"NoPriceTier": false,
"MoveEnabled": true,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
"Name": "Once",
"Description": "",
"Rank": 1,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Once>",
"Purchasable": true,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
"Name": "Unmapped",
"Description": "",
"Rank": 2,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Unmapped>",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
"Name": "Elsewhere",
"Description": "",
"Rank": 3,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Elsewhere>",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
"Name": "Bare",
"Description": "",
"Rank": 4,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": true,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
"CancelsOn": ""
}
],
"Error": "",
"Success": ""
}
@@ -0,0 +1,402 @@
<div class="border-start border-3 ps-3 mb-4 border-primary">
<h3 class="fw-bold mb-3 h6">
Wiki
</h3>
<div class="row row-cols-1 row-cols-md-3 g-3">
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Free</h4>
</div>
<p class="text-muted small mb-2">Included</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Basic</h4>
</div>
<p class="text-muted small mb-2">$5.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Plus</h4>
</div>
<p class="text-muted small mb-2">$10.00/month, renews Jan 15, 2099</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
<li class="mb-1">&middot; 1 Plan Site</li>
</ul>
<button type="button" class="btn btn-outline-secondary btn-sm w-100 mt-auto"
data-bs-toggle="modal"
data-bs-target="#confirmActionModal"
data-action-url="/partials/member/plans/cancel"
data-action-method="post"
data-action-target="#member-plans"
data-action-title="Cancel plan"
data-action-body="Plus ends on Jan 15, 2099; Pro stays granted."
data-action-confirm-label="Cancel plan"
data-action-style="warning"
data-action-fields='{"ladder_id": "<ladder:Wiki>"}'>Cancel plan</button>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Standard</h4>
</div>
<p class="text-muted small mb-2">$20.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100 border-primary">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Pro</h4>
<span class="badge text-bg-success">Current plan</span>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
<li class="mb-1">&middot; 10 Plan Sites</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="border-start border-3 ps-3 mb-4 border-secondary-subtle">
<h3 class="fw-bold mb-3 h6 text-muted">
Duo
</h3>
<div class="row row-cols-1 row-cols-md-3 g-3">
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Plus</h4>
</div>
<p class="text-muted small mb-2">$10.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
<li class="mb-1">&middot; 1 Plan Site</li>
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Duo Max</h4>
</div>
<p class="text-muted small mb-2">$40.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="border-start border-3 ps-3 mb-4 border-secondary-subtle">
<h3 class="fw-bold mb-3 h6 text-muted">
Prices
</h3>
<div class="row row-cols-1 row-cols-md-3 g-3">
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Entry</h4>
</div>
<p class="text-muted small mb-2">$5.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<button type="button" class="btn btn-outline-primary btn-sm w-100 mt-auto"
hx-post="/billing/checkout" hx-vals='{"price_id": "<price:Entry>"}'
hx-target="#checkout-error-<ladder:Prices>-<product:Entry>" hx-swap="innerHTML">Subscribe</button>
<div id="checkout-error-<ladder:Prices>-<product:Entry>" class="small text-danger mt-1"></div>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Once</h4>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Once>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Once>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Unmapped</h4>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Unmapped>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Unmapped>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Elsewhere</h4>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Elsewhere>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Elsewhere>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Bare</h4>
</div>
<p class="text-muted small mb-2">Included</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<span class="disabled-control d-inline-block"><button type="button" class="btn btn-secondary btn-sm w-100 mt-auto opacity-50" disabled aria-describedby="move-disabled-<ladder:Prices>-<product:Bare>">Subscribe</button></span>
<small id="move-disabled-<ladder:Prices>-<product:Bare>" class="text-muted d-block mt-1">Not available for purchase yet</small>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,432 @@
{
"Ladders": [
{
"Name": "Wiki",
"SortOrder": 1,
"Tiers": [
{
"ProductID": "<product:Free>",
"Name": "Free",
"Description": "",
"Rank": 0,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": true,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
"Name": "Basic",
"Description": "",
"Rank": 1,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Basic>",
"Purchasable": true,
"PriceText": "$5.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
"Name": "Plus",
"Description": "",
"Rank": 2,
"Relation": "",
"EntitlementFeatures": [
"1 Plan Site"
],
"MetadataFeatures": null,
"PriceID": "<price:Plus>",
"Purchasable": true,
"PriceText": "$10.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "$10.00/month",
"BillingRenewsOn": "Jan 15, 2099",
"BillingPending": false,
"LadderID": "<ladder:Wiki>",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": true,
"CanKeep": false,
"CancelBody": "Plus ends on Jan 15, 2099; Pro stays granted.",
"Held": false,
"PaidUnderGrant": true,
"GrantedName": "Pro",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
"Name": "Standard",
"Description": "",
"Rank": 3,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Standard>",
"Purchasable": true,
"PriceText": "$20.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
"Name": "Pro",
"Description": "",
"Rank": 4,
"Relation": "current",
"EntitlementFeatures": [
"10 Plan Sites"
],
"MetadataFeatures": null,
"PriceID": "",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
"CancelsOn": ""
},
{
"Name": "Duo",
"SortOrder": 2,
"Tiers": [
{
"ProductID": "<product:Plus>",
"Name": "Plus",
"Description": "",
"Rank": 0,
"Relation": "",
"EntitlementFeatures": [
"1 Plan Site"
],
"MetadataFeatures": null,
"PriceID": "<price:Plus>",
"Purchasable": true,
"PriceText": "$10.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
"Name": "Duo Max",
"Description": "",
"Rank": 1,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Duo Max>",
"Purchasable": true,
"PriceText": "$40.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
"CancelsOn": ""
},
{
"Name": "Prices",
"SortOrder": 3,
"Tiers": [
{
"ProductID": "<product:Entry>",
"Name": "Entry",
"Description": "",
"Rank": 0,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Entry>",
"Purchasable": true,
"PriceText": "$5.00/month",
"NoPriceTier": false,
"MoveEnabled": true,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
"Name": "Once",
"Description": "",
"Rank": 1,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Once>",
"Purchasable": true,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
"Name": "Unmapped",
"Description": "",
"Rank": 2,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Unmapped>",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
"Name": "Elsewhere",
"Description": "",
"Rank": 3,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Elsewhere>",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
"Name": "Bare",
"Description": "",
"Rank": 4,
"Relation": "available",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": true,
"MoveEnabled": false,
"MoveKind": "checkout",
"MoveLadderID": "<ladder:Prices>",
"MoveLabel": "Subscribe",
"DisabledReason": "Not available for purchase yet",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
"CancelsOn": ""
}
],
"Error": "",
"Success": ""
}
@@ -71,7 +71,9 @@
</div>
<p class="text-muted small mb-2">$10.00/month</p>
<p class="text-muted small mb-2">Paused while Pro is granted</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
@@ -84,6 +86,21 @@
<button type="button" class="btn btn-outline-secondary btn-sm w-100 mt-auto"
data-bs-toggle="modal"
data-bs-target="#confirmActionModal"
data-action-url="/partials/member/plans/cancel"
data-action-method="post"
data-action-target="#member-plans"
data-action-title="Cancel plan"
data-action-body="Plus ends on Jan 15, 2099; Pro stays granted."
data-action-confirm-label="Cancel plan"
data-action-style="warning"
data-action-fields='{"ladder_id": "<ladder:Wiki>"}'>Cancel plan</button>
</div>
</div>
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -83,18 +89,21 @@
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPriceText": "$10.00/month",
"BillingRenewsOn": "Jan 15, 2099",
"BillingPending": false,
"LadderID": "",
"LadderID": "<ladder:Wiki>",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanCancel": true,
"CanKeep": false,
"CancelBody": "",
"Held": false
"CancelBody": "Plus ends on Jan 15, 2099; Pro stays granted.",
"Held": false,
"PaidUnderGrant": true,
"GrantedName": "Pro",
"CollectionPaused": true
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -196,7 +211,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "You keep Pro until Jan 15, 2099, then move to Free.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -94,7 +100,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": true,
"CanKeep": false,
"CancelBody": "You keep Pro until Jan 15, 2099, then move to Free.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -196,7 +211,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -94,7 +100,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": true
"Held": true,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": false,
"CanKeep": true,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -196,7 +211,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -94,7 +100,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": false,
"CanKeep": true,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -196,7 +211,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "You keep Pro until Jan 15, 2099, then move to Free.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -94,7 +100,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": true,
"CanKeep": true,
"CancelBody": "You keep Pro until Jan 15, 2099, then move to Free.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -196,7 +211,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -94,7 +100,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "You keep Pro until Jan 15, 2099, then move to Plus on Wiki and Duo.",
"Held": true
"Held": true,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": true,
"CanKeep": false,
"CancelBody": "You keep Pro until Jan 15, 2099, then move to Plus on Wiki and Duo.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -196,7 +211,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -94,7 +100,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": false,
"CanKeep": true,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -196,7 +211,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "Pro ends on Jan 15, 2099, then you move to Free. The unpaid invoice stays due.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -94,7 +100,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": true,
"CanKeep": false,
"CancelBody": "Pro ends on Jan 15, 2099, then you move to Free. The unpaid invoice stays due.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -196,7 +211,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "Pro ends on Jan 15, 2099, then you move to Free. The unpaid invoice stays due.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -94,7 +100,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": true,
"CanKeep": true,
"CancelBody": "Pro ends on Jan 15, 2099, then you move to Free. The unpaid invoice stays due.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -196,7 +211,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -94,7 +100,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "Pro ends on Jan 15, 2099, then you move to Plus on Wiki and Duo. The unpaid invoice stays due.",
"Held": true
"Held": true,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": true,
"CanKeep": false,
"CancelBody": "Pro ends on Jan 15, 2099, then you move to Plus on Wiki and Duo. The unpaid invoice stays due.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -196,7 +211,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -94,7 +100,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": true,
"CanKeep": false,
"CancelBody": "Pro ends on Jan 15, 2099. The unpaid invoice stays due.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -196,7 +211,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
+48 -12
View File
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "Pro ends on Jan 15, 2099, then you move to Free. The unpaid invoice stays due.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -94,7 +100,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": true,
"CanKeep": false,
"CancelBody": "Pro ends on Jan 15, 2099, then you move to Free. The unpaid invoice stays due.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -196,7 +211,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
+48 -12
View File
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -94,7 +100,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -196,7 +211,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
+48 -12
View File
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "Pro ends on Jan 15, 2099, then you move to Free. The unpaid invoice stays due.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -94,7 +100,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": true,
"CanKeep": false,
"CancelBody": "Pro ends on Jan 15, 2099, then you move to Free. The unpaid invoice stays due.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -196,7 +211,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -0,0 +1,111 @@
<div class="border-start border-3 ps-3 mb-4 border-primary">
<h3 class="fw-bold mb-3 h6">
Wiki
</h3>
<div class="row row-cols-1 row-cols-md-3 g-3">
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Basic</h4>
</div>
<p class="text-muted small mb-2">$5.00/month</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Plus</h4>
</div>
<p class="text-muted small mb-2">Paused while Pro is granted</p>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
<button type="button" class="btn btn-outline-secondary btn-sm w-100 mt-auto"
data-bs-toggle="modal"
data-bs-target="#confirmActionModal"
data-action-url="/partials/member/plans/cancel"
data-action-method="post"
data-action-target="#member-plans"
data-action-title="Cancel plan"
data-action-body="Plus ends on Jan 15, 2099; Pro stays granted."
data-action-confirm-label="Cancel plan"
data-action-style="warning"
data-action-fields='{"ladder_id": "<ladder:Wiki>"}'>Cancel plan</button>
</div>
</div>
</div>
<div class="col">
<div class="card h-100 border-primary">
<div class="card-body d-flex flex-column">
<div class="d-flex justify-content-between align-items-start mb-2">
<h4 class="card-title mb-0 h6">Pro</h4>
<span class="badge text-bg-success">Current plan</span>
</div>
<ul class="list-unstyled small mb-3 flex-grow-1">
</ul>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,113 @@
{
"Ladders": [
{
"Name": "Wiki",
"SortOrder": 0,
"Tiers": [
{
"ProductID": "<product:Basic>",
"Name": "Basic",
"Description": "",
"Rank": 0,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Basic>",
"Purchasable": true,
"PriceText": "$5.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
"Name": "Plus",
"Description": "",
"Rank": 1,
"Relation": "",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "<price:Plus>",
"Purchasable": true,
"PriceText": "$10.00/month",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "$10.00/month",
"BillingRenewsOn": "Jan 15, 2099",
"BillingPending": false,
"LadderID": "<ladder:Wiki>",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": true,
"CanKeep": false,
"CancelBody": "Plus ends on Jan 15, 2099; Pro stays granted.",
"Held": false,
"PaidUnderGrant": true,
"GrantedName": "Pro",
"CollectionPaused": true
},
{
"ProductID": "<product:Pro>",
"Name": "Pro",
"Description": "",
"Rank": 2,
"Relation": "current",
"EntitlementFeatures": null,
"MetadataFeatures": null,
"PriceID": "",
"Purchasable": false,
"PriceText": "",
"NoPriceTier": false,
"MoveEnabled": false,
"MoveKind": "",
"MoveLadderID": "",
"MoveLabel": "",
"DisabledReason": "",
"BillingPriceText": "",
"BillingRenewsOn": "",
"BillingPending": false,
"LadderID": "",
"MovesTo": "",
"MovesOn": "",
"EndsOn": "",
"Suspension": "",
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
"CancelsOn": ""
}
],
"Error": "",
"Success": ""
}
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -94,7 +100,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -196,7 +211,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Gone>",
@@ -414,7 +450,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "Plus ends with this billing period. The unpaid invoice stays due.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -94,7 +100,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -196,7 +211,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
@@ -32,7 +32,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "You keep your current plan until the end of this billing period.",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Basic>",
@@ -62,7 +65,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Plus>",
@@ -94,7 +100,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Standard>",
@@ -124,7 +133,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Pro>",
@@ -156,7 +168,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -196,7 +211,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Duo Max>",
@@ -226,7 +244,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": true,
@@ -264,7 +285,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Once>",
@@ -294,7 +318,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Unmapped>",
@@ -324,7 +351,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Elsewhere>",
@@ -354,7 +384,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
},
{
"ProductID": "<product:Bare>",
@@ -384,7 +417,10 @@
"CanCancel": false,
"CanKeep": false,
"CancelBody": "",
"Held": false
"Held": false,
"PaidUnderGrant": false,
"GrantedName": "",
"CollectionPaused": false
}
],
"Enrolled": false,
+34 -1
View File
@@ -9,6 +9,7 @@ package stripetest
import (
"bytes"
"cmp"
"encoding/json"
"errors"
"maps"
@@ -61,7 +62,9 @@ type MockBackend struct {
PriceList []*stripe.Price
Charges []*stripe.Charge
// Invoices answers GET /v1/invoices/{id}, keyed by Stripe id; an id the
// map does not name answers resource_missing. InvoiceLines answers
// map does not name answers resource_missing. It also answers
// GET /v1/invoices, the invoices whose subscription and status match the
// form's, newest first. InvoiceLines answers
// GET /v1/invoices/{id}/lines, paged by limit and starting_after the way
// Stripe pages it. When an invoice here has no Lines of its own and
// InvoiceLines names it, the read embeds the first ten lines with
@@ -238,6 +241,8 @@ func (m *MockBackend) route(c Call) (any, error) {
case strings.HasPrefix(path, "/v1/invoices/") && strings.HasSuffix(path, "/void"):
id := strings.TrimSuffix(strings.TrimPrefix(path, "/v1/invoices/"), "/void")
return &stripe.Invoice{ID: id, Status: stripe.InvoiceStatusVoid}, nil
case path == "/v1/invoices" && method == "GET":
return m.invoiceList(c.Form), nil
case path == "/v1/invoices/create_preview" || path == "/v1/invoices/upcoming":
return m.preview()
case strings.HasPrefix(path, "/v1/invoices/") && strings.HasSuffix(path, "/lines") && method == "GET":
@@ -316,6 +321,34 @@ func (m *MockBackend) invoiceLines(id string, f url.Values) (any, error) {
return &stripe.InvoiceLineItemList{ListMeta: stripe.ListMeta{HasMore: hasMore}, Data: data}, nil
}
// invoiceList answers GET /v1/invoices from Invoices: the invoices whose
// subscription and status match the form's subscription and status when it
// names them, newest first by Created and then by id (the map has no order),
// paged by limit and starting_after.
func (m *MockBackend) invoiceList(f url.Values) *stripe.InvoiceList {
var matched []*stripe.Invoice
for _, inv := range m.Invoices {
if inv == nil {
continue
}
if sub := f.Get("subscription"); sub != "" && (inv.Subscription == nil || inv.Subscription.ID != sub) {
continue
}
if status := f.Get("status"); status != "" && string(inv.Status) != status {
continue
}
matched = append(matched, inv)
}
slices.SortFunc(matched, func(a, b *stripe.Invoice) int {
if a.Created != b.Created {
return cmp.Compare(b.Created, a.Created)
}
return strings.Compare(a.ID, b.ID)
})
data, hasMore := page(matched, func(inv *stripe.Invoice) string { return inv.ID }, f)
return &stripe.InvoiceList{ListMeta: stripe.ListMeta{HasMore: hasMore}, Data: data}
}
// invoice answers GET /v1/invoices/{id} with its lines embedded.
func (m *MockBackend) invoice(id string) (any, error) {
inv, err := object(m.ObjectErrs, m.Invoices, nil, id)
+1 -1
View File
@@ -123,7 +123,7 @@ stripe POST /v1/invoices/in_1 description=x
error: stripetest: unexpected path /v1/invoices/in_1
== the invoice list
stripe GET /v1/invoices
error: stripetest: unexpected path /v1/invoices
answer: {"data":[{"id":"in_1"}]}
== Err refuses ahead of PathErrs and Handle
stripe GET /v1/subscriptions/sub_1
error: every call refused
@@ -244,7 +244,7 @@ The card's states, read from the paying row and the mirror:
| State | Price line | Fact line | Controls |
|---|---|---|---|
| Pause confirmed (the mirror's behavior set), status `active` or `trialing`, nothing scheduled | M0 "Paused while {granted} is granted" | none | Resume plan when the decision offers it (D20), then Cancel plan |
| Pause confirmed, status `active` or `trialing`, a cancellation scheduled | M0, with the ladder heading's existing "cancels on {date}" badge | none | Keep plan |
| Pause confirmed, status `active` or `trialing`, a cancellation scheduled | M0, with the ladder heading's existing "cancels on {date}" badge, without its title, as on a suspended plan: "access continues until this date" is false while the grant delivers, and M0 already says so | none | Keep plan |
| Pause confirmed, a downgrade scheduled before the grant | M8 "Paused while {granted} is granted, moves to {tier} on {date}" | none | Keep plan, then Cancel plan; Pay invoice first when the status is `past_due` or `unpaid` |
| Pause confirmed, status `past_due` or `unpaid` | M1 "Paused while {granted} is granted, payment due" | none | Pay invoice, then Cancel plan or Keep plan |
| Pause not confirmed (pending, failed, or not wanted), status `active` or `trialing` | the existing "{price}, renews {date}", "{price}, moves to {tier} on {date}" or "{price}, ends {date}" | none | Cancel plan; Keep plan |
@@ -280,12 +280,12 @@ Sections 1 to 12 are one commit each, and their items are that commit's parts; s
## 10. The paid plan's card, Cancel plan, Keep plan and Pay invoice (#269)
- [ ] 10.1 Sandbox check, before the code (design, What is unverified): on a Stripe sandbox test clock at the console's pinned API version, with the console's restricted test key, a subscription paused with `behavior=void` and the marker, set to cancel at the period end and then kept (`cancel_at_period_end=false`): Stripe accepts it, creates no invoice, and the pause and the marker stay. The result is recorded in the commit message; a refusal is a stop and goes to the maintainer.
- [ ] 10.2 `internal/fulfillment/plan_change.go` (design D11): `resolveLadderSubscription` becomes `resolveSubscriptionOnLadder`, with the paying fallback through `ListSubscriptionRungsByOrg`, `holdsLadder`, and the status-derived suspension; every caller named in design D11 calls it. Its doc comment says which subscription it finds when no subscription backs the position. It chooses the paying subscription through the pure function 9.3 names, so the resolver and `payingByLadder` state the rule once. The fallback's `currentProductID` is the paying item's product, not the held position's, because `SwitchPlan` compares the target with it (`plan_change.go:214`, `:245`), as `PreviewSwitch` does (`:560`), and the resolver finds the item by it (`:822`).
- [ ] 10.3 `internal/server/member_plans.go` (design D10): `buildTier`, for the card whose product is the ladder's `Paying.ProductID` on a ladder a grant holds, calls `setPaidUnderGrant(tier, ladderID, paying, granted)`, which sets `PaidUnderGrant`, `GrantedName`, `CollectionPaused`, the price line's facts (the subscription's own price from the paying row), `CanCancel`, `CanKeep`, `MovesTo`, `MovesOn` and `EndsOn` by D10's table, and `PaysInvoice` for `past_due` or `unpaid`; the current card's `setCurrent` defers to it when the current product is the paying product, and `buildTier` draws the paid card even when its product is not a public plan, as it draws the current and the held rungs (design D10). `buildLadder` sets the ladder's `CancelsOn` from the paying row (`cancel_at_period_end` with `current_period_end`, or the scheduled cancellation's date) on a ladder a grant holds; `pos.CancelScheduled` stays unset. `setCancelBodies` gives the card's confirmation Copy M2 under a grant of another tier and M9 under a grant of the subscription's own tier, each followed by M7's sentence when the payment is due. `plansOfferPaidMove` (`:589-601`) counts a card with `PaidUnderGrant` and `PaysInvoice()` as well as a `current` card, so the billing facts show for the paid card's Pay invoice. The Note of Keep plan's action trigger (`internal/server/action_triggers.go:94-95`, "the current plan's control, …") is updated, because Keep plan is now drawn on the paid card. The comment at `:750-758` no longer says a grant-held tier has no billing.
- [ ] 10.4 `internal/embeds/templates/partials/member_plans.html`: the price line reads M8 when `PaidUnderGrant`, `CollectionPaused` and a downgrade is scheduled, otherwise M0 or M1 when `PaidUnderGrant` and `CollectionPaused`, ahead of the existing branches; a scheduled cancellation keeps M0, its date on the ladder heading's existing badge; M1 draws no suspension line; the controls block draws Pay invoice, Keep plan and Cancel plan for a paid-under-grant card as for the current card. The template's comment states the card's states.
- [ ] 10.5 `internal/server/member_hosted_invoice.go` (design D10): `planPosition` falls back to the paying subscription; `unpaidInvoicePage` lists the paying subscription's open invoices (`invoice.List` with `Subscription` and `Status: "open"`, limit 1) and redirects to the first one's hosted page. `internal/stripetest/mock.go` answers `GET /v1/invoices` from its existing `Invoices` map (keyed by invoice id, `mock.go:63-69`), listing the invoices whose subscription and status match the `subscription` and `status` parameters, newest first by `Created` and then by id, because the map has no order, with a doc comment. `internal/stripetest/testdata/routes.golden`, the row `the invoice list` (`:125-126`, which today records `error: stripetest: unexpected path /v1/invoices`), then records the list's answer; it is rewritten with `-update` and read, and no other row changes.
- [ ] 10.6 Tests:
- [x] 10.1 Sandbox check, before the code (design, What is unverified): on a Stripe sandbox test clock at the console's pinned API version, with the console's restricted test key, a subscription paused with `behavior=void` and the marker, set to cancel at the period end and then kept (`cancel_at_period_end=false`): Stripe accepts it, creates no invoice, and the pause and the marker stay. The result is recorded in the commit message; a refusal is a stop and goes to the maintainer.
- [x] 10.2 `internal/fulfillment/plan_change.go` (design D11): `resolveLadderSubscription` becomes `resolveSubscriptionOnLadder`, with the paying fallback through `ListSubscriptionRungsByOrg`, `holdsLadder`, and the status-derived suspension; every caller named in design D11 calls it. Its doc comment says which subscription it finds when no subscription backs the position. It chooses the paying subscription through the pure function 9.3 names, so the resolver and `payingByLadder` state the rule once. The fallback's `currentProductID` is the paying item's product, not the held position's, because `SwitchPlan` compares the target with it (`plan_change.go:214`, `:245`), as `PreviewSwitch` does (`:560`), and the resolver finds the item by it (`:822`).
- [x] 10.3 `internal/server/member_plans.go` (design D10): `buildTier`, for the card whose product is the ladder's `Paying.ProductID` on a ladder a grant holds, calls `setPaidUnderGrant(tier, ladderID, paying, granted)`, which sets `PaidUnderGrant`, `GrantedName`, `CollectionPaused`, the price line's facts (the subscription's own price from the paying row), `CanCancel`, `CanKeep`, `MovesTo`, `MovesOn` and `EndsOn` by D10's table, and `PaysInvoice` for `past_due` or `unpaid`; the current card's `setCurrent` defers to it when the current product is the paying product, and `buildTier` draws the paid card even when its product is not a public plan, as it draws the current and the held rungs (design D10). `buildLadder` sets the ladder's `CancelsOn` from the paying row (`cancel_at_period_end` with `current_period_end`, or the scheduled cancellation's date) on a ladder a grant holds; `pos.CancelScheduled` stays unset. `setCancelBodies` gives the card's confirmation Copy M2 under a grant of another tier and M9 under a grant of the subscription's own tier, each followed by M7's sentence when the payment is due. `plansOfferPaidMove` (`:589-601`) counts a card with `PaidUnderGrant` and `PaysInvoice()` as well as a `current` card, so the billing facts show for the paid card's Pay invoice. The Note of Keep plan's action trigger (`internal/server/action_triggers.go:94-95`, "the current plan's control, …") is updated, because Keep plan is now drawn on the paid card. The comment at `:750-758` no longer says a grant-held tier has no billing.
- [x] 10.4 `internal/embeds/templates/partials/member_plans.html`: the price line reads M8 when `PaidUnderGrant`, `CollectionPaused` and a downgrade is scheduled, otherwise M0 or M1 when `PaidUnderGrant` and `CollectionPaused`, ahead of the existing branches; a scheduled cancellation keeps M0, its date on the ladder heading's existing badge; M1 draws no suspension line; the controls block draws Pay invoice, Keep plan and Cancel plan for a paid-under-grant card as for the current card. The template's comment states the card's states.
- [x] 10.5 `internal/server/member_hosted_invoice.go` (design D10): `planPosition` falls back to the paying subscription; `unpaidInvoicePage` lists the paying subscription's open invoices (`invoice.List` with `Subscription` and `Status: "open"`, limit 1) and redirects to the first one's hosted page. `internal/stripetest/mock.go` answers `GET /v1/invoices` from its existing `Invoices` map (keyed by invoice id, `mock.go:63-69`), listing the invoices whose subscription and status match the `subscription` and `status` parameters, newest first by `Created` and then by id, because the map has no order, with a doc comment. `internal/stripetest/testdata/routes.golden`, the row `the invoice list` (`:125-126`, which today records `error: stripetest: unexpected path /v1/invoices`), then records the list's answer; it is rewritten with `-update` and read, and no other row changes.
- [x] 10.6 Tests:
- `TestMemberPlansGolden`: states `paid-plus-under-granted-pro` (section 9's, now with M0 and Cancel plan), `paid-plus-under-granted-pro-past-due` (M1, Pay invoice then Cancel plan, no suspension line), `paid-plus-under-granted-pro-unconfirmed` (no `PauseCollection`: the existing renews line), `paid-plus-under-granted-pro-cancellation-scheduled` (M0, Keep plan, and the heading's "cancels on" badge), `paid-plus-under-granted-pro-downgrade-scheduled` (the kit's `ScheduleDowngrade` to Basic before `Issue(o, pro)`: M8, Keep plan then Cancel plan), `paid-plus-paused-under-granted-pro` (status `paused`: M4, no control), and `granted-plus-own-tier` (`Subscribe(o, plus)`, `Issue(o, plus)`, `PauseCollection`: a grant of Plus over the Plus subscription, and the current card carries M0, "Paused while Plus is granted"); each state's `.html` and `.json` under `internal/server/testdata/member_plans/` written with `-update` and read, and `paid-plus-under-granted-pro.html` and `.json` rewritten. Plus is a tier of Wiki and Duo, so in every `paid-plus-*` state Duo's Plus card draws its price and no control, and Duo Max offers no Checkout. No golden shows the billing facts line: `TestMemberPlansGolden` empties `BillingFacts` before it renders (`member_plans_golden_db_test.go:303`).
- `TestPlansOfferPaidMoveGate` (`internal/server/billing_facts_render_test.go:128`) gains the case `paidDue`, a paid-under-grant card whose payment is due and whose relation is not `current`, which earns the line. Failure text: `a paid card whose payment is due does not earn the line`.
- `TestMemberPlansGolden`: a state `paid-retired-plus-under-granted-pro`, built in a world of its own so that the fixture's shared Plus is never retired: `w.Retire` sets `is_active = false` on the one product row (`internal/testkit/world/plans.go:191-203`), and `buildTier` skips an unlisted tier unless it is current or held (`internal/server/member_plans.go:399-402`), so retiring the shared Plus would drop its card from every other state where Plus is neither current nor held. The test makes a second `world.New` with its own Wiki ladder (Basic, Plus, Pro) and its own organization, its ids named through a normalizer as the first world's are, runs `Subscribe(o, plus)`, `Issue(o, pro)` and `PauseCollection`, then retires that world's Plus, and renders it as the subtest `paid-retired-plus-under-granted-pro`, keeping its ladders apart by that world's suffix as the page filter does (`member_plans_golden_db_test.go:296-301`). Plus's card is drawn with M0 and Cancel plan; `paid-retired-plus-under-granted-pro.html` and `.json` written with `-update` and read.
@@ -296,8 +296,9 @@ Sections 1 to 12 are one commit each, and their items are that commit's parts; s
- `TestAPastDuePayingSubscriptionIsNotCancelledImmediately`: the immediate cancellation is refused with `ErrImmediateCancelSuspended` before any Stripe call. Failure text: `an immediate cancellation of a past-due paying subscription = %v`.
- `TestPlanUnpaidInvoiceForAPausedPlan` (`internal/server/member_hosted_invoice_db_test.go`), rows: `past due with an open invoice`, its `latest_invoice` a void renewal (303 to the open invoice's hosted URL in the mock); `active`, the mock holding an open invoice for that subscription (303 to `/billing`, no Stripe call); `no open invoice` (303 to `/billing`); `another organization's ladder` (404). Failure text: `%s: answered %d %q, want %d %q`.
- `TestCancelBodyOnThePaidCard`, rows: `a grant of another tier` (M2 with the period end); `a grant of the subscription's own tier` (M9); `a grant of another tier, payment due` (M7 over M2: "Plus ends on Jan 15, 2099; Pro stays granted. The unpaid invoice stays due."); `the own tier, payment due` (M7 over M9). Failure text: `%s: cancel body = %q, want %q`.
- [ ] 10.7 Docs: `docs/stripe.md`'s grant bullet names the paid plan's card, Cancel plan at the period end and Pay invoice; `docs/plan-management.md` says what the member sees.
- [ ] 10.8 Breaks:
- Added at review: `TestCancelBodyOnThePaidCard` rows carry the tier's `Relation`, since the card is the current card exactly when the grant holds the paying product, and gain `another tier with the same name` (M2, not M9: a name is no identity); `TestPaidPlanCardUnderAGrant` gains `period unknown` (the existing "Billing details are still being processed." line and no control) and `downgrade already applied, payment due`; `TestCancelBadgeOnAPaidCardUnderAGrant` (new): the "cancels on" badge of the paid card carries no title, as on a suspended plan, because the grant keeps delivering past the date (ruling, after review); `payingUnderGrant` gives the Stripe mock the console's pause and marker, so the cancel and keep tests show the pause staying; `TestPlanUnpaidInvoiceForAPausedPlan` asserts its one call is the open-invoice list with `limit=1`. Failure texts name the row.
- [x] 10.7 Docs: `docs/stripe.md`'s grant bullet names the paid plan's card, Cancel plan at the period end and Pay invoice; `docs/plan-management.md` says what the member sees.
- [x] 10.8 Breaks:
- the mirror ignored (the rule's answer used for `CollectionPaused`): caught by `TestPaidPlanCardUnderAGrant`, `want_new` `unconfirmed: price line`, and by `TestMemberPlansGolden/paid-plus-under-granted-pro-unconfirmed`;
- M1's suspension line drawn: caught by `TestMemberPlansGolden/paid-plus-under-granted-pro-past-due`, `want_new` `testdata/member_plans/paid-plus-under-granted-pro-past-due.html differs from what the code produced`;
- the resolver's fallback removed: caught by `TestCancelAPausedSubscription`, `want_new` `cancel call form =`;
@@ -310,8 +311,15 @@ Sections 1 to 12 are one commit each, and their items are that commit's parts; s
- the paid card's Pay invoice not counted in `plansOfferPaidMove`: caught by `TestPlansOfferPaidMoveGate`, `want_new` `a paid card whose payment is due does not earn the line`;
- the paid card skipped when its product is not listed: caught by `TestMemberPlansGolden/paid-retired-plus-under-granted-pro`, `want_new` `testdata/member_plans/paid-retired-plus-under-granted-pro.html differs from what the code produced`;
- M8 not drawn (a scheduled downgrade reads M0): caught by `TestPaidPlanCardUnderAGrant`, `want_new` `downgrade scheduled: price line`, and by `TestMemberPlansGolden/paid-plus-under-granted-pro-downgrade-scheduled`, `want_new` `testdata/member_plans/paid-plus-under-granted-pro-downgrade-scheduled.html differs from what the code produced`;
- the ladder heading's "cancels on" badge not drawn (`buildLadder` not setting `CancelsOn` from the paying row): caught by `TestMemberPlansGolden/paid-plus-under-granted-pro-cancellation-scheduled`, `want_new` `testdata/member_plans/paid-plus-under-granted-pro-cancellation-scheduled.html differs from what the code produced`.
- [ ] 10.9 `make screens`: no demo state reaches the paid card; hand captures at 1280 desktop width and 390 mobile width (emulated, `innerWidth` checked) of the Products page in the states `paid-plus-under-granted-pro`, its past-due form, its cancellation-scheduled form (Keep plan and the badge), its downgrade-scheduled form (M8), its unconfirmed form, `granted-plus-own-tier` (a grant of the subscription's own tier), and the cancellation's confirmation in its M2 and M9 forms, on the test stack with the kit's states loaded, are attached to the commit's review.
- the ladder heading's "cancels on" badge not drawn (`buildLadder` not setting `CancelsOn` from the paying row): caught by `TestMemberPlansGolden/paid-plus-under-granted-pro-cancellation-scheduled`, `want_new` `testdata/member_plans/paid-plus-under-granted-pro-cancellation-scheduled.html differs from what the code produced`;
- M9 decided by the tier's name again: caught by `TestCancelBodyOnThePaidCard`, `want_new` `another tier with the same name: cancel body =`;
- a paying row with no period end drawn as dated: caught by `TestPaidPlanCardUnderAGrant`, `want_new` `period unknown: price line`;
- the cancel body set on a card with no Cancel plan: caught by `TestMemberPlansGolden/paid-plus-paused-under-granted-pro`;
- the invoice list without `limit=1`: caught by `TestPlanUnpaidInvoiceForAPausedPlan`, `want_new` `past due with an open invoice: calls =`;
- the `now` guard dropped (a passed downgrade date drawn on a past-due card): caught by `TestPaidPlanCardUnderAGrant`, `want_new` `downgrade already applied, payment due: price line`;
- the current-card deferral removed: caught by `TestMemberPlansGolden/granted-plus-own-tier`;
- the badge keeping its title under a grant: caught by `TestCancelBadgeOnAPaidCardUnderAGrant`, `want_new` `cancel badge of the paid card under a grant =`.
- [x] 10.9 `make screens`: no demo state reaches the paid card; hand captures at 1280 desktop width and 390 mobile width (emulated, `innerWidth` checked) of the Products page in the states `paid-plus-under-granted-pro`, its past-due form, its cancellation-scheduled form (Keep plan and the badge), its downgrade-scheduled form (M8), its unconfirmed form, `granted-plus-own-tier` (a grant of the subscription's own tier), and the cancellation's confirmation in its M2 and M9 forms, on the test stack with the kit's states loaded, are attached to the commit's review.
## 11. The switch of a paused subscription (#278)