npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@trustpayments/3ds-sdk-js

v1.2.629

Published

This package is for internal purposes only.

Readme

3DS SDK JS

Warning!

This package is for internal purposes only.

Config

  • challengeDisplayMode - POPUP | INLINE. Default: POPUP

  • challengeDisplayInlineTargetElementId - string. Default: undefined.Must be the existing DOM Element when using challengeDisplayMode = INLINE.

  • loggingLevel - ERROR | ALL. Default: ERROR

  • translations - {cancel: string; }. Default: { cancel: 'X' }

  • processingScreenMode - OVERLAY | ATTACH_TO_ELEMENT. Default: OVERLAY ATTACH_TO_ELEMENT requires additional property processingScreenWrapperElementId

  • processingScreenWrapperElementId - string. Default: undefinedMust be the existing DOM Element when using processingScreenMode = ATTACH_TO_ELEMENT.

  • threeDSMethodTimeout - number. Default: 10000 (milliseconds)Timeout after which 3DS Method will be resolved with UNCOMPLETED result. The value is validated against the range of 1-10000 milliseconds.

API

init$()

Initializes the library and returns the Observable with the config.

init$(config: IConfigInterface): Observable<IConfigInterface | never>;

Default values for config are: challengeDisplayMode = ChallengeDisplayMode.POPUP loggingLevel: LoggingLevel.ERROR

interface IConfigInterface {
  challengeDisplayMode?: ChallengeDisplayMode;
  challengeDisplayInlineTargetElementId?: string;
  loggingLevel?: LoggingLevel;
}

enum ChallengeDisplayMode {
  POPUP = "POPUP",
  INLINE = "INLINE",
}

enum LoggingLevel {
  ERROR = "ERROR",
  ALL = "ALL",
}

run3DSMethod$()

Runs 3DS method and returns the result.

run3DSMethod$(transactionId: string, notificationURL: string, methodURL: string): Observable<IMethodURLResultInterface | never>;
interface IMethodURLResultInterface {
  status: ResultActionCode;
  description: string;
  transactionId: string;
}

enum ResultActionCode {
  SUCCESS = "SUCCESS",
  FAILURE = "FAILURE",
  ERROR = "ERROR",
  NOACTION = "NOACTION",
  CANCELLED = "CANCELLED",
  COMPLETED = "COMPLETED",
}

Possible ResultActionCode values are: SUCCESS, FAILURE, ERROR, and UNCOMPLETED. UNCOMPLETED timeout can be set via config property threeDSMethodTimeout. Default values is 10 seconds.

doChallenge$()

Initializes the challenge process. This method handles both versions 1.0.0 and 2.1.0 | 2.2.0. For version 1.0.0, termURL and merchantData parameters are required.

doChallenge$(
  version: ThreeDSecureVersion,
  threedpayload: string,
  challengeURL: string,
  termURL?: string,
  merchantData?: string,
): Observable<IChallengeResultInterface | never>;
export interface IChallengeResultInterface {
  status: ResultActionCode; // ResultActionCode is shared between challenge and method URL
  description: string;
  transactionId?: string;
  data?: string;
}

Possible ResultActionCode values are: SUCCESS, FAILURE, ERROR, CANCELLED, and COMPLETED.

getBrowserData()

  • getBrowserData() returns an object with the following interface:
interface IBrowserDataInterface {
  browserJavaEnabled: boolean;
  browserJavascriptEnabled: boolean;
  browserLanguage: string;
  browserScreenWidth: number;
  browserScreenHeight: number;
  browserColorDepth: number;
  browserUserAgent: string;
  browserTZ: number; // in minutes
}

showProcessingScreen()

  • showProcessingScreen(cardType: CardType) displays processing screen with predefined mode property processingScreenMode and optional processingScreenWrapperElementId.
export enum CardType {
  MASTER_CARD = "MASTERCARD",
  VISA = "VISA",
}

hideProcessingScreen()

  • hideProcessingScreen() hides processing screen.