mirror of
https://github.com/hanzoai/commerce.git
synced 2026-11-23 05:38:11 +00:00
Owns names a Hanzo subscription row: one on a Hanzo plan, or a staff gift or store trial on a copy named for one. Unlocks and the migration ask it, so a gift written by billing/grant opens the store and admin again. The merchant subscription API no longer edits a Hanzo row, refuses the providers only Hanzo billing writes, and stores a row's plan by its id, so a body naming a Hanzo slug opens nothing. A migrated yearly holder keeps paying its year's price by the month while that is below the new list. PayPal and invoice sales no longer refuse a trial holder. A trial credit longer than 31 days opens nothing. Co-authored-by: Hanzo Dev <[email protected]>
18 lines
872 B
Go
18 lines
872 B
Go
package subscription
|
|
|
|
import "errors"
|
|
|
|
var (
|
|
SubscriptionDoesNotExist = errors.New("subscription does not exist")
|
|
PlanDoesNotExist = errors.New("plan does not exist")
|
|
UserDoesNotExist = errors.New("user does not exist")
|
|
PaymentCancelled = errors.New("subscription was cancelled")
|
|
FailedToDecodeRequestBody = errors.New("failed to decode request body")
|
|
FailedToCreateCustomer = errors.New("failed to create customer")
|
|
FailedToCreateUser = errors.New("failed to create user")
|
|
OnlyOneOfUserBuyerAllowed = errors.New("only one of user buyer allowed")
|
|
CannotChangeUser = errors.New("subscription user cannot be changed")
|
|
ReservedProvider = errors.New("that provider is written by Hanzo billing only")
|
|
HanzoSubscription = errors.New("this is a Hanzo plan subscription: manage it through /v1/billing")
|
|
)
|