Fix issues with Lemon Squeezy and i18n issue requiring a parameter we do not pass.

This commit is contained in:
giancarlo
2024-06-05 19:15:21 +07:00
parent d3a4fbdeb1
commit a3f339aaf6
3 changed files with 4 additions and 23 deletions

View File

@@ -66,7 +66,7 @@
"trialing": {
"badge": "Trial",
"heading": "You're on a trial",
"description": "Your trial will end on {{- trialEndDate }}."
"description": "You can enjoy the benefits of plan until the trial ends"
},
"past_due": {
"badge": "Past Due",

View File

@@ -132,13 +132,6 @@ export class LemonSqueezyWebhookHandlerService
);
}
case 'subscription_payment_success': {
return this.handleInvoicePaid(
event as SubscriptionWebhook,
params.onInvoicePaid,
);
}
default: {
const logger = await getLogger();
@@ -287,18 +280,6 @@ export class LemonSqueezyWebhookHandlerService
);
}
private handleInvoicePaid(
subscription: SubscriptionWebhook,
onInvoicePaidCallback: (
subscription: UpsertSubscriptionParams,
) => Promise<unknown>,
) {
return this.handleSubscriptionCreatedEvent(
subscription,
onInvoicePaidCallback,
);
}
private handleSubscriptionDeletedEvent(
subscription: SubscriptionWebhook,
onSubscriptionDeletedCallback: (subscriptionId: string) => Promise<unknown>,

View File

@@ -1,5 +1,4 @@
import type { PlopTypes } from '@turbo/gen';
import { execSync } from 'node:child_process';
import { writeFileSync } from 'node:fs';
export function createEnvironmentVariablesGenerator(
@@ -23,7 +22,7 @@ export function createEnvironmentVariablesGenerator(
writeFileSync('turbo/generators/templates/env/.env.local', env);
return 'Environment variables generated at turbo/generators/templates/env/.env.local. Please double check and use this file in your hosting provider to set the environment variables. Never commit this file, it contains secrets!';
return 'Environment variables generated at /turbo/generators/templates/env/.env.local.\nPlease double check and use this file in your hosting provider to set the environment variables. \nNever commit this file, it contains secrets!';
},
],
prompts: [
@@ -271,7 +270,8 @@ export function createEnvironmentVariablesGenerator(
when: (answers) => answers.values.MAILER_PROVIDER === 'nodemailer',
type: 'input',
name: 'values.EMAIL_TLS',
message: 'Do you want to enable TLS? (leave empty for true)',
message:
'Do you want to enable TLS for your emails? (leave empty for true)',
default: 'true',
},
],