From 6972751b62068b8b5d8a417532ef5563aafdb35d Mon Sep 17 00:00:00 2001 From: Aaron Hardy Date: Tue, 21 Nov 2023 10:49:13 -0700 Subject: [PATCH] Record total not base --- api/controllers/user/enter/processAuthorizeNet.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/controllers/user/enter/processAuthorizeNet.js b/api/controllers/user/enter/processAuthorizeNet.js index 8544700..91fb05b 100644 --- a/api/controllers/user/enter/processAuthorizeNet.js +++ b/api/controllers/user/enter/processAuthorizeNet.js @@ -113,9 +113,9 @@ export const processAuthorizeNet = { const ctrl = new APIControllers.CreateTransactionController(createRequest.getJSON()); // Defaults to sandbox - // if (process.env.NODE_ENV === 'production') { - // ctrl.setEnvironment(authorizenet.Constants.endpoint.production); - // } + if (process.env.NODE_ENV === 'production') { + ctrl.setEnvironment(authorizenet.Constants.endpoint.production); + } try { const result = await new Promise((resolve, reject) => { @@ -139,8 +139,8 @@ export const processAuthorizeNet = { debugLogger.info(`Successful Authorize.net transaction. ID: ${transactionId}, Response Code: ${responseCode}, Message Code: ${messageCode}, Description: ${description}`); const paymentObject = { - reason : `Authorize.net Payment from ${payerName} (${orderData.person_email}), transaction ID ${transactionId}`, - amount : parseFloat(orderData.base) * -1, + reason : `Authorize.net Payment #${transactionId} from ${payerName} (${orderData.person_email})`, + amount : parseFloat(total) * -1, school : orderData.school, payment : true, levied_at : new Date(),