mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
fix: Lemon Squeezy redirect to base url (#479)
fix: Lemon Squeezy redirect to base url
This commit is contained in:
@@ -218,6 +218,7 @@ module.exports = {
|
|||||||
key: process.env.LEMONSQUEEZY_API_KEY,
|
key: process.env.LEMONSQUEEZY_API_KEY,
|
||||||
storeId: process.env.LEMONSQUEEZY_STORE_ID,
|
storeId: process.env.LEMONSQUEEZY_STORE_ID,
|
||||||
webhookSecret: process.env.LEMONSQUEEZY_WEBHOOK_SECRET,
|
webhookSecret: process.env.LEMONSQUEEZY_WEBHOOK_SECRET,
|
||||||
|
redirectTo: `${process.env.BASE_URL}/setup`,
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { Service } from 'typedi';
|
|||||||
import { createCheckout } from '@lemonsqueezy/lemonsqueezy.js';
|
import { createCheckout } from '@lemonsqueezy/lemonsqueezy.js';
|
||||||
import { SystemUser } from '@/system/models';
|
import { SystemUser } from '@/system/models';
|
||||||
import { configureLemonSqueezy } from './utils';
|
import { configureLemonSqueezy } from './utils';
|
||||||
|
import config from '@/config';
|
||||||
|
|
||||||
@Service()
|
@Service()
|
||||||
export class LemonSqueezyService {
|
export class LemonSqueezyService {
|
||||||
@@ -28,7 +29,7 @@ export class LemonSqueezyService {
|
|||||||
},
|
},
|
||||||
productOptions: {
|
productOptions: {
|
||||||
enabledVariants: [variantId],
|
enabledVariants: [variantId],
|
||||||
redirectUrl: `http://localhost:4000/dashboard/billing/`,
|
redirectUrl: config.lemonSqueezy.redirectTo,
|
||||||
receiptButtonText: 'Go to Dashboard',
|
receiptButtonText: 'Go to Dashboard',
|
||||||
receiptThankYouNote: 'Thank you for signing up to Lemon Stand!',
|
receiptThankYouNote: 'Thank you for signing up to Lemon Stand!',
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user