From a4e0f03b7081a26b7957fd1c1a55bf9420e35c1a Mon Sep 17 00:00:00 2001 From: Mark Moffat Date: Sat, 15 Jun 2019 14:21:01 +0930 Subject: [PATCH] Linting --- routes/payments/authorizenet.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/routes/payments/authorizenet.js b/routes/payments/authorizenet.js index 263668e..9c2082d 100644 --- a/routes/payments/authorizenet.js +++ b/routes/payments/authorizenet.js @@ -34,7 +34,7 @@ router.post('/checkout_action', (req, res, next) => { } }; - axios.post(authorizeUrl, chargeJson, {responseType: 'text'}) + axios.post(authorizeUrl, chargeJson, { responseType: 'text' }) .then((response) => { // This is crazy but the Authorize.net API returns a string with BOM and totally // screws the JSON response being parsed. So many hours wasted! @@ -43,7 +43,7 @@ router.post('/checkout_action', (req, res, next) => { if(!txn){ console.log('Declined request payload', chargeJson); console.log('Declined response payload', response.data); - res.status(400).json({err: 'Your payment has declined. Please try again'}); + res.status(400).json({ err: 'Your payment has declined. Please try again' }); return; } @@ -117,7 +117,7 @@ router.post('/checkout_action', (req, res, next) => { common.sendEmail(req.session.paymentEmailAddr, `Your payment with ${config.cartTitle}`, common.getEmailTemplate(paymentResults)); // redirect to outcome - res.status(200).json({orderId: newId}); + res.status(200).json({ orderId: newId }); }else{ // redirect to failure req.session.messageType = 'danger'; @@ -125,14 +125,14 @@ router.post('/checkout_action', (req, res, next) => { req.session.paymentApproved = false; req.session.paymentDetails = `

Order ID: ${newId}

Transaction ID: ${txn.transHash}

`; - res.status(400).json({err: true, orderId: newId}); + res.status(400).json({ err: true, orderId: newId }); } }); }); }) .catch((err) => { console.log('Error sending payment to API', err); - res.status(400).json({err: 'Your payment has declined. Please try again'}); + res.status(400).json({ err: 'Your payment has declined. Please try again' }); }); });