Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix test migration compability (#10999)

Iga Karbowiakc28b12323141
diff --git a/saleor/payment/utils.py b/saleor/payment/utils.py
index c61fd74fef..999d838bca 100644
--- a/saleor/payment/utils.py
+++ b/saleor/payment/utils.py
@@ -23,7 +23,6 @@ from . import (
PaymentError,
StorePaymentMethod,
TransactionKind,
- gateway,
)
from .error_codes import PaymentErrorCode
from .interface import (
@@ -616,10 +615,12 @@ def try_void_or_refund_inactive_payment(
active. Some payment methods don't required confirmation so we can receive delayed
webhook when we have order already paid.
"""
+ from .gateway import payment_refund_or_void
+
if transaction.is_success:
channel_slug = get_channel_slug_from_payment(payment)
try:
- gateway.payment_refund_or_void(
+ payment_refund_or_void(
payment,
manager,
channel_slug=channel_slug,