|
@@ -59,6 +59,6 @@ async fn handle_failure(event: Event, db: &PgPool) -> Result<(), HttpError> {
|
|
|
_ => {return Err(HttpError::InvalidInput("No payment intent ID".into()))}
|
|
_ => {return Err(HttpError::InvalidInput("No payment intent ID".into()))}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- Purchase::update_status(db, id, Status::Succeeded).await?;
|
|
|
|
|
|
|
+ Purchase::update_status(db, id, Status::Failed).await?;
|
|
|
Ok(())
|
|
Ok(())
|
|
|
}
|
|
}
|