Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Use explicit TokenConfig in utils
Jakub Draganekcb73aa23d403
diff --git a/saleor/payment/utils.py b/saleor/payment/utils.pyindex d97f083ab6..00bd59c23f 100644--- a/saleor/payment/utils.py+++ b/saleor/payment/utils.py@@ -24,7 +24,8 @@ from . import (TransactionKind,get_payment_gateway,)-from .interface import AddressData, GatewayResponse, PaymentData++from .interface import AddressData, GatewayResponse, PaymentData, TokenConfigfrom .models import Payment, Transactionlogger = logging.getLogger(__name__)@@ -234,12 +235,12 @@ def create_transaction(return txn-def gateway_get_client_token(gateway_name: str, **token_params):+def gateway_get_client_token(gateway_name: str, token_config: TokenConfig):"""Gets client token, that will be used as a customer's identificator forclient-side tokenization of the chosen payment method."""gateway, gateway_config = get_payment_gateway(gateway_name)- return gateway.get_client_token(config=gateway_config, **token_params)+ return gateway.get_client_token(config=gateway_config, token_config=token_config)def clean_capture(payment: Payment, amount: Decimal):