Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle 3DS success = false scenario for CardFields #98

Merged
merged 7 commits into from May 24, 2024

Conversation

mchoun
Copy link
Contributor

@mchoun mchoun commented Apr 29, 2024

The situation

Currently, the 3DS component will check the response from helios to see if the error object is null or if the result.success property is false. If either of these scenarios are true, then the onError callback will be trigger. Otherwise, the results will be returned to the onSuccess callback.

The problem

This logic does not align with the 3DS response logic for the HostedFields. In the HostedFields, the response data will still be returned if result.success property is false. In order to bring CardFields to parity with the HostedFields, the logic must only trigger the onError callback if the error object is not null.

Since this component is shared between different payment flows, this logic must only be in place if the payment flow is through the CardFields.

Proposed solution

The inline guest checkout (BCDC) currently passes userType as BRANDED_GUEST. The proposed solution is to pass userType as 'UNBRANDED_GUEST' from the CardFields component to the 3DS component which will modify the error checking logic.

Screenshots

isCardFieldFlow is true since UNBRANDED_GUEST was passed. success = true and no error was thrown.
image

isCardFieldFlow is true since UNBRANDED_GUEST was passed. success = false and no error was thrown.
image

isCardFieldFlow is false since UNBRANDED_GUEST was NOT passed. success = false and error was thrown.
image

Related PRs and Links

scnw - #672
JIRA ticket - DTPPCPSDK-2207

@mchoun mchoun changed the title wip: remove onError call when 3DSecure success response is false handle 3DS success = false scenario for CardFields May 6, 2024
@mchoun mchoun marked this pull request as ready for review May 6, 2024 20:36
@mchoun mchoun requested a review from a team as a code owner May 6, 2024 20:36
@mchoun mchoun force-pushed the DTPPCPSDK-2207-3ds-success branch from 8aedc37 to f34f495 Compare May 7, 2024 20:29
@mchoun mchoun merged commit c5c239a into main May 24, 2024
2 checks passed
@mchoun mchoun deleted the DTPPCPSDK-2207-3ds-success branch May 24, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants