You've already forked AstralRinth
forked from didirus/AstralRinth
Mark charges from stripe customers with no address as unresolvable (#4521)
This commit is contained in:
committed by
GitHub
parent
e66b131a5d
commit
2a61916d1e
@@ -384,11 +384,19 @@ async fn update_anrok_transactions(
|
|||||||
stripe::Customer::retrieve(stripe_client, &customer_id, &[])
|
stripe::Customer::retrieve(stripe_client, &customer_id, &[])
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
let address = customer.address.ok_or_else(|| {
|
let Some(address) = customer.address else {
|
||||||
ApiError::InvalidInput(
|
// We won't really be able to do anything about this.
|
||||||
format!("Could not find any address for Stripe customer of user '{}'", to_base62(c.user_id.0 as u64))
|
|
||||||
)
|
warn!(
|
||||||
})?;
|
"Could not find any address for Stripe customer of user '{}', marking as unresolved",
|
||||||
|
to_base62(c.user_id.0 as u64)
|
||||||
|
);
|
||||||
|
|
||||||
|
c.tax_platform_id = Some("unresolved".to_owned());
|
||||||
|
c.upsert(txn).await?;
|
||||||
|
|
||||||
|
return Ok(());
|
||||||
|
};
|
||||||
|
|
||||||
(address, tax_platform_id, customer_id)
|
(address, tax_platform_id, customer_id)
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user