Working payment accopunts

This commit is contained in:
2025-09-19 17:27:20 -04:00
parent 4bdfb4238d
commit 2ad9ed304e
9 changed files with 975 additions and 74 deletions

View File

@@ -43,6 +43,12 @@ def create_customer_card(db: Session, customer_id: int, card_info: schemas.CardC
def get_customer(db: Session, customer_id: int):
return db.query(models.Customer).filter(models.Customer.id == customer_id).first()
def get_customer_cards(db: Session, customer_id: int):
"""
Get all cards for a specific customer.
"""
return db.query(models.Card).filter(models.Card.user_id == customer_id).all()
def get_customer_by_email(db: Session, email: str):
return db.query(models.Customer).filter(models.Customer.customer_email == email).first()
@@ -97,4 +103,4 @@ def update_transaction_for_capture(db: Session, auth_net_transaction_id: str, ch
db.commit()
db.refresh(transaction)
return transaction
return transaction