Created
July 27, 2017 04:06
-
-
Save nigelheap/04405bb3fdbf834f5ba10d44766710a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('display_errors', 1); | |
ini_set('display_startup_errors', 1); | |
error_reporting(E_ALL); | |
$ch = curl_init('https://www.howsmyssl.com/a/check'); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
$data = curl_exec($ch); | |
curl_close($ch); | |
$json = json_decode($data); | |
echo "<strong>howsmyssl check</strong> <br />"; | |
echo $json->tls_version; | |
echo "<br /><br /><br /><strong>SSL Version from curl</strong><br />"; | |
$curl_info = curl_version(); | |
echo $curl_info['ssl_version']; | |
$ch = curl_init('https://api.sandbox.ewaypayments.com/gateway/Xml/XmlPaymentRequestHandler.ashx'); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch, CURLOPT_POST, 1); | |
curl_setopt($ch, CURLOPT_POSTFIELDS, "postvar1=value1&postvar2=value2&postvar3=value3"); | |
$data = curl_exec($ch); | |
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); | |
curl_close($ch); | |
echo "<br /><br /><br /><strong>eway sandbox connection test</strong> <br />"; | |
echo "Code: " . $httpCode . "<br />"; | |
if($httpCode == 200){ | |
echo "Connected to eway sandbox<br />"; | |
} else { | |
echo "Connection to eway failed<br />"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment