...

View Full Version : Payment Gateway Postback problem



chefelr
11-16-2010, 12:36 PM
Hello!
My enviroment: W2003 + MSSQL + PHP5 + IIS6.
Payment Gateway: Segpay.com

sent as .../payment/postback.php?action=Auth&purchaseid=25258400&tranid=30742324&email=techsean26%40segpay.com&TESTTRANS=1

My postback test page is simple, coded for minimize test errors,as:
if(isset($_GET["email"]))
{
if($_GET['email']==""){
$emailcust="'A'";
}else{
$emailcust = $_GET['email'];
}
}else{
$emailcust="nothing";
}
if(isset($_GET["purchaseid"]))
{
if($_GET['purchaseid']==""){
$IDpurchaseCust="'B'";
}else{
$IDpurchaseCust = $_GET['purchaseid'];
}
}else{
$IDpurchaseCust="nothing";

}


mssql_connect("myIP xxx.xxx.xxx.xxx", "myuser", "mypassword") or die("Server connection problems");
mssql_select_db("mydatabase") or die("Db selection problem");

$grava = mssql_query("INSERT INTO Transadas (email, purchaseID) VALUES('$emailcust','$IDpurchaseCust')");

Problem:

1) If I apply ."../payment/postback.php?action=Auth&purchaseid=25258400&tranid=30742324&email=techsean26%40segpay.com&TESTTRANS=1"
on a browser like Internet Explorer, everything runs well and data inserted properly.

2) When Segpay postback, the url arrived as "."../payment/postback.php" effect. Segpay support claim that they really sent the full url exactly as above, and suggest that my server cannot receive a post from another server.

Am I missing some server/ IIS6 config detail ?

Tks for any suggestion !

mlseim
11-16-2010, 01:16 PM
Is it possible that they actually used POST?

So try $_POST with your variables, instead of $_GET



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum