added loan status check on disbursement

This commit was merged in pull request #55.
This commit is contained in:
Chinenye Nmoh
2025-11-03 16:04:46 +01:00
parent e7e8a751cf
commit d6d1e5a7cf
+4
View File
@@ -62,6 +62,10 @@ class SimbrellaClient:
loan_data = loan.to_dict()
logger.info(f"Here is your loan data: {loan_data}")
if loan_data['status'] != LoanStatus.ACTIVE:
logger.info(f"Loan with transaction id: {data['transactionId']} is not active")
return 0
if loan_data['disburseDate'] is not None:
logger.info("*************************SEEM LIKE A RETRY CALL -WE WILL VERIFY Result to Continue ")