bent0b0x / amazon-mws

MIT License
14 stars 8 forks source link

Exclamation mark in request doesn't work #7

Closed trss closed 5 years ago

trss commented 6 years ago

If the request contains an ! the response is:

The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.

For e.g., this happens with a DisplayableOrderComment value of "Thank you for your order!" but not with a value of "Thank you for your order." when making a CreateFulfillmentOrder API call.

Confirmed it with the GetFulfillmentOrder and GetPackageTrackingDetails API calls too. With a single ! as the order-id or tracking-id it gives the above error but with a single . it gives a MalformedInput error which is what is expected with ! too.

bent0b0x commented 6 years ago

Thanks for the report. I will take a look at this in the next few days.

trss commented 6 years ago

The more common case is single-quote. It will be very helpful if this is fixed.

This was preferred over https://www.npmjs.com/package/amazon-mws due to its light-weightedness and simplicity though the latter appears to have gained more traction.

bent0b0x commented 6 years ago

Hi @trss; unfortunately I do not actively maintain this repository anymore, and I haven't touched the code in a while so a fix may not be super easy for me to get out the door.

That said, I feel your pain and I'll try to get to this in the near future.

bent0b0x commented 6 years ago

Hi @trss, I just published a beta version of this package that has a fix.

When you have time, could you run npm i amazon-mws-node@beta in one of your projects to test this new version locally and let me know if it resolves the problem for you?

Thank you for bearing with me!

bent0b0x commented 5 years ago

Hey @trss!

If you've had time to check, does the beta release mentioned above resolve your issue?

🙏 let me know

trss commented 5 years ago

Thanks a lot for the fix. While this is important for us there are more important things going on. And I wouldn't want to use this in production without testing it thoroughly. So I'll be testing it out but not just yet. Will let you know when I do it.

bent0b0x commented 5 years ago

Sounds good to me, feel free to keep me posted whenever you get to it!

trss commented 5 years ago

Tested it out. Looks good. Will inform if any issues come up though unlikely. Thanks again.