I am trying to migrate to another payment service and have trouble doing it with my Node.js server. The previous payment service worked with REST API and I had no problem with that as I've used it a lot in my work but this one is something completely different.How I succeeded sending XML request to server:I used this package: http://ift.tt/2i3gm8Y form = new FormData(); form.append("key", "value"); form.submit('https://foo.bar', function(err, response) { if (err) console.log(err); console.log(response); }); and that somewhat works. I get a response. However I don't get any data out of the response as what I think the problem is I need to parse the response body.I tried bodyparser at the start but it's Github stated that it doesn't do multipart. I found couple other bodyparsers such as multer and busboy but can't get them to work as the examples they give are mostly for file transfer and not related to what I'm doing.Here is a working example on PHP if it helps: http://ift.tt/2hLeZy8 I personally don't know any PHP so it didn't help me at all :/Can someone give me any tips?
Submitted January 02, 2017 at 09:08PM by Molehole
No comments:
Post a Comment