Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal try to access pro_hosted_ipn.php and get Error 500


sara75

Recommended Posts

Hi all, 

Yesterday I changed my server and everything works fine, customers are buying and also payment with paypal works fine, but on my error log I find:

[Fri Jan 27 14:14:12.636776 2017] [fcgid:warn] [pid 9557:tid 140124086036224] [client 173.0.81.1:36292] mod_fcgid: stderr: PHP Fatal error:  Call to a member function getApiResult() on null in /...../ext/modules/payment/paypal/pro_hosted_ipn.php on line 28

and in access_log 

173.0.81.1 - - [27/Jan/2017:14:14:12 +0100] "POST /ext/modules/payment/paypal/pro_hosted_ipn.php HTTP/1.0" 500 423 "-" "PayPal IPN ( https://www.paypal.com/ipn )"

Someone can help me finding what's wrong?

Link to comment
Share on other sites

Yes, I presume it's a php version problem. 

The error is PHP Fatal error: Call to a member function getApiResult() on null in /...../ext/modules/payment/paypal/pro_hosted_ipn.php on line 28

Line 28 is    

 $result = $paypal_pro_hs->_app->getApiResult('APP', 'GetTransactionDetails', array('TRANSACTIONID' => $HTTP_POST_VARS['txn_id']), (OSCOM_APP_PAYPAL_HS_STATUS == '1') ? 'live' : 'sandbox', true);

Old server Php 5.2.11  - MySQL 5.0.88 

New server is Php 5.6.29 - MariaDB 10.0.28

 

PayPal is trying to update the orders with new information about refound etc. 

Link to comment
Share on other sites

What. Is. Your. osC. Version? If you have an old one, it's not worth going through the effort to make it PHP 5.6 or 7 compatible. Only the newest one (2.3.4BS Edge) is worth the effort (it's already 5.6 compatible). There are instructions on this forum.

 

The actual error is going to be upstream from line 28. Somewhere $paypal_pro_hs->_app should get created, but in your case something broke and nothing was created. Going from PHP 5.2 to 5.6 is a Great Leap Forward, and millions will die. It's possible to fix up your existing code, if you're an experienced programmer, but it will usually be quicker just to install 2.3.4BS and migrate your data over. Plus, you'll have the latest and greatest code (although it will need updating for PHP 7 when that happens) and responsive interface.

Link to comment
Share on other sites

@@MrPhil I already have a 2.3.4BS   :thumbsup: but it's hardly modded  :-

I compared and updated all files of PayPal App without result  <_<

It's quite hard to debug as the show is live and working hard (fortunately  B)) 

Link to comment
Share on other sites

Is this PayPal an add-on, or built in to 2.3.4BS? If it's an add-on, it's possible that its code needs updating to work with PHP 5.6. Inquire on its support thread. If it's built in to osC 2.3.4BS, it sounds like either a bug that Gary should know about, or a misconfiguration somewhere. I've never used this code, so I can't offer any help in debugging it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...