Skip to content

Commit

Permalink
24281 - Skip completed payment on _verify_created_direct_pay_invoices (
Browse files Browse the repository at this point in the history
  • Loading branch information
Jxio authored Nov 7, 2024
1 parent 98a1f10 commit 92d8555
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jobs/payment-jobs/tasks/stale_payment_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ def _verify_created_direct_pay_invoices(cls):
if paybc_invoice.paymentstatus in STATUS_PAID:
current_app.logger.debug("_update_active_transactions")
transaction = TransactionService.find_active_by_invoice_id(invoice.id)
payment = PaymentModel.find_by_id(transaction.payment_id)

if payment.payment_status_code == PaymentStatus.COMPLETED.value:
continue
if transaction:
# check existing payment status in PayBC and save receipt
TransactionService.update_transaction(transaction.id, pay_response_url=None)
Expand Down

0 comments on commit 92d8555

Please sign in to comment.