Skip to content

Commit

Permalink
Added Opayo SendCurl fix
Browse files Browse the repository at this point in the history
  • Loading branch information
condor2 committed Jan 10, 2024
1 parent 7411b87 commit f3f67cf
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions upload/admin/model/extension/payment/opayo.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,14 @@ public function sendCurl($url, $payment_data) {
$response_info = explode(chr(10), $response);

foreach ($response_info as $i => $string) {
if (strpos($string, '=') && isset($i)) {
$parts = explode('=', $string, 2);
if (strpos($string, '=') === false) {
continue;
}
$parts = explode('=', $string, 2);

if (count($response_info) > 1) {
$data['RepeatResponseData_' . $i][trim($parts[0])] = trim($parts[1]);
} elseif (strpos($string, '=')) {
$parts = explode('=', $string, 2);
} else {
$data[trim($parts[0])] = trim($parts[1]);
}
}
Expand All @@ -279,7 +282,7 @@ public function log($title, $data) {
if ($setting['general']['debug']) {
$log = new Log('opayo.log');

$log->write($title . ': ' . print_r($data, 1));
$log->write($title . ': ' . print_r($data, true));
}
}
}

0 comments on commit f3f67cf

Please sign in to comment.