@getopenpay/openpay-js 0.5.26-alpha.b27533a → 0.5.26

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.
@@ -1,4 +1,4 @@
1
- import { A as r, b as e, B as o, a as p, C as S, F as n, N as c, P as l, R as m, d as t, S as d, e as i, c as P, T as B } from "./SimpleSpanProcessor-Wdf_4dSN.js";
1
+ import { A as r, b as e, B as o, a as p, C as S, F as n, N as c, P as l, R as m, d as t, S as d, e as i, c as P, T as B } from "./SimpleSpanProcessor-DagNFW8g.js";
2
2
  export {
3
3
  r as AlwaysOffSampler,
4
4
  e as AlwaysOnSampler,
@@ -1,4 +1,4 @@
1
- import { R as r, d as o } from "./Resource-BTI6WB7T.js";
1
+ import { R as r, d as o } from "./Resource-BXlXvD5t.js";
2
2
  export {
3
3
  r as Resource,
4
4
  o as defaultServiceName
@@ -1,7 +1,7 @@
1
- import { R as u } from "./index-oH6YuusY.js";
2
- import { B as c } from "./SimpleSpanProcessor-Wdf_4dSN.js";
3
- import { A as g, b as x, a as S, C as b, F as w, N as C, P, R as T, d as O, S as A, e as M, c as R, T as N } from "./SimpleSpanProcessor-Wdf_4dSN.js";
4
- import { P as E, a as F, b as j, g as k, h as W, p as I, s as D, c as G } from "./utils-DV10T3sw.js";
1
+ import { R as u } from "./index-CbMBRwSN.js";
2
+ import { B as c } from "./SimpleSpanProcessor-DagNFW8g.js";
3
+ import { A as g, b as x, a as S, C as b, F as w, N as C, P, R as T, d as O, S as A, e as M, c as R, T as N } from "./SimpleSpanProcessor-DagNFW8g.js";
4
+ import { P as E, a as F, b as j, g as k, h as W, p as I, s as D, c as G } from "./utils-DlkiZGi4.js";
5
5
  var l = function(n, r) {
6
6
  var e = typeof Symbol == "function" && n[Symbol.iterator];
7
7
  if (!e) return n;
@@ -1,8 +1,8 @@
1
- import { d as z } from "./diag-api-FVBEcpxz.js";
2
- import { b as G, c as I, d as W, e as X, p as _, i as V, f as K, g as Q, j as C, m as $, k as J, _ as T } from "./url-CA0iqkek.js";
3
- import { s as Y, i as Z, I as q } from "./utils-DQ0NI9P1.js";
4
- import { P as O, b as P, p as N, s as ee, g as te } from "./utils-DV10T3sw.js";
5
- import { t as x, a as p, S as re } from "./index-oH6YuusY.js";
1
+ import { d as z } from "./diag-api-CRPXOT67.js";
2
+ import { b as G, c as I, d as W, e as X, p as _, i as V, f as K, g as Q, j as C, m as $, k as J, _ as T } from "./url-BTFVacwR.js";
3
+ import { s as Y, i as Z, I as q } from "./utils-XvO-H4OV.js";
4
+ import { P as O, b as P, p as N, s as ee, g as te } from "./utils-DlkiZGi4.js";
5
+ import { t as x, a as p, S as re } from "./index-CbMBRwSN.js";
6
6
  var y;
7
7
  (function(a) {
8
8
  a.COMPONENT = "component", a.HTTP_ERROR_NAME = "http.error_name", a.HTTP_STATUS_TEXT = "http.status_text";
@@ -1,7 +1,7 @@
1
- import { m as v } from "./metrics-api-S56G7fxm.js";
2
- import { t as d } from "./index-oH6YuusY.js";
3
- import { l as f } from "./utils-DQ0NI9P1.js";
4
- import { I, i as p, s as h } from "./utils-DQ0NI9P1.js";
1
+ import { m as v } from "./metrics-api-CrYqR8FN.js";
2
+ import { t as d } from "./index-CbMBRwSN.js";
3
+ import { l as f } from "./utils-XvO-H4OV.js";
4
+ import { I, i as p, s as h } from "./utils-XvO-H4OV.js";
5
5
  function n(r, o, a, i) {
6
6
  for (var t = 0, s = r.length; t < s; t++) {
7
7
  var e = r[t];
package/dist/index.d.ts CHANGED
@@ -8,11 +8,21 @@ import { z } from 'zod';
8
8
 
9
9
  declare type AffirmFlowCustomParams = {
10
10
  processor?: PaymentProcessor;
11
+ /**
12
+ * Open the BNPL authorization page in a new tab instead of an iframe.
13
+ * The merchant page stays open, so `onCheckoutSuccess` / `onCheckoutError` still fire.
14
+ * Defaults to false to preserve the existing iframe flow.
15
+ */
11
16
  useRedirectFlow?: boolean;
12
17
  };
13
18
 
14
19
  declare type AfterpayFlowCustomParams = {
15
20
  processor?: PaymentProcessor;
21
+ /**
22
+ * Open the BNPL authorization page in a new tab instead of an iframe.
23
+ * The merchant page stays open, so `onCheckoutSuccess` / `onCheckoutError` still fire.
24
+ * Defaults to false to preserve the existing iframe flow.
25
+ */
16
26
  useRedirectFlow?: boolean;
17
27
  };
18
28
 
@@ -557,16 +567,19 @@ declare type InitOjsFlowResult = {
557
567
  declare type InitStripeAffirmFlowResult = {
558
568
  isAvailable: boolean;
559
569
  startFlow: (customParams?: AffirmFlowCustomParams) => Promise<void>;
570
+ abortFlow: () => void;
560
571
  };
561
572
 
562
573
  declare type InitStripeAfterpayFlowResult = {
563
574
  isAvailable: boolean;
564
575
  startFlow: (customParams?: AfterpayFlowCustomParams) => Promise<void>;
576
+ abortFlow: () => void;
565
577
  };
566
578
 
567
579
  declare type InitStripeKlarnaFlowResult = {
568
580
  isAvailable: boolean;
569
581
  startFlow: (customParams?: KlarnaFlowCustomParams) => Promise<void>;
582
+ abortFlow: () => void;
570
583
  };
571
584
 
572
585
  declare type InitStripeLinkFlowResult =
@@ -610,7 +623,8 @@ declare type KlarnaFlowCustomParams = {
610
623
  processor?: PaymentProcessor;
611
624
  isAnonymous?: boolean;
612
625
  /**
613
- * Redirect the top-level page for Stripe Klarna authorization.
626
+ * Open the BNPL authorization page in a new tab instead of an iframe.
627
+ * The merchant page stays open, so `onCheckoutSuccess` / `onCheckoutError` still fire.
614
628
  * Defaults to false to preserve the existing iframe flow.
615
629
  */
616
630
  useRedirectFlow?: boolean;
@@ -837,6 +851,11 @@ declare type OjsFlowParams<T_PARAMS = void, T_INIT_RESULT = void> = {
837
851
  * The result of the InitOjsFlow function.
838
852
  */
839
853
  initResult: T_INIT_RESULT;
854
+
855
+ /**
856
+ * Optional cancellation signal for flows that expose an explicit abort/reset controller.
857
+ */
858
+ abortSignal?: AbortSignal;
840
859
  };
841
860
 
842
861
  declare const OjsFlows = {
@@ -1062,6 +1081,7 @@ export declare class OpenPayForm {
1062
1081
  };
1063
1082
  private deviceToken;
1064
1083
  private isSubmitting;
1084
+ private activeGeneralSubmission;
1065
1085
  constructor(config: Config);
1066
1086
  /**
1067
1087
  * Starts the form initialization process
@@ -1110,6 +1130,8 @@ export declare class OpenPayForm {
1110
1130
  * Alias for submitCard
1111
1131
  */
1112
1132
  submit: (params?: CCSubmitParams) => Promise<void>;
1133
+ private isStripeBnplRedirectSubmission;
1134
+ private abortStripeBnplFlows;
1113
1135
  destroy: () => void;
1114
1136
  /**
1115
1137
  * Updates form callbacks after initialization
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E as p, F as r, O as i, l as s } from "./index-oH6YuusY.js";
1
+ import { E as p, F as r, O as i, l as s } from "./index-CbMBRwSN.js";
2
2
  import "penpal";
3
3
  import "uuid";
4
4
  import "zod";