У меня есть PHP код, который я пытаюсь запустить на 2 серверах.
Только на первом он работает, и я не понимаю, почему.
Я буду благодарю за помощь
Первый сервер (работает - результат отображается красным цветом)
http://77.247.180.36/~pelegisr/sites/productions/regOnline/test_payment.php
Второй сервер (не работает)
http://productions.traveltech1.com/regOnline/test_payment.php
$data = array('user' => 'HIDDEN',
'password' => 'HIDDEN',
'terminal' => 'HIDDEN',
'GoodURL' => 'https://gateway20.pelecard.biz/sandbox/landingpage',
'Currency' => '1',
'Total' => '100'
);
$jsonData = json_encode($data);
$ch = curl_init('https://gateway20.pelecard.biz/PaymentGW/init');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json; charset=UTF-8','Content-Length: ' . strlen($jsonData)) );
$result = curl_exec($ch);
$serverData = json_decode($result,true);
echo "<span style='color: red'>".$serverData['URL']."</span>";