Skip to content

Commit 2bad989

Browse files
committed
CS
1 parent b8ae724 commit 2bad989

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Controller/Module/KlarnaCheckoutConfirmationController.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
use Isotope\Model\ProductCollection\Order as IsotopeOrder;
2727
use Isotope\Model\Shipping;
2828
use Richardhj\IsotopeKlarnaCheckoutBundle\Api\ApiClient;
29+
use Symfony\Component\HttpClient\Exception\ClientException;
2930
use Symfony\Component\HttpFoundation\RedirectResponse;
3031
use Symfony\Component\HttpFoundation\Request;
3132
use Symfony\Component\HttpFoundation\Response;
@@ -64,7 +65,7 @@ protected function getResponse(Template $template, ModuleModel $model, Request $
6465

6566
try {
6667
$klarnaOrder = $response->toArray();
67-
} catch (\Symfony\Component\HttpClient\Exception\ClientException $e) {
68+
} catch (ClientException $e) {
6869
$response = $e->getResponse();
6970
if (404 === $response->getStatusCode()) {
7071
throw new PageNotFoundException('Klarna order not found: ID '.$orderId);

src/Controller/Module/KlarnaCheckoutController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ private function klarnaOrderData(FrontendUser $user, Config $isoConfig, Request
163163
'purchase_country' => $isoConfig->country,
164164
'purchase_currency' => $isoConfig->currency,
165165
'locale' => $request->getLocale(),
166-
'order_amount' => (int) round($cart->getTotal() * 100, 0),
166+
'order_amount' => (int) round($cart->getTotal() * 100),
167167
'order_tax_amount' => (int) round(($cart->getTotal() - $cart->getTaxFreeTotal()) * 100),
168168
'order_lines' => $this->apiClient->orderLines($cart),
169169
'merchant_urls' => [

0 commit comments

Comments
 (0)