The checkout button no longer seems to respond, I thought this may be down to a CURL issue - i've updated CURL on the server but i'm none the wiser.
The error log shows as below
Code: Select all
2018-06-15 8:23:22 - PHP Notice: Undefined variable: data in /var/www/vhosts/domain.com/httpdocs/catalog/model/payment/sagepay_direct_v3.php on line 150
Code: Select all
public function sendCurl($url, $payment_data, $i = null) {
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_PORT, 443);
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($curl, CURLOPT_FORBID_REUSE, 1);
curl_setopt($curl, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($payment_data));
$response = curl_exec($curl);
curl_close($curl);
$response_info = explode(chr(10), $response);
foreach ($response_info as $string) {
if (strpos($string, '=') && isset($i)) {
$parts = explode('=', $string, 2);
$data['RepeatResponseData_' . $i][trim($parts[0])] = trim($parts[1]);
} elseif (strpos($string, '=')) {
$parts = explode('=', $string, 2);
$data[trim($parts[0])] = trim($parts[1]);
}
}
return $data;
}
I've not made any changes to server settings etc for quite some time so i'm not sure what's changed.