I am guessing that this paypal.php never worked.. I don't see how it could. If anyone wants to get it to work, we have fixed the file. The receiver and sender emails were mixed up, which was causing the file not to send the correct email address to OG, hence the file never worked. <?php // Settings $paypal_key = "yourkeyhere"; // *** CHANGE THIS!!! *** This should match what you have set under Maintenance & Preferences -> General Preferences -> Billing $paypal_email = "your-email@here.com"; // This should be your PayPal email address (used for verification purposes) $email_success = TRUE; // Do you want to email the above address when it was inserted into Optigold successfully? $email_failure = TRUE; // Do you want to email the above address when the transaction failed to be inserted into Optigold? $optigold_url = "http://your-web-server-IP-here:591"; // Your machine running FileMaker Unlimited or WSC (no trailing slash needed). // read the post from PayPal system and add 'cmd' $req = 'cmd=_notify-validate'; foreach ($_POST as $key => $value) { $value = urlencode(stripslashes($value)); $req .= "&$key=$value"; } // post back to PayPal system to validate $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; $fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30); // assign posted variables to local variables $item_name = $_POST['item_name']; $item_number = $_POST['item_number']; $payment_status = $_POST['payment_status']; $payment_amount = $_POST['mc_gross']; $payment_currency = $_POST['mc_currency']; $txn_id = $_POST['txn_id']; $receiver_email = $_POST['receiver_email']; $payer_email = $_POST['payer_email']; if (!$fp) { // HTTP ERROR } else { fputs ($fp, $header . $req); while (!feof($fp) && $fp) { $res = fgets ($fp, 1024); } if (strcmp ($res, "VERIFIED") == 0) { // check the payment_status is Completed // check that txn_id has not been previously processed // check that receiver_email is your Primary PayPal email // check that payment_amount/payment_currency are correct // process payment $fp = fopen ($optigold_url . "/FMPro?-db=MainMenu.fp5&-lay=Web&-max=1&-script=PayPal&-format=paypal.txt&Miscellaneous+1=" . urlencode ($paypal_key) . "&Miscellaneous+2=" . urlencode ($payer_email) . "&Identification=" . urlencode ($payment_amount) . "&Miscellaneous+3=" . urlencode ($txn_id) . "&-Find", "r"); while (!feof ($fp) && $fp) { $result .= fgets ($fp, 1024); } fclose($handle); if ($result == "success" && $email_success) { mail($paypal_email, "PayPal Transaction Complete", "A PayPal payment was successfully entered into Optigold.\n\nFrom: " . $payer_email . "\nAmount: " . $payment_amount . "\nTransaction ID: " . $txn_id); } elseif ($email_failure) { mail($paypal_email, "PayPal Transaction Failed", "A PayPal payment failed to be inserted into Optigold.\n\nFrom: " . $payer_email . "\nAmount: " . $payment_amount . "\nTransaction ID: " . $txn_id . "\n\n\n" . $result); } } elseif (strcmp ($res, "INVALID") == 0) { // log for manual investigation mail($paypal_email, "PayPal Transaction Failed", "A request to insert a PayPal transaction into Optigold ISP failed because it could not be validated by PayPal.\n\nRequest was from: " . $_SERVER['REMOTE_ADDR']); } fclose ($fp); } ?> Code (markup): We also fixed the grammar errors in some of the error responses as well...
No. The script is for accepting paypal payments using Optigold. Well, someone else wrote it, but it did not work.. Not sure if they just half assed it or what.. We just fixed it so it worked was all. For accepting paypal payments using Optigold.
i got one for www.sanitywars.com , when someone donates to the paypal specified it registers the username that payed , the date , and the amount
I'm just wondering, how come there are so many bugs in this product when its owned and controlled by such a big software programmer?