From d0da1d12e99475cf4c344c239592003b6493fb2b Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Wed, 13 Mar 2024 15:07:18 +0100 Subject: [PATCH] Correct number of given argument --- Trustly/Api/api.php | 2 +- Trustly/Api/signed.php | 2 +- Trustly/Api/unsigned.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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); }