Link customer ID to Anrok transaction (#4509)

* Mark transactions with unresolvable addresses as unresolved

* Add customer_name + customer_id to anrok transactions

* Increase rate of Anrok syn

* Remove timer from update_tax_transactions

* chore: query cache, clippy, fmt
This commit is contained in:
François-Xavier Talbot
2025-10-06 17:06:57 +01:00
committed by GitHub
parent dbc64afe48
commit 9589e23118
6 changed files with 97 additions and 51 deletions

View File

@@ -290,6 +290,8 @@ pub async fn refund_charge(
accounting_time: Utc::now(),
accounting_time_zone: anrok::AccountingTimeZone::Utc,
line_items: vec![anrok::LineItem::new_including_tax_amount(tax_id, -refund_amount)],
customer_id: Some(format!("stripe:cust:{}", user.stripe_customer_id.unwrap_or_else(|| "unknown".to_owned()))),
customer_name: Some("Customer".to_owned()),
}
}
).await;

View File

@@ -416,6 +416,8 @@ pub async fn create_or_update_payment_intent(
product_info.tax_identifier.tax_processor_id,
charge_data.amount,
)],
customer_id: None,
customer_name: None,
})
.await?;