My call back url is coming as post request, but angular ui-route is not handling , how can i make my state should accept post request?

815 views Asked by At

Here is my route:

.state('payment-paytm', {
        parent: 'app',
        url: '/pricing/paytm_update',
        component: 'pricing',
        resolve: {
          data: function (PricingService,$stateParams) {
            return PricingService.paytm_update_status($stateParams);
          }
        }
      });

this route is not accepting post request coming from paytm call back.

paramList["CALLBACK_URL"] = "http://localhost:9000/pricing/paytm_update"

this is the url we configured in paytm, this is responding correctly but this post request am not able to handle in my angular.

2

There are 2 answers

1
Gaurav Srivastava On

I think angular will not be able to capture the post request coming from paytm.

you have to catch it from the server side language and post it to angular route.

for post parameters you could include it in the url ($stateParams) and then you could get the parameters in your angular controller.

0
Sreerag Mohan On

very first thing,paytm not support REST,so after you are making transaction,you have handle on backend url ( "http://localhost:9000/pricing/paytm_update").from there,use res.redirect("angular url/with paymentid").then by using that id you can display transaction details from your angular frontend