Jump to content

New Install Of 1.5.3.1 & Free Paypal Module 3.4.5 No Response From Paypal


Recommended Posts

After building a brand new build of Prestashop & paypal using both a sandbox and live environment I'm getting no response from Paypal.

 

paypal_connect.php gets . . . .

 

[4] => Send with CURL method failed ! Error: Failed to connect to 173.0.82.83: Permission denied

[5] => Connect failed with fsockopen method )

 

Returned from its curl command. I know I can access 173.0.82.83 on port 443 from that server because I used telnet to start a connection and got . . .

 

[root@davissrp ~]# telnet 173.0.82.83 443

Trying 173.0.82.83...

Connected to 173.0.82.83 (173.0.82.83).

Escape character is '^]'.

 

The full trace that paypal_connect.php issues is . . .

 

[0] => Making new connection to 'api-3t.sandbox.paypal.com/nvp'

[1] => Connect with CURL method successful

[2] => Sending this params:

[3] => METHOD=SetExpressCheckout

&VERSION=84

&PWD=xxxxxxxxxxxx

&USER=andrew_1362500368_biz_api1.adavis.co.uk

&SIGNATURE=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

&CANCELURL=http%3A%2F%2Fwww.wearsthatfrom.com%2Findex.php%3F%26paypal_ec_canceled%3D1

&RETURNURL=http%3A%2F%2Fwww.wearsthatfrom.com%2Fmodules%2Fpaypal%2Fexpress_checkout%2Fpayment.php

&REQCONFIRMSHIPPING=0

&NOSHIPPING=1

&BUTTONSOURCE=FR_PRESTASHOP_H3S

&L_PAYMENTREQUEST_0_NUMBER0=41

&L_PAYMENTREQUEST_0_NAME0=Vintage+silk+embroidered+top

&L_PAYMENTREQUEST_0_DESC0=Vintage+silk+embroidered+top...

&L_PAYMENTREQUEST_0_AMT0=9.99

&L_PAYMENTREQUEST_0_QTY0=1

&PAYMENTREQUEST_0_PAYMENTACTION=Sale

&PAYMENTREQUEST_0_CURRENCYCODE=GBP

&PAYMENTREQUEST_0_SHIPPINGAMT=0

&PAYMENTREQUEST_0_ITEMAMT=9.99

&PAYMENTREQUEST_0_AMT=9.99

&ADDROVERRIDE=1

&PAYMENTREQUEST_0_SHIPTOSTREET=Blackness+Barn

&PAYMENTREQUEST_0_SHIPTOSTREET2=

&PAYMENTREQUEST_0_SHIPTOCITY=Totnes

&PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE=GB

&PAYMENTREQUEST_0_SHIPTOZIP=TQ9+7HQ

&SOLUTIONTYPE=Sole

&LANDINGPAGE=Login

&USER=xxxxxxxxxxxxxxxxxxxxxx

&PWD=1xxxxxxxxxxxxxxx

&SIGNATURE=xxxxxxxxxxxxxxxxxxxxxxxxx

[4] => Send with CURL method failed ! Error: Failed to connect to 173.0.82.83: Permission denied

[5] => Connect failed with fsockopen method

 

(My substitute of x's for the sake of privacy)

 

Only odd thing I noticed was a couple of PHP warning messages

 

1) Warning: PDO::query() [function.PDO-query]: SQLSTATE[HY093]: Invalid parameter number: mixed named and positional parameters in /var/www/vhosts/wearsthatfrom.com/httpdocs/classes/db/DbPDO.php on line 80

 

2) mod_fcgid: stderr: PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/wearsthatfrom.com/httpdocs/classes/Cart.php on line 2340, referer: http://www.wearsthat...out/payment.php

 

3) Warning: Invalid argument supplied for foreach() in /var/www/vhosts/wearsthatfrom.com/httpdocs/classes/Cart.php on line 2403

 

4) Warning: Invalid argument supplied for foreach() in /var/www/vhosts/wearsthatfrom.com/httpdocs/classes/Cart.php on line 2340

 

So it connects to Paypal on 173.0.82.83 but get's a Permission denied back.

 

Any ideas?

 

Thanks

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

I've fixed my problem but in case it helps anyone here's what was wrong. After adding a few lines to the Paypal_connect module to make it report the error, I discovered it was returning a Curl error 7 with the message Connection Refused.

 

This was just enough info to be able to get google to point me in the right direction. I discovered that an obscure file on my server called /etc/selinux/config had the line SELINUX=enforcing while on the other server on which the same website was working with no problem the same line was SELINUX=enforcing. I changed this and the Paypal payment module now communicates with Paypal with no problems.

 

I was surprised how much digging it took to discover this. I would have thought an issue like this would have had more exposure on google.

Link to comment
Share on other sites

×
×
  • Create New...