Refactor commerce models and enhance payment logic
Refactored commerce models to remove language prefixes from status choices, improved order and payment validation, and enforced business rules for payment and shipping combinations. Updated order item and cart calculations to use VAT-inclusive prices, added unique constraints and indexes to reviews, and improved stock management logic. Added new Stripe client methods for session and refund management, and updated Zasilkovna and Deutsche Post models for consistency. Minor fixes and improvements across related tasks, URLs, and configuration models.
This commit is contained in:
5
backend/thirdparty/zasilkovna/client.py
vendored
5
backend/thirdparty/zasilkovna/client.py
vendored
@@ -3,7 +3,7 @@ from zeep.exceptions import Fault
|
||||
from zeep.transports import Transport
|
||||
from zeep.cache import SqliteCache
|
||||
|
||||
from configuration.models import Configuration
|
||||
from configuration.models import SiteConfiguration
|
||||
|
||||
import tempfile
|
||||
import base64
|
||||
@@ -17,9 +17,6 @@ logger = logging.getLogger(__name__)
|
||||
WSDL_URL = os.getenv("PACKETA_WSDL_URL", "https://www.zasilkovna.cz/api/soap.wsdl")
|
||||
PACKETA_API_PASSWORD = os.getenv("PACKETA_API_PASSWORD")
|
||||
|
||||
Configuration.g
|
||||
|
||||
|
||||
|
||||
# --- 1. Singleton pro klienta (aby se WSDL stáhlo jen jednou pro celý proces) ---
|
||||
@lru_cache(maxsize=1)
|
||||
|
||||
Reference in New Issue
Block a user