Go Back   WHM/cPanel Support Platform » Türkce » Site, Sunucu Sorunlariniz ve cözümleri » Site, Server Genel » WHMCS Destek
 

Reply
 
Thread Tools Display Modes
  #1  
Old 7. May 2008
ShiftTasarim ShiftTasarim is offline
P4
 
Join Date: Dec 2007
Location: Fethiye
Posts: 162
Rep Power: 10
ShiftTasarim is on a distinguished road
Send a message via MSN to ShiftTasarim Send a message via Skype™ to ShiftTasarim
Garanti Sanal Pos Kodlari

Garanti Sanal Pos Kodlari asagidadir. Kodlari kopyalayip garantisanalpos.php olarak kaydederek WHMCS nin kurulu oldugu dizinde modules/gateway klasörü icine ftp ile gönderiniz. Daha sonra ise whmcs nin admin bölümüne girerek ödeme seklini ekleyip, Magaza No, api id ve sifrenizi yazip kullanmaya baslayabilirsiniz. Unutmayin YTL icin lütfen 840 kullaniniz, bankaniz dolar kuru icin onay vermez.

PHP Code:
 <?php 

# GARANTIBANK Credit Card Payment Gateway Module 

$GATEWAYMODULE["garantisanalposname"]="garantisanalpos"
$GATEWAYMODULE["garantisanalposvisiblename"]="Garanti Sanal Pos"
$GATEWAYMODULE["garantisanalpostype"]="CC"

