From af2fc8e25daa47c66246ae708c0f340294c9e6a8 Mon Sep 17 00:00:00 2001 From: Maksim Kotlyar Date: Fri, 13 Mar 2015 15:40:16 +0200 Subject: [PATCH] [klarna-invoice] fix payment factory, always live cannot set sandbox mode. --- PaymentFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PaymentFactory.php b/PaymentFactory.php index 7e80621..9901ef4 100644 --- a/PaymentFactory.php +++ b/PaymentFactory.php @@ -101,7 +101,7 @@ public function createConfig(array $config = array()) $config['payum.api'] = function (ArrayObject $config) { $config->validateNotEmpty($config['payum.required_options']); - $config['mode'] = null === $config['sandbox'] ? \Klarna::BETA : \Klarna::LIVE; + $config['mode'] = $config['sandbox'] ? \Klarna::BETA : \Klarna::LIVE; if (null === $country = \KlarnaCountry::fromCode($config['country'])) { throw new LogicException(sprintf('Given %s country code is not valid. Klarna cannot recognize it.', $config['country']));