Skip to content

Commit

Permalink
Record total not base
Browse files Browse the repository at this point in the history
  • Loading branch information
ashtarcommunications committed Nov 21, 2023
1 parent 6ebfa66 commit 6972751
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions api/controllers/user/enter/processAuthorizeNet.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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(),
Expand Down

0 comments on commit 6972751

Please sign in to comment.