Skip to content

Commit 7171edf

Browse files
committed
Do not use the Controller class.
1 parent d9768bd commit 7171edf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Module/KlarnaCheckout.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616

1717
use Contao\BackendTemplate;
18-
use Contao\Controller;
1918
use Contao\CoreBundle\Exception\NoRootPageFoundException;
2019
use Contao\CoreBundle\Exception\PageNotFoundException;
2120
use Contao\CoreBundle\Exception\RedirectResponseException;
@@ -170,7 +169,7 @@ protected function compile()
170169
$jumpToCart = PageModel::findPublishedById($this->iso_cart_jumpTo);
171170
if (null !== $jumpToCart) {
172171
$jumpToCart->loadDetails();
173-
Controller::redirect($jumpToCart->getFrontendUrl(null, $jumpToCart->language));
172+
throw new RedirectResponseException($jumpToCart->getFrontendUrl(null, $jumpToCart->language));
174173
}
175174
}
176175

@@ -344,7 +343,7 @@ private function processExternalPaymentMethods()
344343

345344
// Order already completed (see isotope/core#1441)
346345
if ($isotopeOrder->checkout_complete) {
347-
Controller::redirect(
346+
throw new RedirectResponseException(
348347
$this->uri($this->klarna_confirmation_page).'?uid='.$isotopeOrder->getUniqueId()
349348
);
350349
}

0 commit comments

Comments
 (0)