Add support for Postback(webhooks)
sivamgr opened this issue · 4 comments
vividvilla commented
You can just run a simple web server which accepts the POST request and validates the checksum.
sivamgr commented
Agreed, the API user can run a webserver of his choice. Does it make sense to, have an helper API included in kiteconnect, to validate the POST content.
kc.validatePostback(content).then(r){
// content validated. add code to handle content here...
}
.catch(err){
//discard bad post-message
}
vividvilla commented
Yeah seems like a valid request. Will add it as a feature request.
vividvilla commented
Thanks for your feedback, it's added in version 1.2.2 - https://github.com/rainmattertech/kiteconnectjs/releases/tag/v1.2.2