switched to paddle inline checkout, removed paypal and most of stripe. added product sync between app and paddle.
This commit is contained in:
33
config/paddle.php
Normal file
33
config/paddle.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
$sandbox = filter_var(env('PADDLE_SANDBOX', false), FILTER_VALIDATE_BOOLEAN);
|
||||
|
||||
$environment = env('PADDLE_ENVIRONMENT', $sandbox ? 'sandbox' : 'production');
|
||||
|
||||
$apiKey = env('PADDLE_API_KEY') ?: ($sandbox ? env('PADDLE_SANDBOX_API_KEY') : null);
|
||||
|
||||
$clientToken = env('PADDLE_CLIENT_TOKEN') ?: env('PADDLE_CLIENT_ID') ?: ($sandbox ? (env('PADDLE_SANDBOX_CLIENT_TOKEN') ?: env('PADDLE_SANDBOX_CLIENT_ID')) : null);
|
||||
|
||||
$webhookSecret = env('PADDLE_WEBHOOK_SECRET') ?: ($sandbox ? env('PADDLE_SANDBOX_WEBHOOK_SECRET') : null);
|
||||
|
||||
$publicKey = env('PADDLE_PUBLIC_KEY') ?: ($sandbox ? env('PADDLE_SANDBOX_PUBLIC_KEY') : null);
|
||||
|
||||
$baseUrl = env('PADDLE_BASE_URL');
|
||||
if (! $baseUrl) {
|
||||
$baseUrl = $sandbox ? 'https://sandbox-api.paddle.com' : 'https://api.paddle.com';
|
||||
}
|
||||
|
||||
$consoleUrl = env('PADDLE_CONSOLE_URL');
|
||||
if (! $consoleUrl) {
|
||||
$consoleUrl = $sandbox ? 'https://sandbox-dashboard.paddle.com' : 'https://dashboard.paddle.com';
|
||||
}
|
||||
|
||||
return [
|
||||
'api_key' => $apiKey,
|
||||
'client_token' => $clientToken,
|
||||
'environment' => $environment,
|
||||
'base_url' => $baseUrl,
|
||||
'console_url' => $consoleUrl,
|
||||
'webhook_secret' => $webhookSecret,
|
||||
'public_key' => $publicKey,
|
||||
];
|
||||
Reference in New Issue
Block a user