hi php developers,
I am working on VBV authentication for a website. I am in final step but got in trouble. I believe people with ASP and PHP knowledge can help me as I don't know a word about ASP. I have code written in ASP that does the desired job:
this pice of code does the desired job and has no problem I want my PHP page to do the same job but I get no approval message as response: Here is what I have done in PHP:
If I try to print PaRes or MD I guess no values.
I hope I'll get some help here.
I am working on VBV authentication for a website. I am in final step but got in trouble. I believe people with ASP and PHP knowledge can help me as I don't know a word about ASP. I have code written in ASP that does the desired job:
Code:
Dim vbvRequest
vbvRequest = "PaRes=" & request("PaRes") & "&MD=" & request("MD")
XMLSendReqAuth(vbvRequest)
Function XMLSendReqAuth(trnValue)
set XMLstringreq = Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")
XMLstringreq.setOption(3) = ""
XMLstringreq.setTimeouts 60000, 30000, 30000, 90000
XMLstringreq.Open "POST", "[URL="https://www.beanstream.com/scripts/process_transaction_auth.asp"]https://www.sitename.com/scripts/process_tran_auth.asp[/URL]", False
XMLstringreq.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
XMLstringreq.Send (trnValue)
trnResponse = XMLstringreq.ResponseText
SendRequest = true
End Function
Code:
<?php
$faripa= $_REQUEST["PaRes"];
$faripd= $_REQUEST["MD"];
$vr=curl_init();
curl_setopt( $vr, CURLOPT_POST, 1 );
curl_setopt($vr, CURLOPT_SSL_VERIFYHOST,0);
curl_setopt($vr, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt( $vr, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt( $vr, CURLOPT_URL, "[COLOR=navy][FONT="][URL="https://www.beanstream.com/scripts/process_transaction_auth.asp"]https://www.sitename.com/scripts/process_tran_auth.asp[/URL][/FONT][/COLOR]");
curl_setopt( $vr, CURLOPT_POSTFIELDS,"PaRes=$faripa&MD=$faripd");
$txtResult = curl_exec($vr);
curl_close($vr);
echo $txtResult;
?>
I hope I'll get some help here.
Comment