Skip to content

Commit

Permalink
Merge branch 'master' of github.com:forecho/amazon-mws
Browse files Browse the repository at this point in the history
  • Loading branch information
forecho committed Mar 20, 2020
2 parents 4db93e9 + dd5d709 commit cfd3e70
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/MWSClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function validateCredentials()
try {
$this->ListOrderItems('validate');
} catch (Exception $e) {
if ($e->getMessage() == 'Invalid AmazonOrderId: validate') {
if ($e->getMessage() == 'Invalid AmazonOrderId: validate' || $e->getMessage() == 'The order id you have requested is not valid.') {
return true;
} else {
return false;
Expand Down Expand Up @@ -1023,6 +1023,7 @@ public function GetReport($ReportId)
$reader->setHeaderOffset(0);
$headers = $reader->getHeader();
$statement = new \League\Csv\Statement;
$result = array();
foreach ($statement->process($reader) as $row) {
$result[] = array_combine($headers, $row);
}
Expand Down Expand Up @@ -1452,4 +1453,4 @@ public function setClient(Client $client)
{
$this->client = $client;
}
}
}

0 comments on commit cfd3e70

Please sign in to comment.