@fat-zebra/sdk 2.1.2-beta.1 → 2.1.3-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to the Fat Zebra JS SDK will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.1.2] - 2026-06-17
9
+
10
+ ### Fixed
11
+
12
+ - Fixed a bug where the 3DS device data collection step could hang indefinitely due to an unexpected Cybersource payload format
13
+
8
14
  ## [2.1.0] - 2026-06-03
9
15
 
10
16
  > **Upgrade recommended.** This release fixes a critical issue where the React SDK could silently fall back to the legacy 3DS API, which is being decommissioned. Merchants should upgrade to avoid potential production failures.
@@ -4,6 +4,7 @@ type ShowChallengeIframeProps = {
4
4
  accessToken: string;
5
5
  cardToken: string;
6
6
  challengeWindowSize?: ChallengeWindowSize;
7
+ containerSelector?: string;
7
8
  };
8
9
  declare class ThreeDSecureChallengeWindow {
9
10
  static readonly displayName = "ThreeDSecureChallengeWindow";
@@ -14,7 +15,7 @@ declare class ThreeDSecureChallengeWindow {
14
15
  private static windowSizeToDims;
15
16
  private static ensureOverlay;
16
17
  static hide(): void;
17
- static showChallengeIframe({ stepUpUrl, accessToken, cardToken, challengeWindowSize, }: ShowChallengeIframeProps): void;
18
+ static showChallengeIframe({ stepUpUrl, accessToken, cardToken, challengeWindowSize, containerSelector, }: ShowChallengeIframeProps): void;
18
19
  private static reportChallengeIframeLoaded;
19
20
  private static reportChallengeIframeError;
20
21
  }
@@ -25,16 +25,25 @@ class ThreeDSecureChallengeWindow {
25
25
  return { width: 500, height: 600 };
26
26
  }
27
27
  }
28
- static ensureOverlay() {
28
+ static ensureOverlay(containerSelector) {
29
29
  let overlay = document.getElementById(ThreeDSecureChallengeWindow.OVERLAY_ID);
30
30
  let content = document.getElementById(ThreeDSecureChallengeWindow.CONTENT_ID);
31
31
  let frameWrap = document.getElementById(ThreeDSecureChallengeWindow.FRAME_WRAP_ID);
32
32
  if (overlay && content && frameWrap)
33
33
  return { overlay, content, frameWrap };
34
+ const container = containerSelector
35
+ ? document.querySelector(containerSelector)
36
+ : null;
37
+ if (container) {
38
+ // Ensure the container establishes a positioning context
39
+ if (getComputedStyle(container).position === "static") {
40
+ container.style.position = "relative";
41
+ }
42
+ }
34
43
  overlay = document.createElement("div");
35
44
  overlay.id = ThreeDSecureChallengeWindow.OVERLAY_ID;
36
45
  Object.assign(overlay.style, {
37
- position: "fixed",
46
+ position: container ? "absolute" : "fixed",
38
47
  inset: "0",
39
48
  background: "rgba(0,0,0,0.6)",
40
49
  display: "none",
@@ -73,7 +82,7 @@ class ThreeDSecureChallengeWindow {
73
82
  });
74
83
  content.appendChild(frameWrap);
75
84
  overlay.appendChild(content);
76
- document.body.appendChild(overlay);
85
+ (container !== null && container !== void 0 ? container : document.body).appendChild(overlay);
77
86
  return { overlay, content, frameWrap };
78
87
  }
79
88
  static hide() {
@@ -84,8 +93,8 @@ class ThreeDSecureChallengeWindow {
84
93
  if (frameWrap)
85
94
  frameWrap.innerHTML = "";
86
95
  }
87
- static showChallengeIframe({ stepUpUrl, accessToken, cardToken, challengeWindowSize, }) {
88
- const { overlay, content, frameWrap } = ThreeDSecureChallengeWindow.ensureOverlay();
96
+ static showChallengeIframe({ stepUpUrl, accessToken, cardToken, challengeWindowSize, containerSelector, }) {
97
+ const { overlay, content, frameWrap } = ThreeDSecureChallengeWindow.ensureOverlay(containerSelector);
89
98
  const dims = ThreeDSecureChallengeWindow.windowSizeToDims(challengeWindowSize);
90
99
  // Reset any previous sizing
91
100
  Object.assign(overlay.style, {
@@ -190,6 +199,7 @@ __decorate([
190
199
  card_token: params.cardToken,
191
200
  challenge_window_size: params.challengeWindowSize,
192
201
  step_up_url: params.stepUpUrl,
202
+ container_selector: params.containerSelector,
193
203
  },
194
204
  ];
195
205
  },
package/dist/version.js CHANGED
@@ -1,6 +1,6 @@
1
- /*! fatzebra-sdk-commit: 1b09b7f09dc61eb5ac900a9ae3604f704a7befcb */
1
+ /*! fatzebra-sdk-commit: 3353d28c822e8215f058488ab099bf1456d8c210 */
2
2
  export const version = '1.5.9';
3
3
  // Placeholder replaced at build time by .github/scripts/stamp-version.js with the
4
4
  // deployed commit hash (`git rev-parse HEAD`). Stays as the placeholder for builds
5
5
  // that don't run the stamp step (e.g. local/package builds).
6
- export const commitHash = '1b09b7f09dc61eb5ac900a9ae3604f704a7befcb';
6
+ export const commitHash = '3353d28c822e8215f058488ab099bf1456d8c210';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fat-zebra/sdk",
3
- "version": "2.1.2-beta.1",
3
+ "version": "2.1.3-beta.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {