some yookassa changes

This commit is contained in:
machka pasla
2025-12-09 22:32:10 +03:00
parent 7b650a74a6
commit 8eba23574b
7 changed files with 26 additions and 20 deletions
+4 -1
View File
@@ -21,7 +21,10 @@ class YooKassaService:
self.settings = settings_obj
if not shop_id or not secret_key:
if self.settings and not self.settings.YOOKASSA_ENABLED:
logging.warning("YooKassa is disabled via YOOKASSA_ENABLED flag. Payment functionality will be DISABLED.")
self.configured = False
elif not shop_id or not secret_key:
logging.warning(
"YooKassa SHOP_ID or SECRET_KEY not configured in settings. "
"Payment functionality will be DISABLED.")