PayPalPlugin icon indicating copy to clipboard operation
PayPalPlugin copied to clipboard

Redirect to homepage during checkout

Open bellu opened this issue 4 years ago • 3 comments

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

bellu avatar Jul 02 '21 11:07 bellu

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

SirDomin avatar Jul 02 '21 12:07 SirDomin

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.

bellu avatar Jul 02 '21 12:07 bellu

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)%'

FilippoTascaAtFiftyDeg avatar Sep 10 '21 05:09 FilippoTascaAtFiftyDeg