fix: serialize Stripe checkout provisioning

This commit is contained in:
237899745
2026-07-26 03:07:30 +08:00
parent 03d0e43d4d
commit 08000cc16e
8 changed files with 805 additions and 197 deletions

View File

@@ -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,