From 0dd14b7d265faef13ab4a675f4e4096a70cd8689 Mon Sep 17 00:00:00 2001 From: Vaibhav Pandey Date: Wed, 19 Jun 2024 10:45:50 +0530 Subject: [PATCH] Perform actual cancellation. --- routes/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/index.js b/routes/index.js index 43227ae..c98c00a 100644 --- a/routes/index.js +++ b/routes/index.js @@ -56,8 +56,8 @@ router.post("/cancel", async function (req, res, next) { try { const result = await chargebee.subscription - // .cancel(subscriptionId, { end_of_term: true }) - .retrieve(subscriptionId) + .cancel(subscriptionId, { end_of_term: true }) + // .retrieve(subscriptionId) .request(); for (const action of postCancelActions) {