added new config
This commit is contained in:
@@ -4,9 +4,9 @@ from app.services.repayment import RepaymentService
|
||||
from app.services.loan import LoanService
|
||||
from app.helpers.response_helper import ResponseHelper
|
||||
from app.utils.logger import logger
|
||||
from decimal import Decimal, ROUND_HALF_UP
|
||||
from app.services.loan_repayment_schedule import LoanRepaymentScheduleService
|
||||
from app.enums.loan_status import LoanStatus
|
||||
from app.config import settings
|
||||
|
||||
OVERRIDE_COLLECTION_TRANCATION_ID = settings.OVERRIDE_COLLECTION_TRANCATION_ID
|
||||
|
||||
class CollectLoanHelper:
|
||||
@staticmethod
|
||||
@@ -27,9 +27,13 @@ class CollectLoanHelper:
|
||||
|
||||
@staticmethod
|
||||
def _build_collect_loan_payload(loan_data, repayment_data, data, collectionMethod):
|
||||
debtId = str(loan_data.get('debtId', "")).strip().zfill(6)
|
||||
t_id = ''.join(random.choices(string.ascii_uppercase, k=22))
|
||||
logger.info(f"building CollectLoan endpoint with data: {loan_data}")
|
||||
|
||||
debtId = str(loan_data.get('debtId', "")).strip().zfill(6)
|
||||
#this can be overridden based on config
|
||||
t_id = ''.join(random.choices(string.ascii_uppercase, k=22))
|
||||
if OVERRIDE_COLLECTION_TRANCATION_ID == 100:
|
||||
t_id = loan_data['transactionId']
|
||||
return {
|
||||
"transactionId": t_id,
|
||||
"fbnTransactionId": loan_data['transactionId'],
|
||||
|
||||
Reference in New Issue
Block a user