Jump to content

[Solved] Anyone has a working PayPal integration?


Recommended Posts

Up until now I was under the assumption that PayPal does not work only in sandbox mode, but it was brought to my attention that the live integration does not work also.

I am using the stable build, not the beta.

Does anyone here have PrestaShop (stable) that is working with PayPal?

Link to comment
Share on other sites

Ion_Cannon - thanks.
I know of a few people (including myself) who cant make it work and cant seem to get answers on the forum as for how to make it work.

Would you mind posting what version of Presta you are using, and what version of PayPal module?
Have you just installed the stable build and it worked for you out of the box?

Link to comment
Share on other sites

Highly appreciated guys.
Have you tested both sandbox and live, or just live?

And, are there any steps you can share as for what you needed to do in PayPal to make it work?
i.e. return URLs or anything else that is not the default?

My situation is that I am also using the default Presta install (stable) and have tested the sandbox with no success.
Have not tested live.

Link to comment
Share on other sites

I never tested in Sandbox, I just did live tests and used a coupon (99% off) to make the amounts really low like .25 each time. Kind of dumb but I can't think of a better test that to actually make money flow. I don't mind paying a couple $1 to paypal in testing fees. I will test more before going live but I have had no problems. I used 1.4...

Link to comment
Share on other sites

Ion_Cannon, thats actually not dumb at all - great idea.
Glad to hear your live paypal is working, this is the first encouraging news I had in this regard.

BTW, in my conversations with PayPal on this matter, they told me that you should not have a problem in issuing a refund for these test transactions.

Link to comment
Share on other sites

Hey everybody!

Congratulations to me - PayPal live is almost completely working for me.
Now I know whay I felt so confused - the paypal SANDBOX settings are not the same as the live account - so I could not find some of the settings that Presta instructed me to do.

So, for anyone who is still not able to make it work, this is what I did (not sure which is important and which not)
1. Work on a live server (not localhost) with no .htaccess blocks
2. PayPal Seller Business account, with the settings as instructed by Presta module (need to check some checkbox at PayPal)

So, why do I say "almost"?
As a "buyer", after I completed the paypal payment, there is a button on paypal that is supposed to get me back to my cart.
The button itself works, but it brings me back to the Presta shop, while my cart still looks full, and I see no confirmation on the Presta store.

Is there anything I need to configure on PP or Presta in order for this link back to go to a reasonable place? For example, to a "Thank you for your payment" page (which will also empty the cart)?

Thanks in advance

Link to comment
Share on other sites

cerberus, you are the man!
I remembered I saw something like this someplace.
This should probably be added as an instruction bullet to the PP module.

Thanks a lot!

EDIT:
Hey, quick question:
http://localhost:8888/prestashop/modules/paypal/validation.php

This is the URL in the wiki.
1. Do I need to change localhost to my domain?
2. Do I need to change the path?
3. How is this working on shared hosts?

EDIT2:
Isnt the URL supposed to be
http://mydomain.com/modules/paypal/validation.php
Or
http://mydomain.com:8888/modules/paypal/validation.php
?

Link to comment
Share on other sites

Hi,
Try http://mydomain.com/modules/paypal/validation.php (this should work fine) (remove mydomain.com and insert your url)

If your installation is not in your root folder you need to add your prestashop install folder name like this :
http://mydomain.com/installfolder/modules/paypal/validation.php (remove installfolder and add the name of your folder)

All the best,
Cerberus22

Link to comment
Share on other sites

Thank you very much my friend, for your fast and detailed reply.
I thought that 8888 port has some meaning, and that the prestashop connects to itself on this port (localhost) for some internal works.

So I am putting http://mydomain.com/Path To Paypal Module/Validation.php

Appreciate it cerberus.


EDIT:
Ok, this is confirmed and working nicely.
I think the Wiki page should reflect it.
I mean, the basic example should:
1. Not show port
2. Should show "YourDomain.com" instead of "localhost"
3. Should show correct path, as if you installed the shop on the root (because the default prestahop install comes with an empty "prestashop" folder)

