From 14bf3ebf0331deb6a3307d0d8077dc1e675d11bc Mon Sep 17 00:00:00 2001 From: kGablo Date: Fri, 27 Sep 2024 14:35:16 +0200 Subject: [PATCH] Add minimum amount validation --- Model/TpayPayment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Model/TpayPayment.php b/Model/TpayPayment.php index 7928a31..42456bf 100755 --- a/Model/TpayPayment.php +++ b/Model/TpayPayment.php @@ -287,7 +287,7 @@ public function getCheckoutTotal() { $amount = (float) $this->getCheckout()->getQuote()->getBaseGrandTotal(); - if (!$amount) { + if (!$amount && $this->getCheckout()->getLastRealOrderId()) { $orderId = $this->getCheckout()->getLastRealOrderId(); $order = $this->orderRepository->getByIncrementId($orderId); $amount = $order->getBaseGrandTotal();