Help php amazon mws get order


#1

hi
im using this api https://github.com/CPIGroup/phpAmazonMWS .
im trying to get the details of an order id, but im getting blank result.
here is my code.

 $list=getAmazonOrderItemList();
echo "Order Id: $ido Details:<hr>";
    foreach ($list as $order) {

        echo '<b>SKY:</b> '.$order->getSellerSKU();
}

function getAmazonOrderItemList() {
    require('../includes/classes.php'); //autoload classes, not needed if composer is being used

    try {
        $amz = new AmazonOrderItemList("YourAmazonStore"); //store name matches the array key in the config file
        $amz->setUseToken(); //tells the object to automatically use tokens right away
$amz ->setOrderId("111-8516083-2753054");
 $amz->fetchItems(); //this is what actually sends the request
 return $amz->getItems(); //this is what actually sends the request

    } catch (Exception $ex) {
        echo 'There was a problem with the Amazon library. Error: '.$ex->getMessage();
    }
}


#2

Is it all blank, or . . . just buyername, recipient name, shipping address lines, but you are still getting city, state, zip and the buyer’s email? If the latter, Amazon has removed your ability to receive Personally Identifiable Information. They’ve been doing that lately.

bunga bunga!


#3

I would avoid using someone else’s library when Amazon provides one for you. But like bunga_bunga mentioned Amazon has been doing audits on developer credentials and if you happen to either not respond or respond with answers that they deemed not needing or meeting the security expectations for getting personal identifying information (PII) they have removed that.

https://developer.amazonservices.com/phpclients