From 15f94cd4130e6ab15dd28ede80e4a187a10e3a31 Mon Sep 17 00:00:00 2001 From: gpstiip88 Date: Thu, 26 Jul 2018 18:16:04 +0200 Subject: [PATCH 1/2] Fix auth request --- src/Entities/PShopWs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Entities/PShopWs.php b/src/Entities/PShopWs.php index 39c2597..5fe9126 100644 --- a/src/Entities/PShopWs.php +++ b/src/Entities/PShopWs.php @@ -28,7 +28,7 @@ public function getApiPermissions() protected function get($options = null) { - $response = $this->client->request('GET', $this->getValidUrl($options), ['auth' => [$this->key]]); + $response = $this->client->request('GET', $this->getValidUrl($options), ['auth' => [$this->key, '']]); PShopWsException::checkStatusCode($response->getStatusCode()); return $this->parseXML($response->getBody()); From 2caaff55e60a866538e5cf432b2d22d9edeed894 Mon Sep 17 00:00:00 2001 From: gpstiip88 Date: Thu, 26 Jul 2018 18:16:56 +0200 Subject: [PATCH 2/2] Fix get lists of orders --- src/Entities/PShopWsOrders.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Entities/PShopWsOrders.php b/src/Entities/PShopWsOrders.php index d46e9cf..69c7785 100644 --- a/src/Entities/PShopWsOrders.php +++ b/src/Entities/PShopWsOrders.php @@ -39,7 +39,7 @@ public function getListLastDays($days = 7) foreach ($days as $day) { $result = $this->getListByDay($day); if ($result) { - $orders [] = $result[0]; + $orders = array_merge($orders, $result); } } @@ -125,4 +125,4 @@ private function getDateTimeNow() return new \DateTime('now', new \DateTimeZone($default_timezone)); } -} \ No newline at end of file +}