Stripe: company purchases, payment details kept for the invoice
The checkout offers buying as a company (name, tax number). A confirmed payment keeps Stripe's payment id, the amount charged and the buyer's billing details, and queues the invoice for a background job (Billingo, once the company exists). Payments outlive a deleted account for the accounting law's 8 years. The package cards, the FAQ and the privacy policy say that card details go to Stripe only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -7,6 +7,7 @@ use std::time::Duration;
|
||||
|
||||
use hmac::{Hmac, Mac};
|
||||
use serde::Deserialize;
|
||||
use serde_json::Value;
|
||||
use sha2::Sha256;
|
||||
|
||||
use crate::config::StripeConfig;
|
||||
@@ -24,6 +25,17 @@ pub struct Session {
|
||||
pub payment_status: String,
|
||||
/// `open`, `complete` or `expired`.
|
||||
pub status: Option<String>,
|
||||
/// In the smallest unit (fillér for forints).
|
||||
#[serde(default)]
|
||||
pub amount_total: Option<i64>,
|
||||
#[serde(default)]
|
||||
pub currency: Option<String>,
|
||||
/// The PaymentIntent's id.
|
||||
#[serde(default)]
|
||||
pub payment_intent: Option<String>,
|
||||
/// Name, e-mail, billing address; for a company its name and tax ids.
|
||||
#[serde(default)]
|
||||
pub customer_details: Option<Value>,
|
||||
}
|
||||
|
||||
impl Session {
|
||||
|
||||
Reference in New Issue
Block a user