If there is a reason for the 8888 port, it should be mentioned in a separate, additional example.

Thanks a lot everybody who participated in this thread.

Link to comment
Share on other sites

  • 2 weeks later...

Hi all,

I configured everything mentioned.. testing both on sandbox and live.. and payment is always in error because PayPay returns value 1 cent less than what I receive in actual paypal account.. Do you have any idea what I'm missing here?

FYI, I also have this modified code to charge paypal fee on customer >> http://www.prestashop.com/forums/viewthread/21167/modules/module_update_paypal_v1_dot_6_from_1_dot_12beta_with_paypal_fees_passed_on_to_customer

Thanks!

Link to comment
Share on other sites

I recieved the following from PayPal:

Please check your server that handles PayPal Instant Payment Notification (IPN) messages. Messages sent to the following URL(s) are not being received:

http://mystore.com/modules/paypal/validation.php

If you do not recognize this URL, you may be using a service provider that is using IPN on your behalf. Please contact your service provider with the above information.

Once you or your service provider fix this problem, you or your service provider can resend the failed messages from the IPN History page. If this problem continues, PayPal may disable the IPN feature for your account.

Thank you for your prompt attention to this issue.



So they disabled my IPN. Anyone else have this problem?
Link to comment
Share on other sites

Are there any permissions that should be chmod on the validation.php file?


I dont think so.
On my server, validation.php has the same standard chmod as any other file.
Do you reach this url in the browser?
Can the world reach it? (I have .htaccess deny in my root, so maybe you forgot you put one there also... :) )
Link to comment
Share on other sites

Are there any permissions that should be chmod on the validation.php file?

Can the world reach it? (I have .htaccess deny in my root, so maybe you forgot you put one there also... :) )


Do I have to put an .htaccess deny in the root of the paypal folder?
Link to comment
Share on other sites


Do I have to put an .htaccess deny in the root of the paypal folder?

No no, not at all.
Personally, I put one to block any access from the world, while I do my development.
1. Are you using the stable Presta release (not beta)?
2. Are you using the default PayPal module (1.4 I think) and not some patch?
3. Can you access the validation.php URL by browser (you should see a blank page I think)?
Link to comment
Share on other sites


Do I have to put an .htaccess deny in the root of the paypal folder?

No no, not at all.
Personally, I put one to block any access from the world, while I do my development.
1. Are you using the stable Presta release (not beta)?
2. Are you using the default PayPal module (1.4 I think) and not some patch?
3. Can you access the validation.php URL by browser (you should see a blank page I think)?



Yep 1.1, default module, and I get the blank page... so it shouldn't be a problem...
Link to comment
Share on other sites

Hi there,

I see that I'm having the same problem with return url and the ipn not working.
I have copied your method but still cannot get it to work.

In paypal ipn history i get 500 error for items sold, also if i type the path

www/ or the root is set to 755 - is this causing the problem?
Do I need to change htaccess file ?

http://domain.co.uk/modules/ access denied 777
http://domain.co.uk/modules/paypal/ access gained 777
http://domain.co.uk/modules/paypal/validation.php access denied 777

All directories and validation.php are 777 ?

Any advice please :)

many thanks
Paul

Link to comment
Share on other sites



Thats odd.
Well, what I think I can tell you is that at least you seem to have a problem not directly paypal related and it should be easier to debug.
The url /modules/paypal/validation.php must be accessible, so you have no point in continuing to testing IPN until you figure this one out.

I am getting a blank page, so all I can say is that until you can make this URL show a blank page, it will not work :)

One thing I would do if I were you - just as a test, copy the validation.php as a backup, then edit it to say something like
<?php echo "tada!" ?>

and try to access it again.
This test will eliminate any complexities (remove everything else from the file)

If you still cant access it, then its something with your permissions - check any .htaccess in all directorites that are in the path to this file.

Link to comment
Share on other sites

Hi there,

Changed the validation.php but same problem.
Have found...

.htaccess.txt in my www folder under my / folder.
.htaccess.php in my www folder under my / folder

