Skip to content

Commit

Permalink
Merge pull request #1 from gpstiip88/master
Browse files Browse the repository at this point in the history
Fix auth and get orders
  • Loading branch information
kusflo authored Aug 5, 2018
2 parents be4f448 + 2caaff5 commit 624c449
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Entities/PShopWs.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
4 changes: 2 additions & 2 deletions src/Entities/PShopWsOrders.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -125,4 +125,4 @@ private function getDateTimeNow()

return new \DateTime('now', new \DateTimeZone($default_timezone));
}
}
}

0 comments on commit 624c449

Please sign in to comment.