fixes
This commit is contained in:
1 parent
dc9ea628c1
commit
52f27e30fc
26 files changed
+1137
-56
No files matched your search
@@ -19,6 +19,17 @@ export type StripeStatus = {
|
||||
subscription_status?: string;
|
||||
};
|
||||
|
||||
/** Live Stripe for all company admins; mock checkout only for platform admins. */
|
||||
export function canSelfServePurchase(
|
||||
stripe: StripeStatus | null | undefined,
|
||||
opts?: { isPlatformAdmin?: boolean }
|
||||
): boolean {
|
||||
if (!stripe) return false;
|
||||
if (stripe.configured && !stripe.mock) return true;
|
||||
if (stripe.mock && opts?.isPlatformAdmin) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
export type CheckoutResult = {
|
||||
url: string;
|
||||
mock?: boolean;
|
||||
|
||||
Reference in new issue
Block a user