From 161be3075d8a8b97514d9bf24c5a6925797f4da5 Mon Sep 17 00:00:00 2001 From: Mark Moffat Date: Mon, 4 Nov 2019 17:09:05 +1030 Subject: [PATCH] Bugs in payment modules --- routes/payments/authorizenet.js | 2 +- routes/payments/stripe.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/payments/authorizenet.js b/routes/payments/authorizenet.js index 580c8e2..7f96275 100644 --- a/routes/payments/authorizenet.js +++ b/routes/payments/authorizenet.js @@ -82,7 +82,7 @@ router.post('/checkout_action', (req, res, next) => { } // get the new ID - const newId = newDoc.insertedIds['0']; + const newId = newDoc.insertedId; // add to lunr index indexOrders(req.app) diff --git a/routes/payments/stripe.js b/routes/payments/stripe.js index 77623e8..c194f72 100644 --- a/routes/payments/stripe.js +++ b/routes/payments/stripe.js @@ -62,7 +62,7 @@ router.post('/checkout_action', (req, res, next) => { } // get the new ID - const newId = newDoc.insertedIds['0']; + const newId = newDoc.insertedId; // add to lunr index indexOrders(req.app)