Kris01's avatar

External page redirect back to my site

Hi, I'm working on the payment on an e-commerce. There is a method that creats an URL in which I need to redirect the user so he will go to an external page where he can proceed with the payment. There is a parameter, 'successUrl', in which the user after a successful payment should be returned, but nothing happens. Initially I thought that it might be because I was working local, but then I used ngrok to host the site, but still nothing happens. The service customer is s**t, so I thought I might ask here, maybe someone can help me.

0 likes
4 replies
Snapey's avatar
Snapey
Best Answer
Level 122

You shouldn't need ngrok if the redirect is done in the browser since your browser has access to your local site.

Check that you can open the successurl in your browser?

1 like
Kris01's avatar

@Snapey yes... it's literally my homepage. Just put it there to see if ti works. It si basically a transaction object, that contains besides all the info about the payment, a success and fail url. Before I redirect the use outside, I check inside this object and they are both set. So maybe something happens outside?

Kris01's avatar

@Snapey I use this way to redirect the user to the payment, maybe this is wrong?

        return redirect($redirectionUrl);
Kris01's avatar

@Snapey Problem solved. I read more carefully the documentation and I found the problem. Thanks for the help.

Please or to participate in this conversation.