keithbrink/amazon-mws-laravel

Amazon Orders List not getting proper response

Closed this issue · 2 comments

Hey, so after fix in 7.1.1, it seems like the orders returning an empty array.

Looks like the issue sits inside AmazonOrdersList->parseXML.

I've modified the data to the following:

$orderData = new AmazonOrder(
                $this->storeName,
                null,
                $data,
                $this->mockMode,
                $this->mockFiles,
                $this->config
            );

$this->orderList[$this->index] = $orderData->getData();

And seems this code has no use, but maybe I'm wrong?
$this->orderList[$this->index]->mockIndex = $this->mockIndex;

anyway, applied these fixes and now it works like charm.

Are you planning to reopen a PR for this?

You should be able to get the data like so:

$order_list = new AmazonOrderList(....);
...
$order_list->getList();
foreach($order_list as $order) {
    $order_data = $order->getData();
}