Skip to content

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

Add payment authorize prototype method to BasePlugin

Jakub Draganek4e7a491a50a7
diff --git a/saleor/extensions/base_plugin.py b/saleor/extensions/base_plugin.py
index 458d8d6715..9bbb0cea57 100644
--- a/saleor/extensions/base_plugin.py
+++ b/saleor/extensions/base_plugin.py
@@ -13,6 +13,7 @@ if TYPE_CHECKING:
from ..product.models import Product
from ..account.models import Address
from ..order.models import OrderLine, Order
+ from ..payment.interface import GatewayConfig, GatewayResponse, PaymentData
class BasePlugin:
@@ -136,6 +137,11 @@ class BasePlugin:
) -> Decimal:
return NotImplemented
+ def authorize_payment(
+ self, payment_information: PaymentData, config: GatewayConfig, previous_value
+ ) -> GatewayResponse:
+ pass
+
@classmethod
def _update_config_items(
cls, configuration_to_update: List[dict], current_config: List[dict]