small fixes working great
This commit is contained in:
@@ -90,9 +90,9 @@ def verify_customer_authorize_account(db: Session, customer_id: int) -> dict:
|
||||
|
||||
# Check for payment profiles (cards)
|
||||
has_payment_methods = False
|
||||
if hasattr(response, 'profile') and response.profile:
|
||||
if hasattr(response, 'profile') and response.profile is not None:
|
||||
payment_profiles = response.profile.paymentProfiles
|
||||
if payment_profiles and len(payment_profiles) > 0:
|
||||
if len(payment_profiles) > 0:
|
||||
has_payment_methods = True
|
||||
|
||||
missing_components = []
|
||||
@@ -127,7 +127,7 @@ def _is_profile_valid(response) -> bool:
|
||||
"""
|
||||
try:
|
||||
# Check basic response validity
|
||||
if not response:
|
||||
if response is None:
|
||||
return False
|
||||
|
||||
# Check if result code indicates success
|
||||
@@ -139,7 +139,7 @@ def _is_profile_valid(response) -> bool:
|
||||
return False
|
||||
|
||||
# Check for any error messages that indicate profile doesn't exist
|
||||
if hasattr(response, 'messages') and response.messages.message:
|
||||
if hasattr(response, 'messages') and len(response.messages.message) > 0:
|
||||
for message in response.messages.message:
|
||||
# Check for specific error codes that indicate profile doesn't exist
|
||||
if hasattr(message, 'code'):
|
||||
|
||||
Reference in New Issue
Block a user