Skip to content

Commit

Permalink
Cast get_total to float before rounding
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaymo committed Jul 8, 2024
1 parent 7610eed commit 0e50170
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Payment/OrderLines.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function order_lines($order, $voucherDefaultCategory)

private function process_missmatch()
{
$orderTotal = $this->order->get_total();
$orderTotal = (float) $this->order->get_total();
$orderTotalRounded = round($orderTotal, 2);
$linesTotal = array_sum(array_map(function ($line) {
return $line['totalAmount']['value'];
Expand Down

0 comments on commit 0e50170

Please sign in to comment.