Invoices: issued in Billingo by the worker, downloadable on Számláim
A paid checkout queues an invoice row with every invoice detail (buyer, tax type and number, item, net, VAT, gross). The worker's new 'invoices' task creates the Billingo partner and the paid card invoice and e-mails it (API v3), saving each step so a retry never issues a second invoice, and keeps Billingo's whole answer; the PDF is fetched from Billingo when the user downloads it from the new Számláim page (in the menu once there is an invoice). Payments and invoices outlive a deleted account. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -48,6 +48,10 @@ pub struct Config {
|
||||
/// Stripe Checkout, when `STRIPE_SECRET_KEY` is set (it wins over
|
||||
/// `MOCK_PAYMENTS`).
|
||||
pub stripe: Option<StripeConfig>,
|
||||
/// `BILLINGO_API_KEY`: downloading invoices (the worker issues them).
|
||||
pub billingo_api_key: Option<String>,
|
||||
/// `BILLINGO_API_URL` (default `https://api.billingo.hu/v3`).
|
||||
pub billingo_api_url: String,
|
||||
/// `PURCHASES_OPEN` (default `false`): everyone may buy through Stripe.
|
||||
/// Until the opening only admins can (and with a test key always only
|
||||
/// admins), so nobody types a real card into a test or unfinished setup.
|
||||
@@ -170,6 +174,11 @@ impl Config {
|
||||
.trim_end_matches('/')
|
||||
.to_string(),
|
||||
}),
|
||||
billingo_api_key: var("BILLINGO_API_KEY"),
|
||||
billingo_api_url: var("BILLINGO_API_URL")
|
||||
.unwrap_or_else(|| "https://api.billingo.hu/v3".into())
|
||||
.trim_end_matches('/')
|
||||
.to_string(),
|
||||
purchases_open: parsed("PURCHASES_OPEN", false)?,
|
||||
user_invites: parsed("USER_INVITES", false)?,
|
||||
referral_rewards: parsed("REFERRAL_REWARDS", false)?,
|
||||
@@ -211,6 +220,8 @@ impl Config {
|
||||
password_login: true,
|
||||
mock_payments: true,
|
||||
stripe: None,
|
||||
billingo_api_key: Some("billingo-fake".into()),
|
||||
billingo_api_url: format!("{horoscope_api_url}/billingo"),
|
||||
purchases_open: true,
|
||||
user_invites: true,
|
||||
referral_rewards: true,
|
||||
|
||||
Reference in New Issue
Block a user