From 3032748d24536e60c1f047dce2bae72cb27bab2d Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Wed, 13 Mar 2024 17:22:10 +0100 Subject: [PATCH] Make Trustly_Api_Unsigned::call() compatible with Trustly_Api::call() --- Trustly/Api/unsigned.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Trustly/Api/unsigned.php b/Trustly/Api/unsigned.php index c62d6b9..eb3f924 100644 --- a/Trustly/Api/unsigned.php +++ b/Trustly/Api/unsigned.php @@ -208,7 +208,8 @@ public function getViewStable($viewname, $dateorder=NULL, $datestamp=NULL, $filterkeys=NULL, $limit=100, $offset=0, $params=NULL, $sortby=NULL, $sortorder=NULL) { - return $this->call('GetViewStable', array( + $request = new Trustly_Data_JSONRPCRequest('GetViewStable'); + return $this->call($request, array( 'DateOrder' => $dateorder, 'Datestamp' => $datestamp, 'FilterKeys' => $filterkeys, @@ -229,15 +230,13 @@ public function getViewStable($viewname, $dateorder=NULL, $datestamp=NULL, * the outgoing call. Take care when supplying the arguments for the call * so they match the function prototype properly. * - * @param string $method API method to call + * @param Trustly_Data_JSONRPCRequest $request Outgoing request * - * @param Trustly_Data_JSONRPCRequest $params Outgoing call params + * @param ?array $params Outgoing call params * * @return Trustly_Data_JSONRPCResponse Response from the API. */ - public function call($method, $params=NULL) { - $request = new Trustly_Data_JSONRPCRequest($method); - + public function call($request, $params=NULL) { if(isset($params)) { foreach($params as $key => $value) { $request->setParam($key, $value);