walmart-partner-api-sdk-php icon indicating copy to clipboard operation
walmart-partner-api-sdk-php copied to clipboard

Timestamp breaks on 32 bit

Open goosehub opened this issue 7 years ago • 0 comments

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.

goosehub avatar Mar 21 '17 19:03 goosehub