Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.get('/payments', function(req, res) {
- res.header("Access-Control-Allow-Origin", "*");
- res.header("Access-Control-Allow-Headers", "X-Requested-With");
- res.connection.setTimeout(0); // this could take a while
- res.writeHead(200, {
- 'Content-Type': 'text/event-stream',
- 'Connection': 'keep-alive',
- 'Cache-Control': 'no-cache',
- });
- ee.on("payment"+req.query.wallet, function (datoak) {
- res.write("data: "
- + JSON.stringify({'wallet': datoak.address, 'refund_address': datoak.refund_address,'payment_status': 'paid'})
- + "nn")
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement