PHP - Help Me With Postback.php
Hey can someone help me with Postback.php?
I pay 10$ to paypal with if someone help me Please mail me if u are interested. Similar TutorialsHello! 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 I am trying to retrieve certain keys of a post array. I am sending a payment form with a dynamic number of product id's. I will never know how many product id's will be sent for each order. When the post array returns the values to my script it returns them as: Code: [Select] $_POST['product_id_1'], $_POST['product_id_2'], etc. How would I be able to extract all post array keys that start with "product_id_? Here is what I was thinking earlier, but it doesn't work. Code: [Select] $i = 1; foreach ($_POST['product_id_' . $i] as $product) { $productId = $product['product_id_' . $i]; $queryInsert = mysql_query("INSERT INTO video_purchase (video_purchase_purchase_id, video_purchase_video_id) VALUES ($purchaseId, $productId)", $connect) or die(mysql_error()); $i++; } |