View Full Version : paypal ipn fatal call

11-20-2007, 12:04 PM
ok, so i have spent the better part of a day looking for the fix for this. using oscmax v2.0rc3 stock install no additional mods.

using paypal ipn in sandbox mode, when it returns to the store if throws an error fatal call to apply_credit(); it is something to do with the gift voucher system and i have tried to fix it but can't.

gift vouchers are the whole reason i used oscmax - well that and the prepackaged mods :). but if i can't get the git vouchers to work i will have to look into another avenue.

please help me.

11-20-2007, 09:20 PM
here is the actual error it throws -
Fatal error: Call to a member function apply_credit() on a non-object in /home/*******/********/********/includes/modules/payment/paypal_ipn.php on line 521
I have looked in the forums for everything i can think of - even used the modded file for paypal_ipn but as far as i can tell it doesn't have any CCGV stuff in it, and when i add it in the correct spot i get the error above just the same as the stock oscmax file.

Any help would be most appreciated - even just a simple link to somewhere elese to look. thanks

12-02-2007, 07:18 PM
can you post the code around line 521?

say 20 lines before, going to about 20 lines after?

12-04-2007, 03:13 PM
This error relates to Bugfix 157. Go to Bug Tracker top of this page - type 157 - click "Jump or go here:
157: With voucher active during paypal payment, amount of voucher does not subtracts from account after check out - Bug Tracker - open source Commerce Maximized :: osCMax (http://bugtrack.oscmax.com/view.php?id=157)

That's the history to this 'fix'. :)
I received the same error however as I don't use gift vouchers I commented out lines 521 & 581 & now works for me:

// line 521:
//np $order_total_modules->apply_credit();
// line 581:
//np $order_total_modules->clear_posts();

An unbiased plug for Michael.
A lot of "errors" in here relate to server set up - versions of PHP / MySQL / php.ini settings...
To remove those from the equation - host with the guys that run this forum - Web Hosting, Dedicated Servers & E-Commerce (http://www.aabox.com)