Amir Doreh
Amir Doreh

Reputation: 1439

405 HTTP error after being redirected from payment gateway

enter image description here

we are using Vercel for making development fast . in our react app , after payment page when payment redirect to our given url it gives 405 http error, how can we handle this?

Upvotes: 1

Views: 1156

Answers (2)

sultan
sultan

Reputation: 9

This error happens when your page does not use next js serverside rendering. I had same issue but solved it by converting the page from a static page to a server rendered page using getServerSideProps

Upvotes: 0

Amir Doreh
Amir Doreh

Reputation: 1439

I finally found the problem , it is coming from PayTabs's side followings are the logic they are handling wrong:

enter image description here

  1. when nothing is received from callback url , they should not redirect us with given redirect url
  2. when we are giving an invalid callback url it make a GET request to given redirect url
  3. when we are giving an valid callback url which returns 200 to them it make a POST request to given redirect url which is not supported by browser.

Upvotes: 0

Related Questions