kafka collect error
This commit is contained in:
@@ -146,10 +146,11 @@ class KafkaIntegration:
|
|||||||
logger.info(f"Calling collect_loan service with message: {message}")
|
logger.info(f"Calling collect_loan service with message: {message}")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
#Calling CollectLoan endpoint with data: {'transactionId': 'TRCVIC85641527829', 'customerId': 'ZX48440946', 'productId': 'AMPC', 'loanRef': 'TRCVIC85641527829USSDAMPC', 'debtId': '014231'}
|
||||||
response = SimbrellaClient.collect_loan_user_initiated(message)
|
response = SimbrellaClient.collect_loan_user_initiated(message)
|
||||||
logger.info(
|
logger.info(
|
||||||
f"Successfully sent message to collect_loan service: {response}"
|
f"Successfully sent message to collect_loan service: {response}"
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.info(f"Failed to call collect_loan service: {e}")
|
logger.error(f"Failed to call collect_loan service: {e}")
|
||||||
# raise
|
# raise
|
||||||
|
|||||||
@@ -181,8 +181,17 @@ class SimbrellaClient:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def collect_loan_user_initiated(data):
|
def collect_loan_user_initiated(data):
|
||||||
# InitiatedBy = USER_INITIATED
|
# InitiatedBy = USER_INITIATED
|
||||||
logger.info(f"Calling CollectLoan collect_loan_user_initiated ******* endpoint with data: {data}")
|
try:
|
||||||
return SimbrellaClient._collect_loan(data,"1")
|
logger.info(f"Calling CollectLoan collect_loan_user_initiated ******* endpoint with data: {data}")
|
||||||
|
return SimbrellaClient._collect_loan(data, "1")
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"Error in collect_loan_user_initiated: {e}")
|
||||||
|
# return ResponseHelper.error(
|
||||||
|
# message="Failed to collect loan for user initiated ",
|
||||||
|
# status_code=500,
|
||||||
|
# error=str(e)
|
||||||
|
# )
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def collect_loan_user_salary_detect(data):
|
def collect_loan_user_salary_detect(data):
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user