View Full Version : Paypal issue - Any ideas?

03-24-2009, 03:09 PM
I have installed the Standard Payments module for Paypal.

It works all the way through (incuding entering into admin) until the end when I click on the

Return to Store Button

I get the following error

Fatal error: Call to a member function update_credit_account() on a non-object in /home/a1352804/public_html/catalog/includes/modules/payment/paypal_standard.php on line 471

Line 471 reads:

// Start - CREDIT CLASS Gift Voucher Contribution
// End - CREDIT CLASS Gift Voucher Contribution

I read the PAYPAL thread and this looks like a Gift Voucher issue so I commented the line out. Now I get an error on line 510

Fatal error: Call to a member function apply_credit() on a non-object in /home/a1352804/public_html/catalog/includes/modules/payment/paypal_standard.php on line 510

Which is another GIft Voucher Mod - which I also commented out.

Another one on line 570.

And then it seems to work!

However, I would like to use the Gift Voucher functionality at some point in the future.

Is there a fix out there for this issue? :D

Many thanks - apologies if I have missed this solution elsewhere.


03-28-2009, 01:03 PM
Same problem here..
I followed your workaround and seems fine now.

Please someone help to solve this permanently!!

03-30-2009, 07:57 AM
Hi again

I think I have found a better solution
You can add
" if (isset($order_total_modules))" in front of each line indicating error.

In my store, after this change, discount coupons work flawlessly


04-22-2009, 04:49 PM
Can someone clarify as to why this is happening? I just did a brand new install of oscMax and am getting this error with the PayPal module. I'm happy to hack away at this issue, but what is the issue and how will it impact a live store?


04-23-2009, 12:25 AM

Use vergeo's solution

You can add
" if (isset($order_total_modules))" in front of each line indicating error.

In my store, after this change, discount coupons work flawlessly


07-11-2009, 11:14 AM
I have the same issue. Just one question before I make the changes. Is this how the code should be?

// Start - CREDIT CLASS Gift Voucher Contribution
if (isset($order_total_modules)) $order_total_modules->update_credit_account($i);
// End - CREDIT CLASS Gift Voucher Contribution

Or is there something missing?

07-19-2009, 12:50 PM
Sry for the late answer...
That's it. I think you can safely proceed with the changes.

07-19-2009, 11:39 PM
Yes we had the same trouble with the latest oscmax 203 but changed the lines 471 and 509 with the same code as above, and we got back to the store okay. Many thanks vergeo

08-29-2009, 02:19 AM
Could this be added into the SVNs and main release, please.

08-29-2009, 07:09 AM
This is already in the svn version (2.1)

08-29-2009, 08:04 AM
Doesn't help those who are downloading 2.0.3 from the main site or SVN though. :p

08-29-2009, 08:13 AM
Yes it does. Just grab the file from the 2.1 branch. You can get individual files from anywhere in svn whenever you like. Mix and match. No matter what version you use, 2.0.3 or 2.0.3 SVN, just tell your client to grab the 2.1 version of the paypal file or checkout 2.1 and copy the module over to your site. That was easy now wasn't it?

A new 2.0.x release is coming with some bugfixes shortly.

08-29-2009, 09:00 AM
No need to tell me. :rolleyes:
Was looking at it from a newbie/non-forum users viewpoint.


08-29-2009, 09:52 AM
I posted that for anyone that comes across the post. I didn't want them to think that they cannot get the 2.1 file from svn for their 2.0.3 shop (as your post implies).

Sharon Chinn
09-05-2009, 05:20 PM
I made the change to line 471, and now I'm getting an error message about line 475

Fatal error: Call to a member function on a non-object in (account)/catalog/includes/modules/payment/paypal_standard.php on line 475

I'm using osCMax v2.0.2 with Netfirms.

Any ideas? The payment goes through, but the customer doesn't get back to the checkout_success.php page, so the cart doesn't clear and I don't get an email confirmation of the order from oscommerce although the order does log in the Admin panel as payment complete.

09-06-2009, 12:02 AM

You need to do more that one change to the file to fix it!

Read this page (http://code.google.com/p/oscmax2/source/detail?r=174) ... Click the little + sign next to the word 'Modify' and it will show you what changes need to be made to the page to fix the CCGV problem with PayPal.


Sharon Chinn
09-06-2009, 08:56 AM
pgmarshall, thanks so much! I searched and searched yesterday and never found that solution. I installed the code this morning and it works just great!:Dsharon

12-14-2009, 11:20 AM

Use vergeo's solution

So vergeo's solution was great and I don't get paypal_standard issues anymore, but understandably this is what paypal tells me:

"Some required information is missing or incomplete. Please correct your entries and try again."

Now I had about 10 lines of errors so maybe doing those IF statements for each one was a bit overkill?

01-06-2010, 10:25 AM

for the code fix for paypal in the svn there is green, red, and grey highlights, what is the grey highlighted code on the "+" lines? is it supposed to be added? or taken out?


01-06-2010, 11:09 AM
I don't see any grey highlights but ...

Green = Additions
Red = Removal

The lighter colour means that there are changes to the line not necessarily a complete removal (darker colour)