Are you actually using Klarna, if no then disable with bin/magento module:disable. However if you need to use it there’s a know conflict and to solve that

#46 Onestepcheckout\Iosc\Observer\Frontend\Setdefaults->callDefaults() called at [vendor/onestepcheckout/iosc/Observer/Frontend/Setdefaults.php:93]

open up and comment out the call on vendor/onestepcheckout/iosc/Observer/Frontend/Setdefaults.php:93

Then OneStepCheckout will not try to set default payment and Klarna will not request their service without all necessary data being available.


app/code/Customweb/PowerpayCw/Model/Payment/Method/AbstractMethod.php
app/code/Customweb/DatatransCw/Model/Payment/Method/AbstractMethod.php

and commented out their validation for method availability against currency code and whatever they check inside isAvailable method. Methods should be visible now all the time.

The first condition fails cause of $allowedCurrencies is empty (prob no currency limitation configured at all) and the second one is nto even hit cause first one is failing all the time. If any of those limitations are important your developer now knows where to look for the issues.

public function isAvailable(\Magento\Quote\Api\Data\CartInterface $quote = null) { $isAvailable = parent::isAvailable($quote); /* if ($isAvailable) { $allowedCurrencies = $this->getPaymentMethodConfigurationValue('currency'); if ($quote !== null && !empty($allowedCurrencies)) { $isAvailable = (in_array($quote->getCurrency()->getQuoteCurrencyCode(), $allowedCurrencies)); } } if ($isAvailable) { try { $context = $this->getAuthorizationMethodFactory()->getContextFactory()->createQuote($this, $quote); $adapter = $this->getAuthorizationMethodFactory()->create($context); $adapter->preValidate(); $isAvailable = $context->getOrderContext()->isValid(); } catch (\Exception $e) { $isAvailable = false; } }*/ return $isAvailable; }
Code language: PHP (php)
public function isAvailable(\Magento\Quote\Api\Data\CartInterface $quote = null) { $isAvailable = parent::isAvailable($quote); /* if ($isAvailable) { $allowedCurrencies = $this->getPaymentMethodConfigurationValue('currency'); if ($quote !== null && !empty($allowedCurrencies)) { $isAvailable = (in_array($quote->getCurrency()->getQuoteCurrencyCode(), $allowedCurrencies)); } } if ($isAvailable) { try { $context = $this->getAuthorizationMethodFactory()->getContextFactory()->createQuote($this, $quote); $adapter = $this->getAuthorizationMethodFactory()->create($context); $adapter->preValidate(); $isAvailable = $context->getOrderContext()->isValid(); } catch (\Exception $e) { $isAvailable = false; } }*/ return $isAvailable; }
Code language: PHP (php)