Merge branch 'middlewear-integration' of DigiFi/digifi-BankToProductCore into master

This commit is contained in:
2025-06-04 02:36:14 +00:00
committed by Gogs
+18 -7
View File
@@ -70,20 +70,31 @@ class EligibilityCheckService(BaseService):
return ResponseHelper.error(result_description="RACCheck failed") return ResponseHelper.error(result_description="RACCheck failed")
response = response.json() response = response.json()
logger.info(f"This is Response (from Eligibility Check): {str(response)}", exc_info=True)
if not response or response['responseCode'] != '00':
if response:
logger.error(f"{response['responseMessage']}")
return ResponseHelper.error(result_description=f"RACCheck failed")
rack_checks_response = response['data']['racResponse']
rac_check = RACCheck.add_rac_check( rac_check = RACCheck.add_rac_check(
customer_id = customer_id, customer_id = customer_id,
account_id = account_id, account_id = account_id,
transaction_id = transaction.transaction_id, transaction_id = transaction.transaction_id,
data = response['racResponse'] data = rack_checks_response
) )
if not rac_check:
logger.error(f"Failed to save RACCheck")
return ResponseHelper.error(result_description="Failed to save RACCheck.")
rack_checks_response = response['racResponse'] if not rac_check:
# -----------------TIME FOR ANALYSIS TO REGISTER OFFER ---------------------- logger.error(f"Failed to save RACCheck")
return ResponseHelper.error(result_description="Failed to save RACCheck.")
# -----------------TIME FOR ANALYSIS TO REGISTER OFFER ----------------------
# eligible_offers = [] # eligible_offers = []
try: try:
eligible_offers = OfferAnalysis.decide_offer( eligible_offers = OfferAnalysis.decide_offer(