@ 2015-09-09T12:49:40Z <?php
$host = "c3-test.wirecard.com";
$port = 443;
$path = "/secure/ssl-gateway";
$login = "56500";
$pass = "TestXAPTER";
$errno = "401";
$errstr = "auther";
$poststring = "<?xml version='1.0' encoding='UTF-8'?>
<WIRECARD_BXML xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance' xsi:noNamespaceSchemaLocation='wirecard.xsd'>
<W_REQUEST>
<W_JOB>
<JobID>job 2</JobID>
<BusinessCaseSignature>56500</BusinessCaseSignature>
<FNC_CC_TRANSACTION>
<FunctionID>WireCard Test</FunctionID>
<CC_TRANSACTION mode='demo'>
<TransactionID>2</TransactionID>
<Amount>10</Amount>
<Currency>USD</Currency>
<CountryCode>US</CountryCode>
<RECURRING_TRANSACTION>
<Type>Single</Type>
</RECURRING_TRANSACTION>
<CREDIT_CARD_DATA>
<CreditCardNumber>4200000000000000</CreditCardNumber>
<CVC2>000</CVC2>
<ExpirationYear>2016</ExpirationYear>
<ExpirationMonth>01</ExpirationMonth>
<CardHolderName>Wirecard Test</CardHolderName>
</CREDIT_CARD_DATA>
<CONTACT_DATA>
<IPAddress>67.29.138.2</IPAddress>
</CONTACT_DATA>
<CORPTRUSTCENTER_DATA>
<ADDRESS>
<Address1></Address1>
<City></City>
<ZipCode></ZipCode>
<State></State>
<Country></Country>
<Phone></Phone>
<Email>support@wirecard.com</Email>
</ADDRESS>
</CORPTRUSTCENTER_DATA>
</CC_TRANSACTION>
</FNC_CC_TRANSACTION>
</W_JOB>
</W_REQUEST>
</WIRECARD_BXML>";
$fp = fsockopen("ssl://".$host, $port, $errno, $errstr, 5);
if(!$fp){
//error; tell us
echo "Error: $errstr ($errno)\n";
}else{
//send the server request
fputs($fp, "POST $path HTTP/1.0\r\n");
fputs($fp, "Host: $host\r\n");
fputs($fp,"Content-type: text/xml\r\n");
fputs($fp, "Content-length: ".strlen($poststring)."\r\n");
fputs($fp, "Authorization:
Basic ".base64_encode($login.":".$pass."\r\n"));
fputs($fp, "Connection: close\r\n");
fputs($fp,"\r\n");
fputs($fp, $poststring . "\r\n\r\n");
// prepare for reading the response
stream_set_timeout($fp,30);
// here we save the response body - XML response from WireCard
$output = "";
// here we store the HTTP headers
$headers= "";
// temp. variable for detecting the end of HTTP headers.
$is_header = 1;
while(!feof($fp)) {
$buffer = fgets($fp, 128);
// fgets on SSL socket
if ($buffer == FALSE) {
break;
}
if (!$is_header) {
$output .= $buffer;
}
if ($buffer == "\r\n") {
$is_header = 0;
}
if ($is_header) {
$headers .= $buffer;
}
}
//close fp - we are done with it
fclose($fp);
// print the results in Web Browser - and convert all special
// characters (like <,>,...) to HTML entities
echo "<PRE>\n";
echo htmlentities($headers);
echo "\n";
echo htmlentities($output);
echo "</PRE>\n";
}
?>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for git.master , git.master_jit , rfc.property-hooks Warning: fsockopen(): Unable to connect to ssl://c3-test.wirecard.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/v17sn on line 114
Error: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (0)
This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.
Active branches Archived branches Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page
preferences:dark mode live preview
65.39 ms | 406 KiB | 5 Q