What should I look for to possibly change?

Thanks

Paul

Link to comment
Share on other sites

So there is progress - not a paypal issue, but permissions (or other installation) issue.

1. Can you access other (physical) files on your server?
2. Create a simple test.php (echo tada) in your modules folder, see if you get to it
3. Do the same in your modules/paypal folder

If still cant reach /modules/test.php and /modules/paypal/test.php, put one in your ROOT folder
and try to access it.

This will tell you if the block is somewhere higher in the path.

Did you install presta in your root?

If you did not touch .htaccess files in the past, then you should probably not change them since they probably do not contain any problem.
Just in case, make sure there is no "deny" or "allow" command there
Leave all the rest (RewriteRules etc.)

Link to comment
Share on other sites

Hi there,

this is part of the file I think is relevant ? thanks


RewriteEngine on
# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*


order deny,allow
deny from all
allow from all


order deny,allow
deny from all

Link to comment
Share on other sites

What is the path of this .htaccess, and who put these rules in?
I do not have them in my Presta install

All I have is:
1. .htaccess in the root of presta
2. No .htaccess in modules or in modules/paypal

The root .htaccess only contains a few lines related to rewrite rules
RewriteEngine on
and then several
RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$2$4 [L,E]
and one
ErrorDocument 404 /404.php

But, be careful touching any .htaccess that you are not familiar with - someone or something wrote these rules in it
If it was not you, find out who or what.

For test purposes, you can remove everything from the root htaccess, and see if you can THEN access the test.php physical files.
If you can, then the problem is with the htaccess (debug by elimination process... :) )


Is it possible you had a different application installed on this server before Presta?

Link to comment
Share on other sites

Hi there,

I had uk2 ecommerce (trading eye) previously installed on this shared server. Which I had a hell of a time with not working... long story.... which is why I moved to prestashop :)



.htaccess in www
htaccess.txt file in www

heres the full code from the file .htaccess

RewriteEngine on
# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*


order deny,allow
deny from all
allow from all


order deny,allow
deny from all

AuthName mydomain.co.uk
AuthUserFile /home/discloca/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/discloca/public_html/_vti_pvt/service.grp
RewriteCond %{HTTP_REFERER} !^http://www.mydomain.co.uk/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mydomain.co.uk$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mydomain.co.uk/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mydomain.co.uk$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]



Many thanks

Paul

Link to comment
Share on other sites

the .htaccess code you posted, is that all that should be in that file ? Would it kill my system if I copied your code into my .htaccess file ? Obviously I would backup my original .htaccess file.

So perhaps I need to contact uk2 to sort this out.

Many many thanks for all your help so far !:)

Link to comment
Share on other sites

Well,

First, you cannot know which additional mixups do you have because of the two systems living together.
If you have a choice, I would make a clean install of Presta - assuming you want only Presta living in this box.

Copy your current folder as backup
Erase EVERYTHING
Reinstall, and reconfigure
Then copy whatever you KNOW you need from your old backup folder


If this is not an option, then let me just warn you that it sounds like a risk to me
Doing a shopping system which may or may not be contaminated by some previous installations - not a great idea... :)

In any case, you can find the correct .htaccess in your Presta installation zip.
I recommend you take it from there, and now you will also have a "base" to compare your files against and fix any other issue by comparing your files with the files in the install zip.

And in any case (2), here is what I have - in the root of presta.

# URL rewriting module activation
RewriteEngine on

# URL rewriting rules
RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$2$4 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$1$3 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ category.php?id_category=$1 [QSA,L,E]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ cms.php?id_cms=$1 [QSA,L,E]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ supplier.php?id_supplier=$1$3 [QSA,L,E]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]

# Catch 404 errors
ErrorDocument 404 /404.php



That, and nothing else.

Link to comment
Share on other sites

Hi there,

Thanks for the all the information you have provided, very much appreciated. I'll check to see whats what with my file against the corrupted one and contact uk2 (just incase they can give me any advice from there side regarding the previous ecommerce package installation permissions, then re-install presta !

