Remove billing and checkout redirect buttons and related services
Deleted the billing-redirect-button, checkout-redirect-button, and embedded-stripe-checkout components. Additionally, removed the shadcn directory, which encompassed billing-related icons. This change streamlines the subscription settings interface and organizes the system's payment management. This update is a stepping stone towards improving the billing system's overall architecture.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import { Database } from '@kit/supabase/database';
|
||||
|
||||
type SubscriptionObject = Database['public']['Tables']['subscriptions'];
|
||||
|
||||
type SubscriptionInsertParams = Omit<
|
||||
SubscriptionObject['Insert'],
|
||||
'billing_customer_id'
|
||||
>;
|
||||
|
||||
type SubscriptionUpdateParams = SubscriptionObject['Update'];
|
||||
|
||||
/**
|
||||
* Represents an abstract class for handling billing webhook events.
|
||||
*/
|
||||
export abstract class BillingWebhookHandlerService {
|
||||
abstract verifyWebhookSignature(request: Request): Promise<unknown>;
|
||||
|
||||
abstract handleWebhookEvent(
|
||||
event: unknown,
|
||||
params: {
|
||||
onCheckoutSessionCompleted: (
|
||||
subscription: SubscriptionInsertParams,
|
||||
) => Promise<unknown>;
|
||||
|
||||
onSubscriptionUpdated: (
|
||||
subscription: SubscriptionUpdateParams,
|
||||
) => Promise<unknown>;
|
||||
|
||||
onSubscriptionDeleted: (subscriptionId: string) => Promise<unknown>;
|
||||
},
|
||||
): Promise<unknown>;
|
||||
}
|
||||
Reference in New Issue
Block a user