major claude changes
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import logging
|
||||
from fastapi import APIRouter, Depends, HTTPException
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
@@ -7,6 +8,8 @@ from ..services.check_user_service import verify_customer_authorize_account
|
||||
from ..services.user_delete import delete_user_account
|
||||
from ..services.user_create import create_user_account
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Create router for user check endpoints
|
||||
user_check_router = APIRouter()
|
||||
|
||||
@@ -18,6 +21,7 @@ def check_authorize_account(customer_id: int, db: Session = Depends(get_db)):
|
||||
|
||||
Returns status indicating what's needed for payment processing.
|
||||
"""
|
||||
logger.info(f"GET /check-authorize-account/{customer_id} - Checking Authorize.net account setup")
|
||||
try:
|
||||
result = verify_customer_authorize_account(db, customer_id)
|
||||
return result
|
||||
@@ -32,6 +36,7 @@ def create_account(customer_id: int, db: Session = Depends(get_db)):
|
||||
This creates the customer profile and all associated payment profiles in Authorize.net,
|
||||
and updates the database with the profile IDs.
|
||||
"""
|
||||
logger.info(f"POST /create-account/{customer_id} - Creating Authorize.net account")
|
||||
try:
|
||||
result = create_user_account(db, customer_id)
|
||||
return result
|
||||
@@ -46,6 +51,7 @@ def delete_account(customer_id: int, db: Session = Depends(get_db)):
|
||||
This removes the customer profile and all associated payment profiles from Authorize.net,
|
||||
and updates the database to null out the ID fields.
|
||||
"""
|
||||
logger.info(f"DELETE /delete-account/{customer_id} - Deleting Authorize.net account")
|
||||
try:
|
||||
result = delete_user_account(db, customer_id)
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user