Skip to content

Commit

Permalink
Merge pull request #18 from PSNAppz/develop
Browse files Browse the repository at this point in the history
Fix update_account_for_credit in generate_failures method
  • Loading branch information
venky-ganapathy authored Sep 16, 2024
2 parents 5d78aa7 + 4e22d9f commit c834a5e
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,13 @@ def process_payments_worker(payment_request_batch_id: str):
session.commit()
except Exception as e:
_logger.error(f"Error processing payment: {e}")
session.rollback()
initiate_payment_batch_request.payment_status = PaymentStatus.PENDING
initiate_payment_batch_request.payment_initiate_attempts += 1
session.commit()



def construct_accounting_log_for_debit(
initiate_payment_request: InitiatePaymentRequest,
):
Expand Down Expand Up @@ -232,9 +234,11 @@ def generate_failures(failure_logs: List[AccountingLog], session):
)
else:
account = update_account_for_credit(
None,
account_log.account_number,
None,
None,
None,
account_log.transaction_amount,
session,
)
Expand Down

0 comments on commit c834a5e

Please sign in to comment.