3ds2 Error Helper missing exception catch all

Created on 14 August 2023, about 1 year ago

Problem/Motivation

In Braintree3DSReview->validatePaneForm, When the result is returned, it is processed by ErrorHelper::handleErrors3ds.

If liabilityShifted === TRUE, the code short circuits, as this indicates a successful result.

Otherwise, several specific checks are made and an exception is thrown.

There is no final throw, though, so if a result indicates $result->liabilityShiftPossible === FALSE, this error condition is silently ignored, putting us in an indeterminate state.

Let's at least return a SoftDeclineException here.

As a future enhancement, we could handle each of the ~18 different status that return $result->liabilityShiftPossible === FALSE.

While some should still be SoftDeclineException, others should be a HardDeclineException. In one case, it should potentially be treated as a valid transaction. (That specific case is when the seller has configured a skip rule, this accepting liability.)

Steps to reproduce

1. Using the appropriate test card, perform a 3ds2 transaction that will return $result->liabilityShiftPossible === FALSE && $result->liabilityShifted === FALSE
It should throw an exception. Instead, it silently continues, possibly processing the payment with no liability shift.

Proposed resolution

Add a catch all exception, rather than a catch all pass through.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States TomTech

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024