Morgaine Posted September 14, 2010 Posted September 14, 2010 I have been fighting with a weird problem for days now, concerning returning to site after paypal payment. Everything works fine up until one presses "Return to merchant" at paypal, after which one gets a 404 error due to being directed to a wrong place. Essentially, one is directed to /checkout_process.php?osCsid=.... which obviously is not found, while one should be directed to http://myshop.com/checkout_process.php?osCsid=.... I have tried to get this working with PayPal module, PayPal standard module and with PayPal IPN (v2.3.4.6), and I always get the same error, so obviously there is something wrong somewhere where all these modules are trying to read the return url, but I have no idea what that might be. With PayPal and PayPal_standard modules I have set the auto return on PayPal on, directed to http://myshop.com/checkout_process.php, while with PayPal_IPN I left it off at the PayPal side. As far as I can tell, this is exactly the same error as was discussed here: http://www.oscommerce.com/forums/topic/284641-very-weird-404-paypals-links-to-me-all-fail-during-checkout/page__p__1169836__hl__paypal%20404%20return%20merchant__fromsearch__1entry1169836 but the solution that the author of the thread found does not work with me (though does make a difference: instead of trying to direct me to /checkout_process.php?osCsid=..., I am being directed to /http:/myshop.com/checkout_process.php..., which is almost right, except for the leading / and missing / before myshop.com. I have no idea why the address is malformed like that, I did hardcode it correctly to paypal_ipn.php as instructed in the above thread.) In short, where do I start looking for the problem of not being directed back to the right place after payment at PayPal has been done (notifications of payment do come to all parties)? I'm running osCommerce 2.2-MS2, PHP v4.4.9 and have curl support enabled. Any insight is welcome. Quote
Guest Posted September 14, 2010 Posted September 14, 2010 Try setting the AUTO RETURN in your PayPal Profile Settings. The customer should return to checkout_process.php as you stated. If you site is in a sub directory then ensure you include that in your return URL. http://www.yourdomain.com/checkout_process.php or http://www.yourdomain.com/catalog/checkout_process.php You will also want to verify your configure.php files to ensure you have www.yourdomain.com and not yourdomain.com Chris Quote
Morgaine Posted September 14, 2010 Author Posted September 14, 2010 Try setting the AUTO RETURN in your PayPal Profile Settings. The customer should return to checkout_process.php as you stated. If you site is in a sub directory then ensure you include that in your return URL. http://www.yourdomain.com/checkout_process.php or http://www.yourdomain.com/catalog/checkout_process.php Thanks for the prompt reply. Like I mentioned, when using PayPal or PayPal_standard modules, I have set the AUTO RETURN in my PayPal profile setting on, and set the return URL like you mentioned. This does not, unfortunately, resolve the problem. I did try setting it on with PayPal_IPN module too, but it either didn't change things. You will also want to verify your configure.php files to ensure you have www.yourdomain.com and not yourdomain.com Chris I will check that, but it shouldn't matter, as both www.myshop.com and myshop.com direct me to the same place (I have checked that pointing my browser both to myshop.com/checkout_process.php and www.myshop.com/checkout_process.php do lead to valid responses. I just don't understand why I am not redirected to these valid urls, either one, from paypal). Quote
Morgaine Posted September 15, 2010 Author Posted September 15, 2010 I seem to have figured out what the problem was, namely SSL. It is not enabled on my site (yet), and when 'SSL' was passed to tep_href_link function, it malfunctioned in the above explained way. Given that all the credit card transactions are handled by PayPal, how necessary SSL is? Ideally I would certainly want to enable it, but it seems this is something I am unable to do on my own, but requires intervention from the host administrator. Quote
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.
Note: Your post will require moderator approval before it will be visible.