From a10bf5c8afcc7ca065d11913d16daaf644aabcbd Mon Sep 17 00:00:00 2001 From: Edwin Eames Date: Sun, 28 Sep 2025 10:19:21 -0400 Subject: [PATCH] gitignore --- app/routers/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/routers/main.py b/app/routers/main.py index 27a75e1..1df3e11 100644 --- a/app/routers/main.py +++ b/app/routers/main.py @@ -114,10 +114,11 @@ def run_card_migration_synchronously(): validationMode="testMode" ) controller = createCustomerProfileController(request) + controller.setenvironment(constants.PRODUCTION) controller.execute() response = controller.getresponse() - if response is not None and hasattr(response, 'messages') and response.messages.resultCode == "Ok": + if response.messages.resultCode == "Ok": profile_id = response.customerProfileId if hasattr(response, 'customerProfileId') else None payment_ids = response.customerPaymentProfileIdList.numericString if hasattr(response, 'customerPaymentProfileIdList') and hasattr(response.customerPaymentProfileIdList, 'numericString') else [] payment_id = payment_ids[0] if payment_ids else None @@ -175,9 +176,10 @@ def run_card_migration_synchronously(): validationMode="testMode" ) controller = createCustomerPaymentProfileController(request) + controller.setenvironment(constants.PRODUCTION) controller.execute() response = controller.getresponse() - if response is not None and response.messages.resultCode == "Ok": + if response.messages.resultCode == "Ok": return str(response.customerPaymentProfileId) else: # // FIX 2 (Applied here as well): Robust error message parsing