+90 535 691 49 49
tren
Our Social Accounts

ödeme

Home » ödeme



3D

3D Ödeme Sayfasi

3D Dönen Parametreler

$value)
{
echo “

“;
}

?>

Parametre Ismi Parametre Degeri
“.$key.” “.$value.”

Güvenlik Uyarisi. Sayisal Imza Geçerli Degil

“;

// ÖDEME ISLEMI ALANLARI

$name=”XXXXXXXX”; //is yeri kullanic adi
$password=”xxxxxxxxx”; //Is yeri sifresi
$clientid=$_POST[“clientid”]; //Is yeri numarasi

$mode = “P”; //P olursa gerçek islem, T olursa test islemi yapar
$type=”Auth”; //Auth: Satış PreAuth: Ön Otorizasyon
$expires = $_POST[“Ecom_Payment_Card_ExpDate_Month”].”/”.$_POST[“Ecom_Payment_Card_ExpDate_Year”]; //Kredi Karti son kullanim tarihi mm/yy formatindan olmali
$cv2=$_POST[‘cv2’]; //Kart guvenlik kodu
$tutar=$_POST[“amount”]; // Islem tutari
$taksit=””; //Taksit sayisi Pesin satislarda bos gonderilmelidir, “0” gecerli sayilmaz.
$oid= $_POST[‘oid’]; //Siparis numarasy her islem icin farkli olmalidir ,
//bos gonderilirse sistem bir siparis numarasi üretir.

$lip=GetHostByName($REMOTE_ADDR); //Son kullanici IP adresi
$email=””; //Email

//Provizyon alinamadigi durumda taksit sayisi degistirilirse sipari numarasininda
//degistirilmesi gerekir.
$mdStatus=$_POST[‘mdStatus’]; // 3d Secure işleminin sonucu mdStatus 1,2,3,4 ise başarılı 5,6,7,8,9,0 başarısızdır
// 3d Decure işleminin sonucu başarısız ise işlemi provizyona göndermeyiniz (XML göndermeyiniz).
$xid=$_POST[‘xid’]; // 3d Secure özel alani PayerTxnId
$eci=$_POST[‘eci’]; // 3d Secure özel alani PayerSecurityLevel
$cavv=$_POST[‘cavv’]; // 3d Secure özel alani PayerAuthenticationCode
$md=$_POST[‘md’]; // Eğer 3D işlembaşarılısya provizyona kart numarası yerine md değeri gönderilir.
// Son kullanma tarihi ve cvv2 gönderilmez.

if($mdStatus ==”1″ || $mdStatus == “2” || $mdStatus == “3” || $mdStatus == “4”)
{
echo “

3D Islemi Basarili

“;

// XML request sablonu
$request= “DATA=“.
“.
{NAME}“.
{PASSWORD}“.
{CLIENTID}“.
{IP}“.
{EMAIL}“.
P“.
{OID}“.
“.
“.
“.
{TYPE}“.
{MD}“.
“.
“.
{TUTAR}“.
949“.
{TAKSIT}“.
{XID}“.
{ECI}“.
{CAVV}“.
13“.
“.
“.
“.
“.
“.
“.
“.
“.
“.
“.
“.
“.
“.
“.
“.
“.
“.
“.
“.
“.
“.
“.
“.
“;

$request=str_replace(“{NAME}”,$name,$request);

$request=str_replace(“{PASSWORD}”,$password,$request);
$request=str_replace(“{CLIENTID}”,$clientid,$request);
$request=str_replace(“{IP}”,$lip,$request);
$request=str_replace(“{OID}”,$oid,$request);
$request=str_replace(“{TYPE}”,$type,$request);
$request=str_replace(“{XID}”,$xid,$request);
$request=str_replace(“{ECI}”,$eci,$request);
$request=str_replace(“{CAVV}”,$cavv,$request);
$request=str_replace(“{MD}”,$md,$request);
$request=str_replace(“{TUTAR}”,$tutar,$request);
$request=str_replace(“{TAKSIT}”,$taksit,$request);

// Sanal pos adresine baglanti kurulmasi

$url = “https:///“; //TEST

$ch = curl_init(); // initialize curl handle

curl_setopt($ch, CURLOPT_URL,$url); // set url to post to
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,1);
curl_setopt($ch, CURLOPT_SSLVERSION, 0);

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0);

curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable
curl_setopt($ch, CURLOPT_TIMEOUT, 90); // times out after 90s
curl_setopt($ch, CURLOPT_POSTFIELDS, $request); // add POST fields

// Buraya mdStatusa göre bir kontrol koymalisiniz.
// 3d Secure işleminin sonucu mdStatus 1,2,3,4 ise başarılı 5,6,7,8,9,0 başarısızdır
// 3d Decure işleminin sonucu başarısız ise işlemi provizyona göndermeyiniz (XML göndermeyiniz).

$result = curl_exec($ch); // run the whole process
//echo htmlspecialchars($result);
echo “
“;

if (curl_errno($ch)) {
print curl_error($ch);
} else {
curl_close($ch);
}

$Response =””;
$OrderId =””;
$AuthCode =””;
$ProcReturnCode =””;
$ErrMsg =””;
$HOSTMSG =””;
$HostRefNum = “”;
$TransId=””;

$response_tag=”Response”;
$posf = strpos ( $result, (“<" . $response_tag . ">“) );
$posl = strpos ( $result, (““) ) ;
$posf = $posf+ strlen($response_tag) +2 ;
$Response = substr ( $result, $posf, $posl – $posf) ;

$response_tag=”OrderId”;
$posf = strpos ( $result, (“<" . $response_tag . ">“) );
$posl = strpos ( $result, (““) ) ;
$posf = $posf+ strlen($response_tag) +2 ;
$OrderId = substr ( $result, $posf , $posl – $posf ) ;

$response_tag=”AuthCode”;
$posf = strpos ( $result, “<" . $response_tag . ">” );
$posl = strpos ( $result, “” ) ;
$posf = $posf+ strlen($response_tag) +2 ;
$AuthCode = substr ( $result, $posf , $posl – $posf ) ;

$response_tag=”ProcReturnCode”;
$posf = strpos ( $result, “<" . $response_tag . ">” );
$posl = strpos ( $result, “” ) ;
$posf = $posf+ strlen($response_tag) +2 ;
$ProcReturnCode = substr ( $result, $posf , $posl – $posf ) ;

$response_tag=”ErrMsg”;
$posf = strpos ( $result, “<" . $response_tag . ">” );
$posl = strpos ( $result, “” ) ;
$posf = $posf+ strlen($response_tag) +2 ;
$ErrMsg = substr ( $result, $posf , $posl – $posf ) ;

$response_tag=”HostRefNum”;
$posf = strpos ( $result, “<" . $response_tag . ">” );
$posl = strpos ( $result, “” ) ;
$posf = $posf+ strlen($response_tag) +2 ;
$HostRefNum = substr ( $result, $posf , $posl – $posf ) ;

$response_tag=”TransId”;
$posf = strpos ( $result, “<" . $response_tag . ">” );
$posl = strpos ( $result, “” ) ;
$posf = $posf+ strlen($response_tag) +2 ;
$$TransId = substr ( $result, $posf , $posl – $posf ) ;

//echo $Response;
//echo $ProcReturnCode;

?>

Ödeme Sonucu

Parameter Ismi: Parameter Degeri
AuthCode
Response
HostRefNum
ProcReturnCode
TransId
ErrMsg