How to get a POST request on an AngularJS page?

We created the AngularJS application, where the user opens the URL (xyz.com/booking), fills out forms, and then selects some items to buy.

After that, the user clicks the "BUY" button and leaves the site for the site of the payment gateway. Upon successful payment, Payment Gateway sends the user back by sending a POST request to the callback URL (xyz.com/booking-success).

Now the problem is that my corresponding Angular page that I configured for this callback URL does not open. I set up the xyz.com/booking-success page in RouteProvider, but this does not seem to work.

However, if I open the xyz.com/booking-success page directly through a browser, it will open.

How can I handle this scenario? Any help would be greatly appreciated.

+4
source share
1 answer
  • NgRoute URLs can’t be accessed via POST, if you corresponded to index.html, you just send your route to index.html, it doesn’t work when you set up / executed orders, and you POST ond that url via cURL you actual placement on index.html. Angular routing is just "virtual", not real. Systems like cURL or any other http client client see this, and so they send it to index.html.

  • // angular. angular , , . angular , - javascript, angular, , .

REST API HTTP 200, HTTP- , . (, skrill.com 10 HTTP200). angularjs 200, - index.html, , javascript.

  1. 1 , angular, redirect_url, URL-, / . callback-url - . URL- GET , .

"" callback_url ( api, sucesfull redirection_url, xyz.com/booking-success). . , . - callback. , , 10 , booking_id (, column is_processed (true | false), . false true, ( ). socket.io, , URL- .

+6

All Articles