Fix callback authentication#2
Conversation
|
You are not right. |
|
@alextretij This code is not for getting the orders, it's for verifying shipping easy's callback signatures. If this is no longer correct, then shipping easy has changed their signature generation code. This implementation came from conversations with shipping easy's support. |
|
No, this ShippingEasy SDK uses this Signature class for all requests (get orders, send order and get answer from shippingeasy site) |
|
Look... I'm not going to argue with you dude. You are welcome to use the Nuget package without this PR in it. If the webhook authentication callbacks work without this PR, then shipping easy has changed their webhook code to work around this bug, and we can close the PR. I will say again that this code comes from conversations with shipping easy's developers. They asked me to submit this PR, so I did. |
Fixes a bug where webhook callbacks that contained no querystring parameters other than api_signature would fail. This is because the request is signed without stripping out this extra parameter. If a request contains no querystring parameters, it is signed like this:
POST&/my/url&&{"shipment":
Note the two ampersands(&). Even though there are no querystring parameters, this should still be the string that is signed.