mirror of
https://github.com/Dvorinka/Bookra.git
synced 2026-10-28 15:51:15 +00:00
- Finish Paddle-to-Stripe billing migration; drop paddle/stripe libs - Renumber migrations; add 00012 memberships+manage_token, 00013 location_type_capacity - Add tests: admin, auth, bookings customer service - Remove graphify-out artifacts and stale env files Authored By: TDvorak <[email protected]> Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
18 lines
453 B
Go
18 lines
453 B
Go
package shared
|
|
|
|
import "strings"
|
|
|
|
// NormalizePlanCode canonicalizes plan codes from various sources
|
|
// (Stripe checkout, webhook payloads, database records) into stable
|
|
// internal identifiers used across the billing and tenancy domains.
|
|
func NormalizePlanCode(planCode string) string {
|
|
switch strings.TrimSpace(planCode) {
|
|
case "growth":
|
|
return "pro"
|
|
case "multi-location":
|
|
return "business"
|
|
default:
|
|
return strings.TrimSpace(planCode)
|
|
}
|
|
}
|