garrisonian14 Posted October 30, 2011 Share Posted October 30, 2011 Hi Friends, I am not sure i am looking for help here in right category or not. I am integrating paypal with IPN, (i have done this on many websites and never had this issue before.) I am testing it on sandbox account. All the data i am receiving back from paypal is fine. But always IPN verifications fails. I have used same class on many projects but never got this issue, please guide me, what can be the reason for this issue. Need help urgently, Thanks This is what i am getting in log file [10/30/2011 12:15 PM] - FAIL: IPN Validation Failed. IPN POST Vars from Paypal: mc_gross=525.00, protection_eligibility=Eligible, address_status=confirmed, payer_id=QLJGBWYEGPFWW, tax=0.00, address_street=1 Main St, payment_date=11:15:27 Oct 30, 2011 PDT, payment_status=Completed, charset=windows-1252, address_zip=95131, first_name=Test, mc_fee=15.53, address_country_code=US, address_name=Test User, notify_version=3.4, custom=, payer_status=verified, business=sharaf_1195546587_biz@hotmail.com, address_country=United States, address_city=San Jose, quantity=1, verify_sign=AiPC9BjkCyDFQXbSkoZcgqH3hpacAlUS.f.l0d1.lPU2NAC3pqJbClgv, payer_email=sharaf_1239776872_per@hotmail.com, txn_id=2VC808708R401452A, payment_type=instant, last_name=User, address_state=CA, receiver_email=sharaf_1195546587_biz@hotmail.com, payment_fee=15.53, receiver_id=KN2K54ELKVMV6, txn_type=web_accept, item_name=SLACKER MONK GRAPHICS - Shoes Design, mc_currency=USD, item_number=19%##%1, residence_country=US, test_ipn=1, handling_amount=0.00, transaction_subject=SLACKER MONK GRAPHICS - Shoes Design, payment_gross=525.00, shipping=0.00, ipn_track_id=zLpG8h32fEiFoCdtCglq.w, IPN Response from Paypal Server: HTTP/1.0 302 Found Location: https://www.sandbox.paypal.com Server: BigIP Connection: close Content-Length: 0 Quote Link to comment https://forums.phpfreaks.com/topic/250118-problem-with-paypal-ipn-verifcation/ Share on other sites More sharing options...
jcbones Posted October 30, 2011 Share Posted October 30, 2011 payment_status=Completed Paypal will never process a payment where the status is complete. This is because it is an old process. Lets look at web_accept it's the most common used and easiest to work with... web_accept performs 5 data checks before it processes anything. These checks are the minimum recommended by PayPal that should be performed in your as follows: 1. Is status = Completed If its a new transaction then the status should not be Complete, if 'payment_status' => 'Completed', then its not new and we've already processed this, so the script will return false, trigger a fail message and NOT process. 2. We have not already processed the subcribe or unsubscribe for this subscr_id When 'payment_status' => '', then we'll do another check to really make sure we haven't processed this transaction before. If we have then the value returned by 'txn_id' will be found in the database table #_ajp_orders_subscription_payments and the script will return false, trigger a fail message and NOT process. 3. The reciever e-mail account is ours. This checks that the Admin Email address recorded in PaymentsPlus > General Settings > Mosets Tree > PayPal Admin Email matches the email returned by 'receiver_email' if it doesn't then the script will return a fail message for this item but still process. 4. That payment amount is correct A clever script kiddie can manipulate the values in a payment button and try to get the item for less that its real value, so this will check the value being returned by 'mc_gross' and compare it with the value stored in the database, if it doesn't match then the script will return a fail message for this item showing both the stored and returned value but still process. If there's a discrepancy here then you need to discuss it with your user and take appropriate action, one of which could be reporting the violation to PayPal and suspending the listing. 5. That the payment currency is correct Currency, is a bit fickle to get right, PayPal returns the currency from its own records in 'mc_currency', so this means that you must have this configured in your PayPal account at PayPal and then ensure that the currency matches your PayPal Account setting to that found in PaymentsPlus > Payment Gateway Settings > Currency code (under the PayPal Settings Configuration heading) if it dosen't match then the script will return a fail message for this item but still process. Quote Link to comment https://forums.phpfreaks.com/topic/250118-problem-with-paypal-ipn-verifcation/#findComment-1283494 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.