Working payment accopunts
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user