Jump to content

Problem with Paypal in Prestashop


Recommended Posts

When I click on the Paypal module on index page it brings up an 'Internal Server Error'.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

All it appears to want to do is direct you to the modules/paypal/about.php

When I run a dummy transaction and get the final payment section after shipping instructions and click on paypal as the only option to pay, I get the same error page returning.

Any help with this would great!!!

Link to comment
Share on other sites

from the symptom, it seems configuration issue.
try to uninstall the module and reinstall it to see if there is any changes.

Also you can try to set 'display_error' to 'on' in file /config/config.inc.php to see if there is any other error cause this problem.

Link to comment
Share on other sites

  • 4 weeks later...

Same issue - 500 & 404 when using paypal, [the PS 1.3x version is still working perfectly on a separate site on the same server]
uninstalled/reinstalled; enabled/disabled with no effect.
Possibly irrelevant :-
Configuration Information - says Set PHP register global option to off
but
php_flag register_globals off
- if added via the htaccess generator all pages give 500/404s
Something is not right...

Link to comment
Share on other sites

Version of all components is what was included in the 1.4.2.5 release with Paypal 2.4 - made clean install.

Paypal itself works on other sites; there is nothing blocking me using e.g. an 'about' link, to PP locally.

I have just discovered that the CMS block is unable to be edited properly. I wanted to remove the 'our stores' link but it absolutely will not allow it even if I remove all other links, delete the Block, uninstall/reinstall & create new block, it just says
'You must choose at least one page or subcategory to create a CMS block'
The block being edited is the only entity I can select & if it is active or not has no impact. Why this error appears I don't understand.

My comments on other issues:
corruption of data on CSV import
PS failing to recognise entries during install (& so hi-lighting 'next' etc)
posted here:-
http://www.prestashop.com/forums/viewthread/113130/
http://www.prestashop.com/forums/viewthread/113066/

I am wondering if someone can see a common link between these faults. I have never seen anything like this whilst using 1.3x on the same server.
i.e. could it be something done/not done on the hosting side?

PS reports -

Server information

Prestashop Version: 1.4.2.5

Server information: Linux #1 SMP Wed Apr 29 11:05:18 CEST 2009 i686

Server software Version: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635

PHP Version: 5.2.5

MySQL Version: 5.0.92-community


My URL http://www.mp-comp.co.uk/
I have not altered the base theme as I wanted to reduce 'unknowns' in the install at this point
Link to comment
Share on other sites

I just checked Paypal related internal errors. Based on my feeling, it could be damaged files or not accessible files.
or URL redirect issue.

to identify the problem, can you try
1. switch to non friendly URL, (disable SEO &URL;)
2. Check if the Paypal module folder and files permission is correct, folder 755, files 644
3. Redo the upload all files right under root and also the Paypal module folder

Link to comment
Share on other sites

Thanks for looking at this for me shokinro

I have :
Disabled the SEO friendly URL
Deleted & re-upped / reinstalled the module from my downloaded install package.
checked the CHMODs & all are 755 & 644s.

No effect. :(
I will keep trying & post if I solve it.

Link to comment
Share on other sites

I have discovered 1 problem. Having set the /modules to 777 during install, the Paypal folder had correct 755/644 but other folders in the /modules folder remained at 777. Apache obviously didn't like this. Question is why didn't install alter these CHMODs on completion?
Resetting these to 755 has allowed me to access the 'about' page of PP.

The checkout doesn't work however. On clicking the pay with PP banner which in 1.3x took me straight to the PP site gives -
with caching enabled:-
The URL was redirected to http://www.mp-comp.co.uk/modules/paypal/payment/submit.php.'>http://www.mp-comp.co.uk/modules/paypal/payment/submit.php. Please click the link to go there.
or
The URL was redirected to http://www.mp-comp.co.uk/en/modules/paypal/payment/submit.php. Please click the link to go there.
depending on which caching is active. This is an endless & slow loop.
With Cache off -
A small phrase No template found for module PaypalPayment is displayed in place of the cart on the page. The file /payment/PaypalPayment.php is present on the server however.


I also noticed that PP IPN req's a URL, the URL on the PS Wiki is wrong - there is no validate.php in /payment
What should it be now? (assuming I can get the PP link to work I might want that too! ;))

Thanks for your help.

Link to comment
Share on other sites

Decided to start over
- Nuked all server files; clean install
- Reloaded the db & images
(PS wouldn't accept the original db that was still on the server (i.e. accessible in cPanel; checked it & cPanel said it was error free.). During install PS said server present but no db found when given the existing db name. So I had to create a new one & import the backup - assume this is a security feature?)

- reset all CHMODs to 755 & 644
- Turned off all caching. (PP won't work with it active - 500s as before)

Now I can actually proceed BUT when I hit CONFIRM I get the paypal error shown.
Double checked the credentials on PP & in the PP module, deleted/reinstalled etc -> no dice

Aside - I assume the IPN URL will be http://www.sitename.com/modules/paypal/validation.php now not as the wiki shows.

So a small step forward, but no cigar...

47190_cqLtNLgMStzheV4J5Deb_t

Link to comment
Share on other sites

>I assume the IPN URL will be http://www.sitename.com/modules/paypal/validation.php now not as the wiki shows.
The URL itself does not matter as long as you have enabled IPN at your Paypal account.
Because the module will send a parameter to Paypal, it will overwrite original one you set at your Paypal.
The overwrite URL only happens on the transaction from Paypal module.

For security, most cases are that you made mistake of authentication information.
like you messed up with Sandbox account and real account.

for your reference, check it here for more scenarios

Link to comment
Share on other sites

Thanks Shokinro for taking time to walk me through this.

I double checked the PP details on the PP a/c pages but now decided to generate new set, & use them instead.
Now it's working...!

Anyone wanting to know where I think the errors were :-

CHMOD settings on nested folders & files - many were actually set at 777 after the install process completed - even tho I had been nowhere near them & they aren't mentioned as being req'd as 777 in the install wiki. Shouldn't PS have a script run on the CHMOD at installation end?

Caching - I am able to use smarty cache but not the 'caching' itself (at foot of prefs page) I found turning this all off during a clean install of the PP module seemed to help.


Now I really need to blow something up. :D

Link to comment
Share on other sites

did you clear your cache? Also what is the browser you usually use?

Thank you

Clearing the server cache generates errors on the site pages; clearing local caches has no impact on the display/interaction side of PS as far as PP goes.
I have both IE & Opera on the PC. Had a friend try firefox & safari - same results.

The depth & frequency of CHMOD 'errors' (Wrong privileges) is what surprised me. Without recursively checking thousands of files\folders' CHMODs I wouldn't have got past the server 500 errors.

There has to be a way of automating CHMOD setting during install, & I don't recall ever seeing this happen on installing earlier builds so it caught me off-guard.
Link to comment
Share on other sites

  • 1 month later...

There is a quick way on command line (connect via SSH using Putty or Mac Terminal) for chmod commands which are recursive.

find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;

(P.S. Run these commands in your shop root folder - e.g. /home/account/public_html)

This solved one problem but revealed another for me.

If I use Paypal module v2.4 in DIRECT (SALES) mode - it does not work and throws a 500 error.
If I use authorisation/manual mode, it works fine.

I have no idea why - there's no error log entry....hmmmm.....

Link to comment
Share on other sites

×
×
  • Create New...