Skip to content

Commit

Permalink
PP-11682 Update 3D secure controller
Browse files Browse the repository at this point in the history
- Update the controller to use Axios connector client.
  • Loading branch information
iqbalgds committed Jun 27, 2024
1 parent 02c46f3 commit cf95932
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controllers/three-d-secure.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const responseRouter = require('../utils/response-router')
const normalise = require('../services/normalise-charge')
const paths = require('../paths')
const { withAnalytics } = require('../utils/analytics')
const connectorClient = require('../services/clients/connector.client')
const connectorClient = require('../services/clients/connector-axios.client')

// Constants
const { views, threeDsEPDQResults } = require('../../config/charge.controller')
Expand Down Expand Up @@ -56,10 +56,10 @@ const build3dsPayload = (chargeId, req) => {
}

const handleThreeDsResponse = (req, res, charge) => response => {
switch (response.statusCode) {
switch (response.status) {
case 200:
case 400:
if (_.get(response, 'body.status', '') === 'AUTHORISATION 3DS REQUIRED') {
if (_.get(response, 'data.status', '') === 'AUTHORISATION 3DS REQUIRED') {
logger.info('3DS required again', getLoggingFields(req))
redirect(res).toAuth3dsRequired(charge.id)
} else {
Expand Down

0 comments on commit cf95932

Please sign in to comment.