From 093678206f4efe7e4fd94fd0ddb382b29729efa2 Mon Sep 17 00:00:00 2001 From: kGablo Date: Thu, 9 May 2024 13:06:33 +0200 Subject: [PATCH] Fix base grand total --- Model/ApiFacade/CardTransaction/CardApiFacade.php | 2 +- Model/ApiFacade/TpayConfig/CardConfigFacade.php | 2 +- Model/ApiFacade/TpayConfig/ConfigFacade.php | 2 +- Model/MethodListPlugin.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Model/ApiFacade/CardTransaction/CardApiFacade.php b/Model/ApiFacade/CardTransaction/CardApiFacade.php index f2cab91..7450859 100755 --- a/Model/ApiFacade/CardTransaction/CardApiFacade.php +++ b/Model/ApiFacade/CardTransaction/CardApiFacade.php @@ -95,7 +95,7 @@ private function createCardOriginApiInstance(TpayInterface $tpay, TpayConfigInte private function createOpenApiInstance(TpayInterface $tpay, TpayConfigInterface $tpayConfig, TpayTokensService $tokensService, TpayService $tpayService) { - if ('PLN' !== $this->storeManager->getStore()->getCurrentCurrencyCode() || !$tpayConfig->isCardEnabled()) { + if ('PLN' !== $this->storeManager->getStore()->getBaseCurrencyCode() || !$tpayConfig->isCardEnabled()) { $this->cardOpen = null; $this->useOpenCard = false; diff --git a/Model/ApiFacade/TpayConfig/CardConfigFacade.php b/Model/ApiFacade/TpayConfig/CardConfigFacade.php index 8b9e613..9d64768 100755 --- a/Model/ApiFacade/TpayConfig/CardConfigFacade.php +++ b/Model/ApiFacade/TpayConfig/CardConfigFacade.php @@ -88,7 +88,7 @@ private function createOriginApiInstance(TpayInterface $tpay, TpayConfigInterfac private function createOpenApiInstance(TpayInterface $tpay, TpayConfigInterface $tpayConfig, Repository $assetRepository, TpayTokensService $tokensService, StoreManagerInterface $storeManager) { - if ('PLN' !== $storeManager->getStore()->getCurrentCurrencyCode()) { + if ('PLN' !== $storeManager->getStore()->getBaseCurrencyCode()) { $this->openApi = null; $this->useOpenApi = false; diff --git a/Model/ApiFacade/TpayConfig/ConfigFacade.php b/Model/ApiFacade/TpayConfig/ConfigFacade.php index 0c91220..cb212db 100755 --- a/Model/ApiFacade/TpayConfig/ConfigFacade.php +++ b/Model/ApiFacade/TpayConfig/ConfigFacade.php @@ -92,7 +92,7 @@ private function createOriginApiInstance(TpayInterface $tpay, TpayConfigInterfac private function createOpenApiInstance(TpayInterface $tpay, TpayConfigInterface $tpayConfig, Repository $assetRepository, TpayTokensService $tokensService, StoreManagerInterface $storeManager) { - if ('PLN' !== $storeManager->getStore()->getCurrentCurrencyCode() || !$tpayConfig->isOpenApiEnabled()) { + if ('PLN' !== $storeManager->getStore()->getBaseCurrencyCode() || !$tpayConfig->isOpenApiEnabled()) { $this->openApi = null; $this->useOpenApi = false; diff --git a/Model/MethodListPlugin.php b/Model/MethodListPlugin.php index 17be43d..d15ce6f 100644 --- a/Model/MethodListPlugin.php +++ b/Model/MethodListPlugin.php @@ -148,7 +148,7 @@ private function filterResult(array $result): array private function isPlnPayment(): bool { - return 'PLN' === $this->storeManager->getStore()->getCurrentCurrencyCode(); + return 'PLN' === $this->storeManager->getStore()->getBaseCurrencyCode(); } private function filterTransaction(array $result): array