sara75 Posted January 27, 2017 Share Posted January 27, 2017 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? Quote Link to comment Share on other sites More sharing options...
MrPhil Posted January 27, 2017 Share Posted January 27, 2017 Did "changing your server" involve moving your code to a higher PHP version? What osC version are you using? Possibly the add-on you're using for this PayPal service needs to be updated for your PHP version. Quote Link to comment Share on other sites More sharing options...
sara75 Posted January 27, 2017 Author Share Posted January 27, 2017 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. Quote Link to comment Share on other sites More sharing options...
MrPhil Posted January 28, 2017 Share Posted January 28, 2017 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. Quote Link to comment Share on other sites More sharing options...
sara75 Posted January 28, 2017 Author Share Posted January 28, 2017 @@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)) Quote Link to comment Share on other sites More sharing options...
MrPhil Posted January 28, 2017 Share Posted January 28, 2017 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. Quote Link to comment Share on other sites More sharing options...
sara75 Posted January 28, 2017 Author Share Posted January 28, 2017 I used this app https://www.oscommerce.com/_&PayPalApp I re-check if something went wrong on update. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.