many thanks !

Paul

Link to comment
Share on other sites

Well, so far I uninstalled uk2ecommerce.
applied the prestashop .htaccess as is and not modified for friendly urls yet.
I applied a 0644 permission to validation.php file by accident and its now getting a blank screen as if working ?
Just checked paypal ipn history but still not updated presta yet.
I Think its time to reinstall.

Link to comment
Share on other sites

Blank page is a good start.
Did you try to make a new, clean purchase from beginning to end after your reconfiguration?
If not, do so before reinstalling - your install might already be fixed.

Also, make sure you are working with the standard, live PayPal account and not sandbox.

Link to comment
Share on other sites

Hi there,

yes, new purchase, debit card only without a previous paypal account.
I'm using a live standard paypal account, ipn history still reading 500 error. Have disabled sandbox via presta payment module, set to off.

Cart not emptying .
No order in Back Office etc.
Products quantity not updating to being sold out.

Time to re-install :(


many thanks for all your help !! .. going to be a long night....
EDIT, what extra settings are there for sandbox ? does it not set itself up from the paypal live settings that I followed in the wiki / presta guide ? Also using a shared host / server)

Link to comment
Share on other sites

After speaking with uk2 tech support they advised how to uninstall / remove unwanted software etc to get a cleanish shared server ready for the reinstall of presta.
However, after just uploading the presta files into the www root I couldnt run the install from the firefox browser ! Am now waiting for tech support to sort out permissions for me, which I think has been the root of all problems with presta shop not running correctly.
I think there are "higher" permissions above the permissions I can set myself on the shared server. Also received info from uk2 tech support that the servers do not like 777 permissions so they advise to use 755 instead.
Just waiting to get going again. Anyone else using uk2 hosting ?

Link to comment
Share on other sites

looks like the uk2ecommerce package I purchased has "server specific" permissions or specific "install procedures" which is causing problems for me trying to install prestashop (ie not uk2's own ecommerce package) manually using filezilla. May be time to downgrade to another server package ?

Link to comment
Share on other sites

Try http://mydomain.com/modules/paypal/validation.php (this should work fine) (remove mydomain.com and insert your url)


I have tried this with both www and just the domain name but I am still getting an HTTP response code 500 and status as retrying on my paypal IPN history, when I make a test purchase I retun to my site and the item is still in the basket with nothing purchased message.

Can anyone suggest the best method to sort this out? I am a complete idiot when it comes to computers so plain language would be very much appreciated.

Link to comment
Share on other sites

I am using a guy called turnkey services, who installed prestashop for myself. I will have to do some research on whether permissions have been set for the various folders associated with my site, as I mentioned I am a newbie at all this, everything else seems to be working OK so far, is there a simple way of checking the permissions settings?

Link to comment
Share on other sites

OK, many thanks to everyone, have managed to get the integration working now by setting the modules folder and paypla folder to 755 from 777, will have to test the rest of the site to ensure nothing else has changed too much but looking good at the moment.

Link to comment
Share on other sites

Are you guys using 1.4 paypal module or aaron's 1.6?? I am having trouble with Aaron's 1.6, i switch back to 1.4 with exact same paypal settings and i do not get a payment error. Paypal Module 1.4 works fine for me just using the regular validation.php file for IPN messages. If i put in a % fee in Aaron's module, I do not get a Payment error and it seems to work then. Are you guys using the fee?

Link to comment
Share on other sites

  • 1 year later...
The paypal module works fine for me as well. My shop is not live but I've tested it with actual orders several times.


Hi Ion_Cannon,

I installed the paypal module you posted in other thread. After installing your module and I tried on sandbox account, transactions went through successfully with messages being sent to both seller and buyer in order. Unfortunately, when I tried on live account twice, payments received but order history hasnt update and BO received no order record at all as well as no email being to buyer and seller.

Not sure why, could you guide me?? I really dont know why it is happening....


thanks. nic
Link to comment
Share on other sites

  • 10 months later...
×
×
  • Create New...