working auto
This commit is contained in:
@@ -93,7 +93,7 @@ def get_transaction_by_auth_id(db: Session, auth_net_transaction_id: str):
|
||||
def get_transaction_by_auto_id(db: Session, auto_id: int):
|
||||
return db.query(models.Transaction).filter(
|
||||
models.Transaction.auto_id == auto_id,
|
||||
models.Transaction.transaction_type == 1,
|
||||
models.Transaction.transaction_type.in_([1, 2]),
|
||||
models.Transaction.status == 0
|
||||
).first()
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@ def get_auto_delivery_transaction(auto_id: int, db: Session = Depends(database.g
|
||||
Get the pre-authorization transaction for an auto ticket delivery.
|
||||
Used by the capture page for auto deliveries.
|
||||
"""
|
||||
|
||||
|
||||
transaction = crud.get_transaction_by_auto_id(db, auto_id=auto_id)
|
||||
if not transaction:
|
||||
raise HTTPException(status_code=404, detail="No pre-authorization transaction found for this auto delivery")
|
||||
|
||||
Reference in New Issue
Block a user