Update eligibility_check.py
This commit was merged in pull request #39.
This commit is contained in:
@@ -75,11 +75,11 @@ class EligibilityCheckService(BaseService):
|
|||||||
|
|
||||||
|
|
||||||
if not response or response['responseCode'] != '00':
|
if not response or response['responseCode'] != '00':
|
||||||
|
|
||||||
if response:
|
if response:
|
||||||
logger.error(f"{response['responseMessage']}")
|
logger.error(f"{response['responseMessage']}")
|
||||||
|
|
||||||
return ResponseHelper.error(result_description=f"Failed to save RACCheck")
|
return ResponseHelper.error(result_description=f"RACCheck failed")
|
||||||
|
|
||||||
rack_checks_response = response['data']['racResponse']
|
rack_checks_response = response['data']['racResponse']
|
||||||
|
|
||||||
@@ -89,9 +89,12 @@ class EligibilityCheckService(BaseService):
|
|||||||
transaction_id = transaction.transaction_id,
|
transaction_id = transaction.transaction_id,
|
||||||
data = rack_checks_response
|
data = rack_checks_response
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# -----------------TIME FOR ANALYSIS TO REGISTER OFFER ----------------------
|
if not rac_check:
|
||||||
|
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(
|
||||||
|
|||||||
Reference in New Issue
Block a user