Neutral invoice items; "kártya" instead of "kártyajóslás" on Stripe
CI / test (push) Successful in 1m42s
CI / build (push) Successful in 5m0s
CI / deploy (push) Skipped

Invoices: the add-ons share the item "Online tartalomszolgáltatás –
kiegészítő csomag" and tarot readings are listed as "egyedi szöveges
tartalom"; a test keeps "jóslás" and "kártya" off every invoice.
Stripe's payment page and receipt call the tarot add-on "+5 kártya".
The Telegram notice adds the package id to an add-on, so it still says
which one was bought.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-22 06:36:16 +00:00
co-authored by Claude Opus 5.5
parent 4247f914ce
commit 4b93dc42e8
5 changed files with 51 additions and 20 deletions
+4 -3
View File
@@ -132,6 +132,7 @@ pub async fn checkout(
let config = stripe_for(&state, &auth)?;
let package = packages::find(&req.package).ok_or(ApiError::NotFound("package"))?;
let back = format!("{}{}", state.config.public_base_url, return_path(req.return_path.as_deref()));
let (checkout_name, checkout_description) = package.checkout_text();
let field = |k: &str, v: &str| (k.to_string(), v.to_string());
let mut form = vec![
field("mode", "payment"),
@@ -147,11 +148,11 @@ pub async fn checkout(
field("line_items[0][price_data][currency]", "huf"),
// Stripe counts forints in fillér.
field("line_items[0][price_data][unit_amount]", &(package.price_huf * 100).to_string()),
field("line_items[0][price_data][product_data][name]", &format!("Sorsfonalak – {}", package.name)),
field("line_items[0][price_data][product_data][description]", package.tagline),
field("line_items[0][price_data][product_data][name]", &checkout_name),
field("line_items[0][price_data][product_data][description]", &checkout_description),
field("metadata[package]", package.id),
field("metadata[user_id]", &auth.id().to_string()),
field("payment_intent_data[description]", &format!("Sorsfonalak – {}", package.name)),
field("payment_intent_data[description]", &checkout_name),
field("payment_intent_data[metadata][package]", package.id),
field("success_url", &format!("{back}?fizetes={{CHECKOUT_SESSION_ID}}")),
field("cancel_url", &format!("{back}?fizetes=megszakitva")),