config issues prod
This commit is contained in:
@@ -25,8 +25,10 @@ TRANSACTION_KEY = ApplicationConfig.TRANSACTION_KEY
|
||||
# Set Authorize.net environment based on configuration
|
||||
if ApplicationConfig.CURRENT_SETTINGS == 'PRODUCTION':
|
||||
constants.environment = constants.PRODUCTION
|
||||
VALIDATION_MODE = "liveMode"
|
||||
else:
|
||||
constants.environment = constants.SANDBOX
|
||||
VALIDATION_MODE = "testMode"
|
||||
|
||||
constants.show_url_on_request = True # Very useful for debugging
|
||||
|
||||
@@ -191,7 +193,7 @@ def add_payment_profile_to_customer(customer_profile_id: str, customer: schemas.
|
||||
customerProfileId=customer_profile_id,
|
||||
paymentProfile=paymentProfile,
|
||||
# ========= CHANGE 2.B: USE liveMode =========
|
||||
validationMode="testMode"
|
||||
validationMode=VALIDATION_MODE
|
||||
)
|
||||
|
||||
controller = createCustomerPaymentProfileController(request)
|
||||
@@ -243,6 +245,7 @@ def authorize_customer_profile(customer_profile_id: str, payment_profile_id: str
|
||||
# CHECK FOR E00121 ERROR - "invalid payment profile ID"
|
||||
if db_session and customer_id and card_id and _is_e00121_response(response):
|
||||
logger.warning(f"🚨 E00121 DETECTED! Invalid payment profile {payment_profile_id}")
|
||||
logger.warning("POOOP")
|
||||
logger.info(f"🔄 AUTO-RECOVERING: Starting payment profile refresh for customer {customer_id}")
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user