Implement Lemon Squeezy billing services

Added implementation for various billing services with Lemon Squeezy. This includes processing of webhooks for order and subscription handling, verification of webhook signatures, and validating subscription statuses and order states. Additionally, types for order and subscription webhooks have been created.
This commit is contained in:
giancarlo
2024-04-02 09:33:26 +08:00
parent dee0814e6d
commit f58aaa330c
7 changed files with 595 additions and 4 deletions

View File

@@ -16,12 +16,16 @@ export class BillingEventHandlerFactoryService {
return new StripeWebhookHandlerService();
}
case 'paddle': {
throw new Error('Paddle is not supported yet');
case 'lemon-squeezy': {
const { LemonSqueezyWebhookHandlerService } = await import(
'@kit/lemon-squeezy'
);
return new LemonSqueezyWebhookHandlerService();
}
case 'lemon-squeezy': {
throw new Error('Lemon Squeezy is not supported yet');
case 'paddle': {
throw new Error('Paddle is not supported yet');
}
default: