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

feature(3DS): Implement show method and return response with enriched nonce #2452

Open
wants to merge 66 commits into
base: main
Choose a base branch
from

Conversation

siddy2181
Copy link
Contributor

@siddy2181 siddy2181 commented Nov 8, 2024

Description

The ThreeDomainSecureClient component provides a method to the merchant to display the 3DS challenge to the buyer if the response from the isEligible method is true. After the buyer has completed the 3DS challenge, the liabilityShift, authenticationState, and anonce with enriched 3DS data will be returned to the merchant.

Code Sample:

const submitButton = document.getElementById("submit-button");

submitButton.addEventListener("click", async () => {
  if (isThreeDomainSecureEligible) {
    const {
      liabilityShift, // "no", "unknown", "possible"
      authenticationState, // "succeeded", "cancelled", "errored"
      nonce, //Enriched nonce or the original nonce
    } = await threeDomainSecureComponent.show();
    
    if (authenticationState === "succeeded") {
      // Check the liability shift and decide on continuing the transaction
    } else {
      // Cancelled or errored, merchant needs to decide what they want to check on
    }
  }
})

Why are we making these changes? Include references to any related Jira tasks or GitHub Issues

This PR covers the following tickets

DTPPCPSDK-2662
DTPPCPSDK-2665
DTPPCPSDK-2805
DTPPCPSDK-2855

❤️ Thank you!

@mchoun mchoun changed the title [test-only]Fastlane 3ds e2e feature(3DS): Implement show method and return response with enriched nonce Dec 6, 2024
__sdk__.js Outdated Show resolved Hide resolved
src/lib/security.js Outdated Show resolved Hide resolved
@siddy2181 siddy2181 dismissed a stale review December 11, 2024 00:12

Invalid review

@siddy2181 siddy2181 marked this pull request as ready for review December 12, 2024 18:21
@siddy2181 siddy2181 requested a review from a team as a code owner December 12, 2024 18:21
});
});

describe("three domain descure component - show method", () => {
test.todo("should return a zoid component", () => {
describe.todo("three domain descure component - show method", () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is still todo. is this intentional?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh wow i didn't know you could do that

tests, make show async
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants