Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions Trustly/Api/unsigned.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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<string, mixed> $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);
Expand Down