Active
Project:
e-Commerce
Version:
5.x-3.4
Component:
paypal
Priority:
Critical
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Sep 2008 at 01:54 UTC
Updated:
3 Feb 2009 at 10:57 UTC
All payments through paypal are being left as payment pending while authorize.net orders are working correctly.
Comments
Comment #1
afkaser commentedAny help on this subject?
Comment #2
afkaser commentedComment #3
woodymood commentedSorry for my english...
I had also some problems with paypal / ipn.
I'm using drupal 5.3 and ecommerce 5.x-3.5
3 points are important: IPN URL + activate IPN on paypal + patch paypal.module
First, I found that I forgot to tell paypal which is my ipn url callback, that could be done :
a) in your drupal's admin /admin/ecsettings/paypal, see PayPal IPN "request back" validation URL : and enter something like http://www.mywebsite.com/paypal/ipn
b) or directly inside your paypal account, search in IPN in your preferences, and set the IPN URL like above
ANYWAY, you must activate IPN in your paypal account, on the same page (IPN preferences)
And, I found also a bug in the paypal.module in function paypal_ipn :
$ipnrb = parse_url(variable_get('paypal_ipnrb_url', 'http://www.paypal.com/cgi-bin/webscr'));
the problem is that the variable paypal_ipnrb_url may be http://www.mywebsite.com/paypal/ipn if you choosed the a) method ... and then the function will LOOP again and again, and never post the request to paypal
I replaced this line with : $ipnrb = parse_url('https://www.paypal.com/cgi-bin/webscr');
Two small bugs again :
1- when sending ec_paypal_debug email, the last parameter should be an array
2- this line :
$is_new = (db_result(db_query("SELECT COUNT(txnid) FROM {ec_paypal} WHERE ppid = d", $ppid))) ? false : true;
should be :
$is_new = (db_result(db_query("SELECT COUNT(txnid) FROM {ec_paypal} WHERE ppid = '%s'", $ppid))) ? false : true;
because ppid is a varchar in the table