Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix update_account_for_credit in generate_failures method #18

Merged
merged 2 commits into from
Sep 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading