Jump to content

Get paid but no BO notification. Get 301 in logs! PayPal USA, Canada v1.3.8


awnautical

Recommended Posts

Hello all

I'm very self taught and have been very busy for the last year so I'm just relearning the basics of my web sites. I upgraded paypal to PayPal USA, Canada v1.3.8 because of the ssl bug. Now I get paid but the back office never gets to order completed. I see that I get 301 redirects in logs when paypal sends https://www.mysite.c.../validation.php. I have checked .htaccess and robot.txt, I have looked in cpanel for redirects no luck. I have upgraded Backward compatibility v0.6.1 by PrestaShop still no luck. I'm using Prestashop 1.4.6.2 on this site and I did a lot of custom work so upgrading at this time is a no go. This is my first time here and I'm over my head so I would really like a little advice.

 

Prestashop 1.4.6.2

Backward compatibility v0.6.1

PayPal USA, Canada v1.3.8

 

Thanks Wayne

 

Link to comment
Share on other sites

do a test, put a simple text file in the following folder of your website

/modules/paypalusa/

 

Name the file something like test.txt and put some random content in it, like "hello world"

 

Then try to access that file from your browser and see if you get the same 301 redirect

https://www.mysite.com/modules/paypalusa/test.txt

If you get redirected, then your issue has nothing to do with Prestashop

If you can see the contents "hello world" in your browser, then you know it has something to do with Prestashop or the PaypalUSA module.

Link to comment
Share on other sites

I was just looking at the log and paypal only sends https://www.mysite.com/modules/paypalusa/validation?pps=1 ****not**** https://www.mysite.com/modules/paypalusa/validation.php?pps=1. If I try that with test.txt with no suffix I get page not found.

you have friendly url turned on.  this is a known issue that I reported to them using their github about 7 months ago... they have failed to do anything about it.

 

https://github.com/PrestaShop/PrestaShop-modules/pull/415

 

This is the code that you need to use for PS v1.4

public function getModuleLink($module, $controller = 'default', array $params = array(), $ssl = null)
{
    //bellini: need to append '.php' to the end of the controller for PS v1.4.  Cannot assume Friendly URL is turned on, so either need to add a check, or append .php
    if (version_compare(_PS_VERSION_, '1.5', '<'))
        $link = Tools::getShopDomainSsl(true)._MODULE_DIR_.$module.'/'.$controller.'.php?'.http_build_query($params);
    else
        $link = $this->context->link->getModuleLink($module, $controller, $params, $ssl);
        
    return $link;
}
  • Like 1
Link to comment
Share on other sites

 

I want to thank both of you tdr170 and bellin13. Not wanting to replace latest module I added bellin13's .php fix to my paypal code. I have been waiting for a order to see if it worked and today I got one. It worked as it should have been working all along. Problem taking care of, again thanks guys for taking the time to help.

 

 

 

 

 

Wayne 

 

Link to comment
Share on other sites

  • 8 months later...

I've been banging my head on a wall for a couple of days now over this *tiny* issue. I am a little disappointed with how poor the code is for this module. Proper code would check if the site is using friendly URLs and compensate. What can I expect, you use cheap software, you get cheap software.

 

When will developers fix this issue and release an updated module? This seems to be a big problem. At least, the module page should have a warning on it.  <_<

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...