Skip to content
This repository was archived by the owner on Oct 10, 2019. It is now read-only.
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
13 changes: 12 additions & 1 deletion src/Klarna.php
Original file line number Diff line number Diff line change
Expand Up @@ -3604,13 +3604,24 @@ protected function xmlrpc_call($method, $array)
}
}

//Send the message.
$selectDateTime = microtime(true);
if (self::$xmlrpcDebug) {
$this->xmlrpc->setDebug(2);
}
//Save previous XML RPC client encoding settings.
$tmp_xmlrpc_defencoding = $GLOBALS['xmlrpc_defencoding'];
$tmp_xmlrpc_internalencoding = $GLOBALS['xmlrpc_internalencoding'];
//Set XML RPC client encoding settings.
$GLOBALS['xmlrpc_defencoding'] = 'ISO-8859-1';
$GLOBALS['xmlrpc_internalencoding'] = 'UTF-8';

//Send the message.
$xmlrpcresp = $this->xmlrpc->send($msg);

//Restore previous XML RPC client encoding settings.
$GLOBALS['xmlrpc_defencoding'] = $tmp_xmlrpc_defencoding;
$GLOBALS['xmlrpc_internalencoding'] = $tmp_xmlrpc_internalencoding;

//Calculate time and selectTime.
$timeend = microtime(true);
$time = (int) (($selectDateTime - $timestart) * 1000);
Expand Down