I have a hosted payment page outside our wix website. when the payment is completed or canceled on the hosted page it should redirect back to the wix site. However, the redirect link takes you to a 403 forbidden error page. How do i fix this problem? I’ve tried everything. Please HELP!!!
Did you get an answer on this? I’m having the same issue
You can solve this issue using http-function
export function use_redirectToThank(request) {
let redirectOptions =
{
status : 301 ,
headers : {
Location : “URL where you want to redirect”
}
}
return response(redirectOptions)
}
Add this function in http-functions.js file and add below URL to the redirect link of your payment request.
baseURL of your site/_functions/redirectToThank/
This will resolve your issue.
Hello, tried on mine and no success @robinjamess or @wixcorvidexpert3880
Please help
this is the error i get
This www.homehelp247.co.uk page can’t be found
No webpage was found for the web address: https://www.homehelp247.co.uk/_functions/redirectToThank/
HTTP ERROR 404
This is the code:
export function use_redirectToThank ( request ) {
let redirectOptions =
{
status : 301 ,
headers : {
Location : “https://www.homehelp247.co.uk/thank-you”
}
}
return redirectOptions ;
}
This is the URL on the payment site.
https://www.homehelp247.co.uk/_functions/redirectToThank/
Are you using this function in http-functions.js in the backend?
Not working for me either , can some one help
I have the same problem. I tried using this f unction in HTTP-functions.js in the backend
saved the changes then published it.
export function use_redirectToThank(request) {
let redirectOptions =
{
status : 301,
headers : {
Location : "https://www.sdcollege.co.il/thanks"
}
}
return response(redirectOptions)
}
When I tried the URL to the redirect link I got the error message Http error 500 - this page isn’t working.
https://www.sdcollege.co.il/_functions/redirectToThank/
What have I done wrong?