offer analysis

This commit is contained in:
CHIEFSOFT\ameye
2025-06-05 23:06:09 -04:00
parent c400f1d69d
commit e8d930f9b8
4 changed files with 30 additions and 35 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ class EligibilityCheckService(BaseService):
return ResponseHelper.error(result_description=f"RACCheck failed")
rack_checks_response = response['data']['racResponse']
rack_checks_response = response['racResponse']
rac_check = RACCheck.add_rac_check(
customer_id = customer_id,
+7 -4
View File
@@ -2,6 +2,10 @@ from app.models import Offer, TransactionOffer
from app.models.loan import Loan
import random
import logging
from app.config import Config
RAC_CHECK_RULES = Config.rac_true_rules
logger = logging.getLogger(__name__)
class OfferAnalysis:
@@ -34,8 +38,8 @@ class OfferAnalysis:
return transaction_offer, offer, eligible_amount, original_transaction
@staticmethod
def _analyze_rack_checks(rack_response):
logger.info(f"This is PayLoad for ANALYSYS ***** : {str(rack_response)}", exc_info=True)
logger.info(f"RACk RUKES {str(RAC_CHECK_RULES)}", exc_info=True)
# "racResponse": {
# "accountStatus": true,
# "bvnValidated": true,
@@ -68,8 +72,7 @@ class OfferAnalysis:
# if we have active offers - we have to feed off it
logger.info(f"**RACK ANALYSIS** {customer_id}")
# Analyze Rack Checks
# _analyze_rack_checks(rack_checks_response) --> We need detail analysis
OfferAnalysis._analyze_rack_checks(rack_checks_response) #--> We need detail analysis
# we can now find the origin transactions
# Find the last loan - it will have original_transaction