Fixed e00007 error

This commit is contained in:
2025-09-28 10:17:35 -04:00
parent 5b4a05566a
commit 940be20852
10 changed files with 179 additions and 124 deletions

View File

@@ -24,6 +24,10 @@ def test_transaction_router():
"""Test endpoint to verify transaction router is loaded"""
return {"test": "transaction router is working"}
@transaction_router.get("/transaction/delivery/{delivery_id}", summary="Get pre-authorization transaction for a delivery")
def get_delivery_transaction(delivery_id: int, db: Session = Depends(database.get_db)):
"""
@@ -98,7 +102,7 @@ def _parse_authnet_response(response):
"""
Parse Authorize.Net response for transaction status
"""
if response is not None and hasattr(response, 'messages') and response.messages.resultCode == "Ok":
if response.messages.resultCode == "Ok":
status = TransactionStatus.APPROVED
rejection_reason = None
else: