View Full Version : Fatal error: Call to a member function on a non-object in paypal_ipn.php on line 521

01-30-2008, 03:39 PM
So this is a Paypal IPN error... actual error below (using paypal sandbox):

Fatal error: Call to a member function on a non-object in ../includes/modules/payment/paypal_ipn.php on line 521

So I've done a lot of research online and in these forums and have found a lot of references to this issue. Code from around line 521 is below:

520: // Added Bugfix 157
521: $order_total_modules->apply_credit();

I've also researched bug fix 157 and found that this module incorporates all of the necessary fixes for 157 so I wonder what else are we missing?

We get this error in particular when running the store in Sandbox mode with paypal. We did get a real order today through Paypal but no payment information came through (it doesn't show the transaction in paypal), but we do see the actual order, so we can only guess that our customer either got the error or thought he was done.

We do use vouchers so we'd like to keep this as is and I'm sure that someone out there knows what the cause / solution is to this problem???

Any help woud be appreciated...


01-31-2008, 11:51 AM
So for now we have disabled paypal as a payment processing option... would love to reenable it. Any suggestions?


01-31-2008, 01:43 PM
Read the long thread at the top of the paypal forum. It is resolved in that thread:

03-08-2008, 03:32 PM
when is this going to be fixed??

[Sun Mar 09 00:16:48 2008] [error] [client] PHP Fatal error: Call to a member function apply_credit() on a non-object in /home/edgeconsults/www/investinhardmoney.com/includes/modules/payment/paypal_ipn.php on line 521, referer: https://www.paypal.com/us/cgi-bin/webscr?cmd=_flow&SESSION=xxxxx