prodipdev
prodipdev

Reputation: 9

When redirect from SSLCommerz then success_url: pages can not showing content

when redirecting URL then showing this error

My server is nodeJS but when redirecting my specific pages from SSLCommerzsuccess_url: I can not show my pages when I hit the redirect URL manually and then show this page info;

Upvotes: 0

Views: 615

Answers (3)

Arafat Dayan
Arafat Dayan

Reputation: 1

I was facing a similar issue, here is how I fixed it.

  1. In your server create a POST request for the success URL. In my case, the route was: http://localhost:5000/payment/success.
  2. Now you must redirect to your client success route by using res.redirect() and put the URL there.
  3. Finally, update your SSLCommerz env or object setup where you are defining the success URL, put your server success post URL there, which was http://localhost:5000/payment/success for my server.

Example code:

app.post('payment/success', async (req, res) => {                
 res.redirect('http://{clientURL}/payment/invoice')
});

Code Flow: SSLCommerz will hit the success route in your server as a POST method and after that, it will redirect to your client success page.

Upvotes: 0

Sabbir
Sabbir

Reputation: 16

ssl commerz is making a post request to get the success route, we normally use get request to get a page, change the request to post for that page and it should work

Upvotes: 0

rkbi
rkbi

Reputation: 21

Not related to redirection or sslcommerz. You need to define a route which can serve the page at that URL.

Upvotes: 0

Related Questions