fix: serialize Stripe checkout provisioning
This commit is contained in:
@@ -25,6 +25,7 @@ pub struct Config {
|
||||
|
||||
pub stripe_secret_key: Option<String>,
|
||||
pub stripe_webhook_secret: Option<String>,
|
||||
pub stripe_api_base_url: String,
|
||||
|
||||
pub storage_path: String,
|
||||
|
||||
@@ -99,6 +100,10 @@ impl Config {
|
||||
}
|
||||
let stripe_secret_key = env_string("STRIPE_SECRET_KEY");
|
||||
let stripe_webhook_secret = env_string("STRIPE_WEBHOOK_SECRET");
|
||||
let stripe_api_base_url = env_string("STRIPE_API_BASE_URL")
|
||||
.unwrap_or_else(|| "https://api.stripe.com".to_string())
|
||||
.trim_end_matches('/')
|
||||
.to_string();
|
||||
|
||||
let storage_path = env_string("STORAGE_PATH").unwrap_or_else(|| "./uploads".to_string());
|
||||
|
||||
@@ -140,6 +145,7 @@ impl Config {
|
||||
api_key_pepper,
|
||||
stripe_secret_key,
|
||||
stripe_webhook_secret,
|
||||
stripe_api_base_url,
|
||||
storage_path,
|
||||
allow_anonymous_upload,
|
||||
anon_max_file_size_mb,
|
||||
|
||||
Reference in New Issue
Block a user