Meteor - how to get response from payment REST API -


i'm implementing payu payment module in meteor app. flow works well, shows proper order view , redirects proper continueurl. in payu api there notifyurl , payu can send post request url if there change in order's status. when there is, example completed status should execute update in mongodb , change user's account type.

but don't have idea how make it. should make html file on meteor's server side? if it's possible link should pass in notifyurl make payu request pass html file?

did try http? package? this.

first add it.

meteor add http 

then create method this.

meteor.methods({   somemethodname: function() {     return http.call("post", "http://payuirl", {         data: {           idk "data",             stuff: json.stringify(myobject);         }       });   } }); 

and on client can create meteor.call on client.

meteor.call('somemethodname',function(erro,result){  if(error){    //show error   }else{    if(_.isequal(result.status,'status200'){       //run update here     }   } }); 

or can run update on server without meteor.methods , meteor.calls


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -