flintn-checkout 0.0.2 → 0.0.3

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/dist/index.d.mts CHANGED
@@ -11,7 +11,6 @@ declare const EventType: {
11
11
  type TEventType = (typeof EventType)[keyof typeof EventType];
12
12
  interface FlintNConfig {
13
13
  clientSessionId: string;
14
- maxWidth?: string;
15
14
  isCardHolderRequired?: boolean;
16
15
  successRedirectUrl?: string;
17
16
  }
package/dist/index.d.ts CHANGED
@@ -11,7 +11,6 @@ declare const EventType: {
11
11
  type TEventType = (typeof EventType)[keyof typeof EventType];
12
12
  interface FlintNConfig {
13
13
  clientSessionId: string;
14
- maxWidth?: string;
15
14
  isCardHolderRequired?: boolean;
16
15
  successRedirectUrl?: string;
17
16
  }
package/dist/index.js CHANGED
@@ -55,7 +55,9 @@ var parseOrigin = (origin) => {
55
55
  }
56
56
  };
57
57
  var buildIframeSrc = (origin) => {
58
- return parseOrigin(origin) + "/";
58
+ const parsed = parseOrigin(origin);
59
+ if (parsed.includes("localhost")) return parsed + "/";
60
+ return parsed + "/iframe/";
59
61
  };
60
62
  var createIframeElement = (src) => {
61
63
  const iframe = document.createElement("iframe");
@@ -63,7 +65,7 @@ var createIframeElement = (src) => {
63
65
  iframe.title = "FlintN Checkout";
64
66
  iframe.style.cssText = "width: 100%; height: 100%; border: none;";
65
67
  iframe.setAttribute("sandbox", "allow-scripts allow-forms allow-popups allow-same-origin");
66
- iframe.setAttribute("allow", "payment; clipboard-write");
68
+ iframe.setAttribute("allow", "payment *; clipboard-write");
67
69
  return iframe;
68
70
  };
69
71
  var validateConfig = (config) => {
@@ -77,7 +79,7 @@ var sanitizeToken = (token) => {
77
79
  };
78
80
 
79
81
  // src/flintn-payment.ts
80
- var DEFAULT_ORIGIN = "https://pay.flintn.com/iframe";
82
+ var DEFAULT_ORIGIN = "https://pay.flintn.com";
81
83
  var FlintNPayment = class {
82
84
  constructor(options) {
83
85
  this.iframe = null;
package/dist/index.mjs CHANGED
@@ -23,7 +23,9 @@ var parseOrigin = (origin) => {
23
23
  }
24
24
  };
25
25
  var buildIframeSrc = (origin) => {
26
- return parseOrigin(origin) + "/";
26
+ const parsed = parseOrigin(origin);
27
+ if (parsed.includes("localhost")) return parsed + "/";
28
+ return parsed + "/iframe/";
27
29
  };
28
30
  var createIframeElement = (src) => {
29
31
  const iframe = document.createElement("iframe");
@@ -31,7 +33,7 @@ var createIframeElement = (src) => {
31
33
  iframe.title = "FlintN Checkout";
32
34
  iframe.style.cssText = "width: 100%; height: 100%; border: none;";
33
35
  iframe.setAttribute("sandbox", "allow-scripts allow-forms allow-popups allow-same-origin");
34
- iframe.setAttribute("allow", "payment; clipboard-write");
36
+ iframe.setAttribute("allow", "payment *; clipboard-write");
35
37
  return iframe;
36
38
  };
37
39
  var validateConfig = (config) => {
@@ -45,7 +47,7 @@ var sanitizeToken = (token) => {
45
47
  };
46
48
 
47
49
  // src/flintn-payment.ts
48
- var DEFAULT_ORIGIN = "https://pay.flintn.com/iframe";
50
+ var DEFAULT_ORIGIN = "https://pay.flintn.com";
49
51
  var FlintNPayment = class {
50
52
  constructor(options) {
51
53
  this.iframe = null;
package/dist/react.d.mts CHANGED
@@ -11,7 +11,6 @@ declare const EventType: {
11
11
  type TEventType = (typeof EventType)[keyof typeof EventType];
12
12
  interface FlintNConfig {
13
13
  clientSessionId: string;
14
- maxWidth?: string;
15
14
  isCardHolderRequired?: boolean;
16
15
  successRedirectUrl?: string;
17
16
  }
package/dist/react.d.ts CHANGED
@@ -11,7 +11,6 @@ declare const EventType: {
11
11
  type TEventType = (typeof EventType)[keyof typeof EventType];
12
12
  interface FlintNConfig {
13
13
  clientSessionId: string;
14
- maxWidth?: string;
15
14
  isCardHolderRequired?: boolean;
16
15
  successRedirectUrl?: string;
17
16
  }
package/dist/react.js CHANGED
@@ -53,7 +53,9 @@ var parseOrigin = (origin) => {
53
53
  }
54
54
  };
55
55
  var buildIframeSrc = (origin) => {
56
- return parseOrigin(origin) + "/";
56
+ const parsed = parseOrigin(origin);
57
+ if (parsed.includes("localhost")) return parsed + "/";
58
+ return parsed + "/iframe/";
57
59
  };
58
60
  var createIframeElement = (src) => {
59
61
  const iframe = document.createElement("iframe");
@@ -61,7 +63,7 @@ var createIframeElement = (src) => {
61
63
  iframe.title = "FlintN Checkout";
62
64
  iframe.style.cssText = "width: 100%; height: 100%; border: none;";
63
65
  iframe.setAttribute("sandbox", "allow-scripts allow-forms allow-popups allow-same-origin");
64
- iframe.setAttribute("allow", "payment; clipboard-write");
66
+ iframe.setAttribute("allow", "payment *; clipboard-write");
65
67
  return iframe;
66
68
  };
67
69
  var validateConfig = (config) => {
@@ -75,7 +77,7 @@ var sanitizeToken = (token) => {
75
77
  };
76
78
 
77
79
  // src/flintn-payment.ts
78
- var DEFAULT_ORIGIN = "https://pay.flintn.com/iframe";
80
+ var DEFAULT_ORIGIN = "https://pay.flintn.com";
79
81
  var FlintNPayment = class {
80
82
  constructor(options) {
81
83
  this.iframe = null;
package/dist/react.mjs CHANGED
@@ -26,7 +26,9 @@ var parseOrigin = (origin) => {
26
26
  }
27
27
  };
28
28
  var buildIframeSrc = (origin) => {
29
- return parseOrigin(origin) + "/";
29
+ const parsed = parseOrigin(origin);
30
+ if (parsed.includes("localhost")) return parsed + "/";
31
+ return parsed + "/iframe/";
30
32
  };
31
33
  var createIframeElement = (src) => {
32
34
  const iframe = document.createElement("iframe");
@@ -34,7 +36,7 @@ var createIframeElement = (src) => {
34
36
  iframe.title = "FlintN Checkout";
35
37
  iframe.style.cssText = "width: 100%; height: 100%; border: none;";
36
38
  iframe.setAttribute("sandbox", "allow-scripts allow-forms allow-popups allow-same-origin");
37
- iframe.setAttribute("allow", "payment; clipboard-write");
39
+ iframe.setAttribute("allow", "payment *; clipboard-write");
38
40
  return iframe;
39
41
  };
40
42
  var validateConfig = (config) => {
@@ -48,7 +50,7 @@ var sanitizeToken = (token) => {
48
50
  };
49
51
 
50
52
  // src/flintn-payment.ts
51
- var DEFAULT_ORIGIN = "https://pay.flintn.com/iframe";
53
+ var DEFAULT_ORIGIN = "https://pay.flintn.com";
52
54
  var FlintNPayment = class {
53
55
  constructor(options) {
54
56
  this.iframe = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flintn-checkout",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "FlintN Payment SDK — drop-in iframe checkout for card payments and wallets with localization and theming.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",