Jump to content

Payment Provider Postback problem


chefelr

Recommended Posts

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.

 

Waht I am missong on my code?

 

Tks for any suggestion  :confused:

Link to comment
Share on other sites

Set so it emails any output to you (sql error etc.). Also set so it emails a 'completed' message even if no other error output.

 

Test in browser again to ensure works fine.

 

Then test with Segpay postback (where you will get an email of any output).

 

If needed, simplify the script to only send a basic 'completed' email (so that the Segpay postback can be tested on its own).

 

If you can't even get a basic 'completed' email (ignoring all of your code above) then Segpay could be right.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.