account type is permanent and password registration is now working at checkout
This commit is contained in:
@@ -14,6 +14,9 @@ pub struct Checkout {
|
||||
pub email: String,
|
||||
pub phone: String,
|
||||
pub customer_name: Option<String>,
|
||||
/// The account that owns this order, if any (a logged-in buyer or a guest
|
||||
/// who created an account during checkout). `None` for pure guest orders.
|
||||
pub user_id: Option<i32>,
|
||||
pub account_type: String,
|
||||
pub company_name: Option<String>,
|
||||
pub company_id: Option<String>,
|
||||
@@ -75,6 +78,7 @@ pub async fn place(ctx: &AppContext, items: &[(i32, i32)], details: Checkout) ->
|
||||
status: Set("pending".to_string()),
|
||||
total_cents: Set(subtotal + details.method.price_cents),
|
||||
currency: Set(currency),
|
||||
user_id: Set(details.user_id),
|
||||
account_type: Set(details.account_type),
|
||||
company_name: Set(details.company_name),
|
||||
company_id: Set(details.company_id),
|
||||
|
||||
Reference in New Issue
Block a user