Skip to content

Commit

Permalink
Bugfix: Make sure that there is a float value
Browse files Browse the repository at this point in the history
  • Loading branch information
michielgerritsen committed Nov 21, 2023
1 parent 4eb3bf6 commit 87433c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Controller/ApplePay/ShippingMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function execute()
return [
'identifier' => $method->getCarrierCode() . '_' . $method->getMethodCode(),
'label' => $method->getMethodTitle() . ' - ' . $method->getCarrierTitle(),
'amount' => number_format($method->getPriceInclTax(), 2, '.', ''),
'amount' => number_format($method->getPriceInclTax() ?: 0.0, 2, '.', ''),
'detail' => '',
];
}, $methods),
Expand All @@ -92,7 +92,7 @@ public function execute()
'type' => 'final',
'code' => $total->getCode(),
'label' => $total->getData('title'),
'amount' => number_format($total->getData('value'), 2, '.', ''),
'amount' => number_format($total->getData('value') ?: 0.0, 2, '.', ''),
];
}, array_values($cart->getTotals()))
]);
Expand Down

0 comments on commit 87433c7

Please sign in to comment.