From 489ebae26d8ccd23c1e98ac190b6e3eea4a9c425 Mon Sep 17 00:00:00 2001 From: gil Date: Tue, 1 Oct 2024 10:51:33 -0700 Subject: [PATCH] Fix bug when preflightDeviceData is set to false --- lib/recurly/risk/three-d-secure/three-d-secure.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/recurly/risk/three-d-secure/three-d-secure.js b/lib/recurly/risk/three-d-secure/three-d-secure.js index 75fb2187..7b734a57 100644 --- a/lib/recurly/risk/three-d-secure/three-d-secure.js +++ b/lib/recurly/risk/three-d-secure/three-d-secure.js @@ -106,8 +106,9 @@ export class ThreeDSecure extends RiskConcern { const { gateway_code } = result.params; const strategy = ThreeDSecure.getStrategyForGatewayType(gatewayType); return strategy.preflight({ recurly, number, month, year, cvv, ...result.params }) - .then(({ results, tokenType }) => { - // return finishedPreflights.concat([{ processor: type, gateway_code, results}]); + .then((preflightResponse) => { + if (!preflightResponse) return finishedPreflights; + const { results, tokenType } = preflightResponse return { tokenType: finishedPreflights.tokenType || tokenType, risk: finishedPreflights.risk.concat({