function 
garantisanalpos_activate() { 
    
defineGatewayField("garantisanalpos","text","merchantid","","Merchant ID","20",""); 
    
defineGatewayField("garantisanalpos","text","merchantpw","","Merchant Password","20",""); 
    
defineGatewayField("garantisanalpos","text","merchantnumber","","Merchant Number","20",""); 
    
defineGatewayField("garantisanalpos","text","isokod","","Isokod 949 YTL - 840 USD","10",""); 
    
defineGatewayField("garantisanalpos","yesno","testmode","","Test Mode","",""); 


function 
garantisanalpos_link($params) { 
$code=
<form method="post" action="'
.$params["systemurl"].'/creditcard.php" name="paymentfrm"> 
<input type="hidden" name="invoiceid" value="'
.$params['invoiceid'].'"> 
<input type="submit" value="'
.$params["langpaynow"].'"> 
</form> 
'

return 
$code


function 
garantisanalpos_capture($params) { 
    if (
$params["testmode"]=="on") { 
        
$gateway_url "https://cc5test.est.com.tr/servlet/cc5ApiServer"
    } else { 
        
$gateway_url "https://ccpos.garanti.com.tr/servlet/cc5ApiServer"
    } 
    
$name=$params['merchantid']; //GarantiSanalPos Merchant ID 
    
$password=$params['merchantpw']; //GarantiSanalPos Merchant Password 
    
$clientid=$params['merchantnumber']; //GarantiSanalPos Merchant Number 
    
$isokod=$params['isokod']; // GarantiSanalPos isokod 949 YTL 840 USD 
    
$ip=GetHostByName($REMOTE_ADDR); //Client IP address 
    
$type="Auth"//Auth - PreAuth 
    
$email=$params["clientdetails"]["email"]; //Client Email 
    
$oid=$params['invoiceid']; //Order ID ,     
    
$ccno=$params['cardnum']; //Client Credit Card Number 
    
$ccay=substr($params['cardexp'],0,2); //Credit Card Exp. Month 
    
$ccyil=substr($params['cardexp'],2,2); //Credit Card Exp. Year 
    
$tutar=$params['amount']; //Total Amount Exp. 11.99 
    
$cv2=$params['cccvv']; //Credit Card CVV2 number  

     
    //Client Details 
    
$fname=$params["clientdetails"]["firstname"]; 
    
$lname=$params["clientdetails"]["lastname"]; 
    
$firma=$params["clientdetails"]["companyname"]; 
    
$adres1=$params["clientdetails"]["address1"]; 
    
$adres2=$params["clientdetails"]["address2"]; 
    
$ilce=$params["clientdetails"]["city"]; 
    
$sehir=$params["clientdetails"]["state"]; 
    
$postkod=$params["clientdetails"]["postcode"]; 
    
$ulke=$params["clientdetails"]["country"]; 
    
$telno=$params["clientdetails"]["phonenumber"]; 
     

// XML request template  
$request"DATA=<?xml version=\"1.0\" encoding=\"ISO-8859-9\"?> 
<CC5Request> 
<Name>{NAME}</Name> 
<Password>{PASSWORD}</Password> 
<ClientId>{CLIENTID}</ClientId> 
<Currency>{ISOKOD}</Currency> 
<Mode>P</Mode> 
<IPAddress>{IP}</IPAddress> 
<Email>{EMAIL}</Email> 
<OrderId>{OID}</OrderId> 
<GroupId></GroupId> 
<TransId></TransId> 
<UserId></UserId> 
<Type>{TYPE}</Type> 
<Number>{CCNO}</Number> 
<Expires>{CCAY}{CCYIL}</Expires> 
<Cvv2Val>{CV2}</Cvv2Val> 
<Total>{TUTAR}</Total> 
<BillTo> 
    <Name>{FNAME} {LNAME}</Name> 
    <Street1>{ADRES1}</Street1> 
    <Street2>{ADRES2}</Street2> 
    <Street3>{IP}</Street3> 
    <City>{ILCE}</City> 
    <StateProv>{SEHIR}</StateProv> 
    <PostalCode>{POSTKOD}</PostalCode> 
    <Country>{ULKE}</Country> 
    <Company>{FIRMA}</Company> 
    <TelVoice>{TELNO}</TelVoice> 
</BillTo> 
<ShipTo> 
    <Name>{FNAME} {LNAME}</Name> 
    <Street1>{ADRES1}</Street1> 
    <Street2>{ADRES2}</Street2> 
    <Street3></Street3> 
    <City>{ILCE}</City> 
    <StateProv>{SEHIR}</StateProv> 
    <PostalCode>{POSTKOD}</PostalCode> 
    <Country>{ULKE}</Country> 
</ShipTo> 
<Extra></Extra> 
</CC5Request> 
"


//parameters writing XML  

$request=str_replace("{NAME}",$name,$request); 
$request=str_replace("{PASSWORD}",$password,$request); 
$request=str_replace("{CLIENTID}",$clientid,$request); 
$request=str_replace("{ISOKOD}",$isokod,$request); 
$request=str_replace("{TYPE}",$type,$request); 
$request=str_replace("{IP}",$ip,$request); 
$request=str_replace("{OID}",$oid,$request); 
$request=str_replace("{EMAIL}",$email,$request); 
$request=str_replace("{CCNO}",$ccno,$request); 
$request=str_replace("{CCAY}",$ccay,$request); 
$request=str_replace("{CCYIL}",$ccyil,$request); 
$request=str_replace("{CV2}",$cv2,$request); 
$request=str_replace("{TUTAR}",$tutar,$request); 

    
//parameters writing XML BILLTO and SHIPTO 
$request=str_replace("{FNAME}",$fname,$request); 
$request=str_replace("{LNAME}",$lname,$request); 
$request=str_replace("{ADRES1}",$adres1,$request); 
$request=str_replace("{ADRES2}",$adres2,$request); 
$request=str_replace("{ILCE}",$ilce,$request); 
$request=str_replace("{SEHIR}",$sehir,$request); 
$request=str_replace("{POSTKOD}",$postkod,$request); 
$request=str_replace("{ULKE}",$ulke,$request); 
$request=str_replace("{TELNO}",$telno,$request); 
$request=str_replace("{FIRMA}",$firma,$request); 

$ch curl_init(); // initialize curl handle 
curl_setopt($chCURLOPT_URL,$gateway_url); // set url to post to 
curl_setopt($chCURLOPT_SSL_VERIFYHOST,1); 
curl_setopt($chCURLOPT_SSL_VERIFYPEER,0); 
curl_setopt($chCURLOPT_RETURNTRANSFER,1); // return into a variable 
curl_setopt($chCURLOPT_TIMEOUT90); // times out after 90s 
curl_setopt($chCURLOPT_POSTFIELDS$request); // add POST fields 
$result curl_exec($ch); // run the whole process 

if (curl_errno($ch)) { 
    
$error curl_error($ch); 
    
logTransaction("Garanti Sanal Pos","Error => $error","Error"); 
    
sendMessage("Credit Card Payment Failed",$params['invoiceid']); 
    
$result="error"
    return 
$result
} else { 
    
curl_close($ch); 
    
$Response =""
    
$OrderId =""
    
$AuthCode =""
    
$ProcReturnCode =""
    
$ErrMsg =""
    
$HOSTMSG =""
    
$response_tag="Response"
    
$posf strpos $result, ("<" $response_tag ">") ); 
    
$posl strpos $result, ("</" $response_tag ">") ) ; 
    
$posf $posfstrlen($response_tag) +
    
$Response substr $result$posf$posl $posf) ; 
    
$response_tag="OrderId"
    
$posf strpos $result, ("<" $response_tag ">") ); 
    
$posl strpos $result, ("</" $response_tag ">") ) ; 
    
