From ae41f679afe71c1c66056c08dfd895e3f2d785a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maksymilian=20Strzy=C5=BCewski?= <55131954+mstrzyzewski@users.noreply.github.com> Date: Fri, 15 Jan 2021 12:00:54 +0100 Subject: [PATCH] Fix method for getting order status (#90) --- Model/OrderImporter/Status.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Model/OrderImporter/Status.php b/Model/OrderImporter/Status.php index 5b34c42..9b2c55f 100644 --- a/Model/OrderImporter/Status.php +++ b/Model/OrderImporter/Status.php @@ -50,10 +50,10 @@ public function get(CheckoutFormInterface $checkoutForm) } if ($paidAmountValue > $totalPaidValue) { - return [self::PENDING_STATUS, $this->getOverpaymentStatus()]; + return $this->getOverpaymentStatus(); } - return [self::PENDING_STATUS, $this->getUnderpaymentStatus()]; + return $this->getUnderpaymentStatus(); } /** @@ -80,11 +80,11 @@ private function getStatusFromConfig($key) { $value = $this->scopeConfig->getValue($key); if (!$value) { - return [self::STATUS_KEY => self::PENDING_STATUS, self::STATE_KEY => Order::STATE_NEW]; + return $this->arrayResponse(self::PENDING_STATUS, Order::STATE_NEW); } list($status, $state) = explode(self::STATUS_STATE_SEPARATOR, $value); - return [self::STATUS_KEY => $status, self::STATE_KEY => $state]; + return $this->arrayResponse($status, $state); } /**