diff --git a/Trustly/Api/api.php b/Trustly/Api/api.php index c9fee7d..6166b1f 100644 --- a/Trustly/Api/api.php +++ b/Trustly/Api/api.php @@ -89,7 +89,7 @@ abstract class Trustly_Api { public function __construct($host='trustly.com', $port=443, $is_https=TRUE) { $this->api_is_https = $is_https; - if($this->loadTrustlyPublicKey($host, $port, $is_https) === FALSE) { + if($this->loadTrustlyPublicKey($host, $port) === FALSE) { $error = openssl_error_string(); throw new InvalidArgumentException("Cannot load Trustly public key file for host $host".(isset($error)?", error $error":'')); } diff --git a/Trustly/Api/signed.php b/Trustly/Api/signed.php index 69d0b5b..2236895 100644 --- a/Trustly/Api/signed.php +++ b/Trustly/Api/signed.php @@ -194,7 +194,7 @@ protected function insertCredentials($request) { * @return Trustly_Data_JSONRPCSignedResponse */ protected function handleResponse($request, $body, $response_code) { - $response = new Trustly_Data_JSONRPCSignedResponse($body, $response_code); + $response = new Trustly_Data_JSONRPCSignedResponse($body); if($this->verifyTrustlySignedResponse($response) !== TRUE) { throw new Trustly_SignatureException('Incomming message signature is not valid', $response); diff --git a/Trustly/Api/unsigned.php b/Trustly/Api/unsigned.php index c62d6b9..6e471cb 100644 --- a/Trustly/Api/unsigned.php +++ b/Trustly/Api/unsigned.php @@ -113,7 +113,7 @@ protected function urlPath($request=NULL) { */ protected function handleResponse($request, $body, $response_code) { /* No signature here, just build the response object */ - return new Trustly_Data_JSONRPCResponse($body, $response_code); + return new Trustly_Data_JSONRPCResponse($body); }