Skip to content

Revert to original stringify params method #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: stable
Choose a base branch
from

Conversation

joe-pritchard
Copy link

@joe-pritchard joe-pritchard commented Mar 22, 2018

The way the params were stringified in the original repo is actually preferable, as using http_build_query the created signatures are invalid when your params have spaces or other non-url safe characters in them. I've verified this on the InboundShipments Api where I was pushing SKUs containing spaces and forward slashes.

With the method like this it works, and with the modified version using http_build_query you either end up double-encoding or you get an invalid signature error and the call fails.

I'm using your fork in order to get the code-based marketplace configuration (great work, thanks!) but need this changed back in order to continue with it. Its a trivial change which shouldn't really affect anything else...

Cheers :)

Joe

The way the params were stringified in the original repo is actually preferable, as using your way the created signatures are invalid when your params have spaces or other non-url safe characters in them. I've verified this on the InboundShipments Api methods where I was pushing SKUs containing spaces and forward slashes. With the method like this it works, and with the modified version you either end up double-encoding or you get an invalid signature error and the call fails
Revert to the original parameter stringify method
It's okay for shipmentID not to be set as long as time constraints are set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant