Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add possibility to switch test and production env
Maciej Korycinski9ec88524c184
diff --git a/saleor/payment/gateways/adyen/plugin.py b/saleor/payment/gateways/adyen/plugin.pyindex 11ab5c1682..29d48e01fe 100644--- a/saleor/payment/gateways/adyen/plugin.py+++ b/saleor/payment/gateways/adyen/plugin.py@@ -186,7 +186,12 @@ class AdyenGatewayPlugin(BasePlugin):},)api_key = self.config.connection_params["api_key"]- self.adyen = Adyen.Adyen(xapikey=api_key)++ live_endoint = self.config.connection_params["live"] or None+ platform = "live" if live_endoint else "test"+ self.adyen = Adyen.Adyen(+ xapikey=api_key, live_endpoint_prefix=live_endoint, platform=platform+ )def webhook(self, request: WSGIRequest, path: str, previous_value) -> HttpResponse:config = self._get_gateway_config()