From 0e501709ef919f8c5558e85470dc97198f40317e Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Mon, 8 Jul 2024 13:25:22 +0200 Subject: [PATCH] Cast get_total to float before rounding --- src/Payment/OrderLines.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Payment/OrderLines.php b/src/Payment/OrderLines.php index bf8895b8..1c76bbf3 100644 --- a/src/Payment/OrderLines.php +++ b/src/Payment/OrderLines.php @@ -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'];