From d7250a8407f49decbd8b7ea8c371f05acbdb0de2 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 11 Jan 2024 14:27:38 +0100 Subject: [PATCH] Fix card saving --- Model/ApiFacade/TpayConfig/ConfigOpen.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Model/ApiFacade/TpayConfig/ConfigOpen.php b/Model/ApiFacade/TpayConfig/ConfigOpen.php index bf5bdeb..fce7a75 100755 --- a/Model/ApiFacade/TpayConfig/ConfigOpen.php +++ b/Model/ApiFacade/TpayConfig/ConfigOpen.php @@ -85,7 +85,8 @@ public function createCSS(string $css): string public function getCardConfig() { $customerTokensData = []; - if ($this->tpay->getCardSaveEnabled()) { + + if ($this->tpay->getCardSaveEnabled() && $this->tpay->isCustomerLoggedIn()) { $customerTokens = $this->tokensService->getCustomerTokens($this->tpay->getCheckoutCustomerId(), true); foreach ($customerTokens as $value) { $customerTokensData[] = [