-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
When constructing ShippingEasy_Authenticator(), unset($params["api_signature"]) causes $params to be empty. Consequently when constructing ShippingEasy_Signature(), the plaintext() method excludes $params.
public function plaintext()
{
$parts = array($this->getHttpMethod());
$parts[] = $this->getPath();
if (!empty($this->getParams()))
$parts[] = http_build_query($this->getParams());
if ($this->getJsonBody() != "null")
$parts[] = $this->getJsonBody();
return implode("&", $parts);
}
Result: Signatures do not match and authentication fails.
In order to achieve authentication I had to append an extra '&' to the end of $path in order to get the signature supplied by the server to match.
Metadata
Metadata
Assignees
Labels
No labels