Jump to content

Paypal Debugging + small glitch in paypal_connect.php


mbdiscover

Recommended Posts

1) To enable Debugging for Paypal Module set the debugging level from 0 to 1

 

Enter your Database for prestashop

Navigate to Table: [yourDatabase]_configuration

Modify Row: "PAYPAL_DEBUG_MODE" Value:1

 

 

 

2) There is a small glitch in the offical module "paypal_connect.php"

 

Private function _connectByFSOCK($host, $script, $body)

 

The row 127 with [ $tmp = ''; ] must be moved to the top of the function.

If not an error PHP can occur.

 

The reason is, the IF Clause doesnt init the $tmp on Failure.

Thus the return statement will not work properly.

 

 

 

3) If you changed the paypal_debug_mode = 1 you will get a response in the prestashop frontend.

 

Without:

Please try to contact the merchant:

->

 

With:

 

Please try to contact the merchant:

 

Making new connection to 'api-3t.sandbox.paypal.com/nvp'

Connect failed with fsockopen method

PayPal response:

->

 

 

4) The reason behind the error might be the PHP Setting of Hosting Provider.

The PHP configuration

"allow_url_fopen" = "false"

"disable_functions" = might contain "fsockopen"

 

Hope this will help, as it took me some hours to figure the trouble out.

No visible error in frontend is always an annoyance.

Edited by mbdiscover (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...