Open Priya-ergodesoft opened 6 years ago
Do you have the global variables set? Otherwise, try hard coding the variables like this:
'consumerId' => 'your-consumer-id'; 'privateKey' => 'your-private-key';
Let me know if this worked for you, it does for me. I'd be glad to help you more if you need it.
Hi @timstoel
I have problem where I get 400 Bad request error when I'm trying to fetch orders.
My current code:
$client = new Order([
'consumerId' => CONSUMER_ID,
'privateKey' => PRIVATE_KEY,
'wmConsumerChannelType' => WM_CONSUMER_CHANNEL_TYPE,
]);
try {
$resultsArr = $client->listReleased([
'createdStartDate' => '2018-03-13', // optional
'limit' => 10, // optional, default 10
'nextCursor' => '', // optional, value comes from previous call, used for pagination
]);
}
catch (Exception $e) {
die("There was a problem requesting the data: ".$e->getMessage());
}
print_r($resultsArr);
When I delete createdStartDate, then I just get blank 200 page (and I have orders on my products, they are just not showing).
Do you know what I'm doing wrong (link to my demo page: https://nemanjatanaskovic.com/walmart/ )?
P.s. when I test orders on https://developer.walmart.com/#/explorer/order I'm also getting this 400 error (you can see screenshot on this url: https://nemanjatanaskovic.com/walmart/001.png)
Thanks for your help, Nemanja
Hello Nemanja,
I had a lot less problems in the production environment than the developer environment. We still get a lot of 400 errors just from downloading data for certain SKUs even though we know they are active and listed and the request is well formed. We also have pagination issues where we couldn't go past 1000 products, and support basically told us you can't paginate past that with the API, so there are a lot of undocumented bugs/features and this API is incredibly frustrating to develop for.
Tim
Hi @timstoel
Thanks for feedback!
I have one question. Can you recommend the easiest way to collect Orders data and display them in XML?
Thing that worries me the most is error on walmart demo API page shown on this screenshot: https://nemanjatanaskovic.com/walmart/001.png
I've changed the code
$client = new Order([
'consumerId' => CONSUMER_ID,
'privateKey' => PRIVATE_KEY,
'wmConsumerChannelType' => WM_CONSUMER_CHANNEL_TYPE,
]);
try {
$resultsArr = $client->list([
'createdStartDate' => '2018-03-13', // optional
'limit' => 1, // optional, default 10
//'nextCursor' => '', // optional, value comes from previous call, used for pagination
]);
}
catch (Exception $e) {
die("There was a problem requesting the data: ".(string) $e->getResponse()->getBody());
}
print_r($resultsArr);
So now I get errors like:
MISSING_REQUEST_PARAM.GMP_ORDER_API
and
shipNode query param is missing
when I try to access the page: https://nemanjatanaskovic.com/walmart/
Any idea what this shipNode means and how can I get it?
Thanks a lot for support, Nemanja
You're welcome Nemanja, I'm not an expert in this but I'll share what I know.
I think shipNode is a parameter used by Walmart distributors, but if you are a Walmart marketplace seller you should not need to pass the shipNode parameter.
Tim
Hi @timstoel ,
I am new for this API, can you help me to out from such confusion,
Error executing command: Unable to load private key .why?
Hi Team,
I'm facing an error while working on '/walmart/tests/OrderTest.php'. and the error is
I tried to debug 'Signature.php' file and found i can get 'privateKey' after '$rsa = new RSA();', but somehow it is stuck between '$rsa = new RSA();' to 'if($rsa->loadKey($decodedPrivateKey,RSA::PRIVATE_FORMAT_PKCS8)){'.
Please help me on this. Thanks in advance.