how to redirect to external web-page after successful payment?
up vote
0
down vote
favorite
I am using easy pay gateway for payment. After successful payment easy pay sends a response to my rest-api in express JS.
Now after verifying information in backend, I want to redirect to front-end page.
I used
res.redirect('https://front-end-url');
But it says not found.
I want to know if I do res.redirect() whats happens in browser. Did browser automatically redirect to webpage or client handles res.redirect() ?
node.js express url-redirection
add a comment |
up vote
0
down vote
favorite
I am using easy pay gateway for payment. After successful payment easy pay sends a response to my rest-api in express JS.
Now after verifying information in backend, I want to redirect to front-end page.
I used
res.redirect('https://front-end-url');
But it says not found.
I want to know if I do res.redirect() whats happens in browser. Did browser automatically redirect to webpage or client handles res.redirect() ?
node.js express url-redirection
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am using easy pay gateway for payment. After successful payment easy pay sends a response to my rest-api in express JS.
Now after verifying information in backend, I want to redirect to front-end page.
I used
res.redirect('https://front-end-url');
But it says not found.
I want to know if I do res.redirect() whats happens in browser. Did browser automatically redirect to webpage or client handles res.redirect() ?
node.js express url-redirection
I am using easy pay gateway for payment. After successful payment easy pay sends a response to my rest-api in express JS.
Now after verifying information in backend, I want to redirect to front-end page.
I used
res.redirect('https://front-end-url');
But it says not found.
I want to know if I do res.redirect() whats happens in browser. Did browser automatically redirect to webpage or client handles res.redirect() ?
node.js express url-redirection
node.js express url-redirection
asked 2 days ago
aya_cool
174
174
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
When you write res.redirect()
the response to the client will be a 302 with the link to redirect.
This is the standard way to redirect a user, but what will happen in the client depends of the client it is using.
All common browsers will follow the 302 with the new endpoint and move the user to this page, but if the user is using an odd browser or anything like that, you should not be worried about it, the user can decide that he doesn't want to follow redirects or anything like and this is fine, he probably knows what he is doing.
The server should always follow the standard way :)
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
When you write res.redirect()
the response to the client will be a 302 with the link to redirect.
This is the standard way to redirect a user, but what will happen in the client depends of the client it is using.
All common browsers will follow the 302 with the new endpoint and move the user to this page, but if the user is using an odd browser or anything like that, you should not be worried about it, the user can decide that he doesn't want to follow redirects or anything like and this is fine, he probably knows what he is doing.
The server should always follow the standard way :)
add a comment |
up vote
0
down vote
When you write res.redirect()
the response to the client will be a 302 with the link to redirect.
This is the standard way to redirect a user, but what will happen in the client depends of the client it is using.
All common browsers will follow the 302 with the new endpoint and move the user to this page, but if the user is using an odd browser or anything like that, you should not be worried about it, the user can decide that he doesn't want to follow redirects or anything like and this is fine, he probably knows what he is doing.
The server should always follow the standard way :)
add a comment |
up vote
0
down vote
up vote
0
down vote
When you write res.redirect()
the response to the client will be a 302 with the link to redirect.
This is the standard way to redirect a user, but what will happen in the client depends of the client it is using.
All common browsers will follow the 302 with the new endpoint and move the user to this page, but if the user is using an odd browser or anything like that, you should not be worried about it, the user can decide that he doesn't want to follow redirects or anything like and this is fine, he probably knows what he is doing.
The server should always follow the standard way :)
When you write res.redirect()
the response to the client will be a 302 with the link to redirect.
This is the standard way to redirect a user, but what will happen in the client depends of the client it is using.
All common browsers will follow the 302 with the new endpoint and move the user to this page, but if the user is using an odd browser or anything like that, you should not be worried about it, the user can decide that he doesn't want to follow redirects or anything like and this is fine, he probably knows what he is doing.
The server should always follow the standard way :)
answered 2 days ago
jonathanrz
2,09241939
2,09241939
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53238290%2fhow-to-redirect-to-external-web-page-after-successful-payment%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password