IPN page with following code produces error 301 or 302 like this 02/16/2024 10:04 AM] - FAIL: IPN Validation Failed.IPN POST Vars from Paypal:mc_gross=1.00, protection_eligibility=Eligible, address_status=confirmed, payer_id=3JW778WTCRMQJ, address_street=New Forest Road, payment_date=08:04:01 Feb 16, 2024 PST, payment_status=Completed, charset=windows-1252, address_zip=30582, first_name=Jim, mc_fee=0.52, address_country_code=US, address_name=jj, notify_version=3.9, custom=, payer_status=verified, business=name@gmail.com, address_country=United States, address_city=Young Harris, quantity=1, verify_sign=AnUKh3Y83axkW7EKdCObcSoPPtWcAkQiuRQSI7X3OytYGQZAawP3v41H, payer_email=name@gmail.com, txn_id=00V709787S381571V, payment_type=instant, payer_business_name=Jb last_name=name, address_state=GA, receiver_email=name@gmail.com, payment_fee=0.52, shipping_discount=0.00, insurance_amount=0.00, receiver_id=YKEYPFN3L9B94, txn_type=web_accept, item_name=Ryan Debut CD, discount=0.00, mc_currency=USD, item_number=Debut CD, residence_country=US, shipping_method=Default, transaction_subject=, payment_gross=1.00, shipping=0.50, ipn_track_id=f293126421309,IPN Response from Paypal Server:HTTP/1.1 302 Moved TemporarilyContent-Type: text/htmlContent-Length: 161Connection: closeLocation: https://ipnpb.paypal.com/cgi-bin/webscr
<?phpdate_default_timezone_set('America/Chicago');?><?php require_once('Connections/connsqli.php'); ?><?php require_once('webassist/mysqli/queryobj.php'); ?><?phprequire "paypal_integration_class/paypal.class.php";require "config.php";$p = new paypal_class;$p->paypal_url = $payPalURL;if ($p->validate_ipn()) { if($p->ipn_data["payment_status"]=="Completed") { $amount = $p->ipn_data["mc_gross"] - $p->ipn_data["mc_fee"]; ?><?phpif (true) { $InsertQuery = new WA_MySQLi_Query($connsqli); $InsertQuery->Action = "insert"; $InsertQuery->Table = "paypal_transactions"; $InsertQuery->bindColumn("transaction_ID", "i", "txn_id", "WA_DEFAULT"); $InsertQuery->bindColumn("first_name", "s", "first_name", "WA_DEFAULT"); $InsertQuery->bindColumn("last_name", "s", "last_name", "WA_DEFAULT"); $InsertQuery->bindColumn("payer_email", "s", "payer_email", "WA_DEFAULT"); $InsertQuery->bindColumn("address_street", "s", "address_street", "WA_DEFAULT"); $InsertQuery->bindColumn("address_city", "s", "address_city", "WA_DEFAULT"); $InsertQuery->bindColumn("address_state", "s", "address_state", "WA_DEFAULT"); $InsertQuery->bindColumn("address_zip", "s", "address_zip", "WA_DEFAULT"); $InsertQuery->bindColumn("item_name", "s", "item_name", "WA_DEFAULT"); $InsertQuery->bindColumn("quantity", "s", "quantity", "WA_DEFAULT"); $InsertQuery->bindColumn("mc_gross", "s", "mc_gross", "WA_DEFAULT"); $InsertQuery->bindColumn("shipping", "s", "shipping", "WA_DEFAULT"); $InsertQuery->bindColumn("mc_fee", "s", "mc_fee", "WA_DEFAULT"); $InsertQuery->saveInSession(""); $InsertQuery->execute(); $InsertGoTo = ""; if (function_exists("rel2abs")) $InsertGoTo = $InsertGoTo?rel2abs($InsertGoTo,dirname(__FILE__)):""; $InsertQuery->redirect($InsertGoTo);}?><?php }}?> `