diff --git a/website/src/controllers/payments/amazon.js b/website/src/controllers/payments/amazon.js index 64ed4f4422..0bcdebd0dd 100644 --- a/website/src/controllers/payments/amazon.js +++ b/website/src/controllers/payments/amazon.js @@ -238,7 +238,13 @@ exports.subscribeCancel = function(req, res, next){ } }, function(err, results){ if (err) return next(err); // don't json this, let toString() handle errors - res.redirect('/'); + + if(req.query.noRedirect){ + res.send(200); + }else{ + res.redirect('/'); + } + user = null; }); }; \ No newline at end of file