Sylius/PayPalPlugin

Redirect to homepage during checkout

bellu opened this issue · 3 comments

bellu commented

Hi,

i'm testing on my local machine (using the docker containers included in the project), the paypal checkout.
The express checkout is working fine, but the normal one is keep redirecting me to the homepage: without any errors on the screen or in the logs.

After installing xdebug i found this:

{"token":"36b6a8","route":"payum_authorize_do","method":"GET","controller":{"class":"Payum\\Bundle\\PayumBundle\\Controller\\AuthorizeController","method":"doAction","file":"\/srv\/sylius\/vendor\/payum\/payum-bundle\/Controller\/AuthorizeController.php","line":9},"status_code":302,"status_text":"Found"}

I try to insert in that controller action anything: dump, die, exit.
But it seems that is never been called; there is something before i think.

Can someone help me?

Thanks

Hey, what do you mean with but the normal one?

bellu commented

Hi Sir, the normal steps checkout.

In the meantime i found the issue; my website has only one lang defined it_IT, but in the services.yaml there was:

parameters:
    locale: en_US

I know that this could seem a noob error, but i didn't find even a log for the redirect.

Hi @bellu , I had a similar problem during the very first deploy to staging since I setted up Sylius with a different locale code.
I suggest to move that config into the .env file:

.env:
APP_DEFAULT_LANG='en_US'

config/services.yaml

parameters:
    locale: '%env(APP_DEFAULT_LANG)%'