fix: cloud/checkoutid/lms

This commit is contained in:
Andras Bacsai 2023-07-14 13:58:05 +02:00
parent 7b8657367c
commit 62247f4601
4 changed files with 9 additions and 9 deletions

View File

@ -24,12 +24,7 @@ public function __invoke()
'instance_name' => $instance_id,
])->throw()->json();
$product_id = data_get($data, 'meta.product_id');
if (isDev()) {
$valid_product_id = 93221;
} else {
$valid_product_id = 93222;
}
$valid_product_id = config('coolify.lemon_squeezy_product_id');
if ($product_id !== $valid_product_id) {
throw new \Exception('Invalid product id');
}

View File

@ -8,7 +8,8 @@ function getSubscriptionLink()
$team_id = auth()->user()->currentTeam()->id ?? null;
$email = auth()->user()->email ?? null;
$name = auth()->user()->name ?? null;
$url = "https://store.coollabs.io/checkout/buy/d0b28c6a-9b57-40bf-8b84-89fbafde6526?";
$checkout_id = config('coolify.lemon_squeezy_checkout_id');
$url = "https://store.coollabs.io/checkout/buy/$checkout_id?";
if ($user_id) {
$url .= "&checkout[custom][user_id]={$user_id}";
}

View File

@ -3,6 +3,8 @@
return [
'self_hosted' => env('SELF_HOSTED', true),
'lemon_squeezy_webhook_secret' => env('LEMON_SQUEEZY_WEBHOOK_SECRET'),
'lemon_squeezy_product_id' => env('LEMON_SQUEEZY_PRODUCT_ID'),
'lemon_squeezy_checkout_id' => env('LEMON_SQUEEZY_CHECKOUT_ID'),
'mux_enabled' => env('MUX_ENABLED', true),
'dev_webhook' => env('SERVEO_URL'),
'base_config_path' => env('BASE_CONFIG_PATH', '/data/coolify'),

View File

@ -10,8 +10,6 @@ services:
- /data/coolify/ssh:/var/www/html/storage/app/ssh
- /data/coolify/deployments:/var/www/html/storage/app/deployments
environment:
- SELF_HOSTED
- LEMON_SQUEEZY_WEBHOOK_SECRET
- APP_ENV=production
- APP_DEBUG
- APP_NAME
@ -31,6 +29,10 @@ services:
- PHP_PM_START_SERVERS=1
- PHP_PM_MIN_SPARE_SERVERS=1
- PHP_PM_MAX_SPARE_SERVERS=10
- SELF_HOSTED
- LEMON_SQUEEZY_WEBHOOK_SECRET
- LEMON_SQUEEZY_CHECKOUT_ID
- LEMON_SQUEEZY_PRODUCT_ID
ports:
- "${APP_PORT:-8000}:80"
expose: