walmart-partner-api-sdk-php
walmart-partner-api-sdk-php copied to clipboard
Timestamp breaks on 32 bit
This may be a bit of an edge case, but just incase somebody has the same trouble with this library it'll be documented. I ran this library on a 32 bit server, and on src/middleware/AuthSubscriber.php, $timestamp = Utils::getMilliseconds();
which was basically $timestamp = round(microtime(true) * 1000);
would return scientific notation because it was 32 bit causing a 401 Unauthorized. I haven't found a true fix, however I've found $timestamp = time() . '000';
works and pragmatically speaking should be acceptable since Walmart isn't using the data for that kind of precision.