express-braintree-webhooks

Tools for handling popups
Getting Started
Install the module with: npm install popup-tools
var popupTools = require('popup-tools');
popupTools.popup('/popup-url.html', 'My Popup', { width: 400, height: 100 }, function (err) {
}));
popupTools.popupWithPost('/some-form-submit', { data: 'some data' }, 'My Form', { width: 400, height: 100 }, function (err) {
});
Data reponse
You can also send data back from the popup to the server
var popupTools = require('popup-tools');
app.get('/postback', function (req, res) {
res.send(popupTools.popupResponse({ some_data: 'data' }));
});
var popupTools = require('popup-tools');
popupTools.popup('/postback', 'My Popup', { width: 400, height: 100 }, function (err, data) {
if (err) {
} else {
console.log(data)
}
});
License
Copyright (c) 2016 Enhancv
Licensed under the MIT license.