Search code examples
reactjshttp-redirectserverpayment-gatewaypaytabs

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?


Solution

  • 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.