Mint licenses with the buyer's org name; heal ctm_ orgs at re-sign #18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/org-name"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #17
The
orgfield is sealed into the signed payload and Cairn displays it verbatim, so it must be a name — notctm_….Mint-time resolution order (webhook): checkout-supplied
custom_data.org→ the buyer account's organization name (email → account → org, the store already has it) → the Paddle customer id strictly as a last resort for buyers without an account. Actm_org is now impossible for any account-holding buyer.Heal at re-sign:
refreshWithcallshealCtmOrgLocked— if the stored org has thectm_prefix and the owning account has a named org, the re-signed license carries the name. Pre-existing licenses (Nikola's included) heal on their next renewal or seat change; custom names are never overwritten (test-pinned).Tests cover all four paths: checkout name wins, account-name fallback, no-account last resort, and heal-on-refresh including the never-overwrite guarantee.
Companion cairn-site PR adds the buy-box field that feeds
custom_data.org.