$posf $posfstrlen($response_tag) +
    
$OrderId substr $result$posf $posl $posf ) ; 
    
$response_tag="AuthCode"
    
$posf strpos $result"<" $response_tag ">" ); 
    
$posl strpos $result"</" $response_tag ">" ) ; 
    
$posf $posfstrlen($response_tag) +
    
$AuthCode substr $result$posf $posl $posf ) ; 
    
$response_tag="ProcReturnCode"
    
$posf strpos $result"<" $response_tag ">" ); 
    
$posl strpos $result"</" $response_tag ">" ) ; 
    
$posf $posfstrlen($response_tag) +
    
$ProcReturnCode substr $result$posf $posl $posf ) ; 
    
$response_tag="ErrMsg"
    
$posf strpos $result"<" $response_tag ">" ); 
    
$posl strpos $result"</" $response_tag ">" ) ; 
    
$posf $posfstrlen($response_tag) +
    
$ErrMsg substr $result$posf $posl $posf ) ; 
    
$debugdata "Action => Auth\nClient => ".$params['clientdetails']['firstname']." ".$params['clientdetails']['lastname']."\nResponse => $Response\nOrderId => $OrderId\nAuthCode => $AuthCode\nProcReturnCode => $ProcReturnCode\nErrMsg => $ErrMsg"

    if ( 
$Response === "Approved") { 
        
addInvoicePayment($params['invoiceid'],$transid,"","","garantisanalpos","on"); 
        
logTransaction("Garanti Sanal Pos",$debugdata,"Successful"); 
        
sendMessage("Credit Card Payment Confirmation",$params['invoiceid']); 
        
$result="success"
        return 
$result
    } else { 
        
logTransaction("Garanti Sanal Pos",$debugdata,"Declined"); 
        
sendMessage("Credit Card Payment Failed",$params['invoiceid']); 
        
$result="declined"
        return 
$result
        } 
     
    } 



?>
[SIZE=1]Not: kodlar alintidir.[/SIZE]
__________________
Shift Tasarim - WebTasarim ve Internet Hizmetleri
www.shift.com.tr - www.shifttasarim.com
+90 252 613 28 24 - Msn / Mail bilgi@shift.com.tr
Reply With Quote
  #2  
Old 9. May 2008
HoST13's Avatar
HoST13 HoST13 is offline
Athlon Dual Core
 
Join Date: Jan 2008
Location: Trabzon
Age: 28
Posts: 338
Rep Power: 10
HoST13 will become famous soon enough
Send a message via MSN to HoST13
Tesekkurler.
__________________
WHMCS Destek | MyBB Destek
Reply With Quote
  #3  
Old 11. July 2008
ferizli ferizli is offline
Sempron
 
Join Date: Jul 2008
Posts: 13
Rep Power: 0
ferizli is on a distinguished road
peki bu bankadan sanal pos almadan ise yararmi sade hesap varsa him ?
Reply With Quote
  #4  
Old 13. July 2008
ShiftTasarim ShiftTasarim is offline
P4
 
Join Date: Dec 2007
Location: Fethiye
Posts: 162
Rep Power: 10
ShiftTasarim is on a distinguished road
Send a message via MSN to ShiftTasarim Send a message via Skype™ to ShiftTasarim
Quote:
Originally Posted by ferizli View Post
peki bu bankadan sanal pos almadan ise yararmi sade hesap varsa him ?

Hayir bankadan sanal pos hizmetini aldiktan sonra icerikte birkac degisiklik yapip, kullanabilirsiniz ancak.
__________________
Shift Tasarim - WebTasarim ve Internet Hizmetleri
www.shift.com.tr - www.shifttasarim.com
+90 252 613 28 24 - Msn / Mail bilgi@shift.com.tr
Reply With Quote
  #5  
Old 6. October 2009
argeci argeci is offline
Celeron
 
Join Date: Nov 2008
Posts: 57
Rep Power: 10
argeci is on a distinguished road
garanti bankasi taksitlendirme nasil yapabiliriz?
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Godaddy godady godedi indirim kuponu kodlari CaLViN WHM cPanel 8 31. March 2008 14:43
Güvenlik kodlari cikmiyor ImpLosioN WHM cPanel 12 25. March 2008 20:33
HTTP Yanit Kodlari Sayfalarini Düzenlemek umut58tr WHM cPanel 2 23. February 2008 18:24
Apf Yönetimi icin gerekli SSH Kodlari Tahsin ALTAY WHM cPanel 3 1. December 2007 00:12
Sanal Pos Kurulum Free_EyeS WHM cPanel 11 13. November 2007 12:01


Navigasyon
Menü