@payfurl/client 4.6.7 → 4.6.10

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.
Files changed (40) hide show
  1. package/README.md +30 -84
  2. package/dist/sdk/{CxPayThreeDsProvider-a2eeb8b0.mjs → CxPayThreeDsProvider-c6c31df8.mjs} +3 -3
  3. package/dist/sdk/{DefaultThreeDsProvider-4a202d3c.mjs → DefaultThreeDsProvider-30fe2dc5.mjs} +1 -1
  4. package/dist/sdk/{EcentricThreeDsProvider-c9ebfd28.mjs → EcentricThreeDsProvider-f2dcdf2d.mjs} +2 -2
  5. package/dist/sdk/{EpnaThreeDsProvider-b4760ea1.mjs → EpnaThreeDsProvider-69f0fad2.mjs} +3 -3
  6. package/dist/sdk/{FlashBancThreeDsProvider-73f4bd12.mjs → FlashBancThreeDsProvider-a1699ce9.mjs} +3 -3
  7. package/dist/sdk/{GPaymentsThreeDsProvider-03ad4012.mjs → GPaymentsThreeDsProvider-d3c8c022.mjs} +2 -2
  8. package/dist/sdk/{MetricsGlobalThreeDsProvider-229dd8b8.mjs → MetricsGlobalThreeDsProvider-03343c8e.mjs} +2 -2
  9. package/dist/sdk/{NmiThreeDsProvider-712f174b.mjs → NmiThreeDsProvider-279949c2.mjs} +3 -3
  10. package/dist/sdk/{NuveiThreeDsProvider-879ffbe8.mjs → NuveiThreeDsProvider-dbfbdd13.mjs} +2 -2
  11. package/dist/sdk/PayGLocalThreeDsProvider-a54308f2.mjs +129 -0
  12. package/dist/sdk/{PayWayAppleButton-ee1b486d.mjs → PayWayAppleButton-8eccbdec.mjs} +24 -22
  13. package/dist/sdk/{PayabliThreeDsProvider-f597464b.mjs → PayabliThreeDsProvider-a1de3cc1.mjs} +3 -3
  14. package/dist/sdk/{SkyBankThreeDsProvider-2d93972d.mjs → SkyBankThreeDsProvider-7dd0d1d5.mjs} +3 -3
  15. package/dist/sdk/cxpay-b206b21b.mjs +10 -0
  16. package/dist/sdk/{default-ed7f86d7.mjs → default-2d455309.mjs} +2 -2
  17. package/dist/sdk/{ecentric-018fbf32.mjs → ecentric-6ba2a55a.mjs} +3 -3
  18. package/dist/sdk/epna-40fd7082.mjs +10 -0
  19. package/dist/sdk/flashbanc-c59aaac9.mjs +10 -0
  20. package/dist/sdk/{gpayments-dce831ae.mjs → gpayments-5cf21ca8.mjs} +3 -3
  21. package/dist/sdk/main-3c938063.mjs +10317 -0
  22. package/dist/sdk/{metrics_global-f877be44.mjs → metrics_global-17082fa4.mjs} +3 -3
  23. package/dist/sdk/nmi-9398c7c9.mjs +10 -0
  24. package/dist/sdk/{nuvei-e4ed3954.mjs → nuvei-fc89c78f.mjs} +3 -3
  25. package/dist/sdk/payabli-825ba7c2.mjs +10 -0
  26. package/dist/sdk/payfurl.es.js +1 -1
  27. package/dist/sdk/payfurl.umd.js +60 -47
  28. package/dist/sdk/payglocal-0edee5c3.mjs +9 -0
  29. package/dist/sdk/payway_rest-fd52b03f.mjs +8 -0
  30. package/dist/sdk/skybank-4e312562.mjs +10 -0
  31. package/dist/sdk/style.css +1 -1
  32. package/package.json +1 -1
  33. package/dist/sdk/cxpay-5bd1da18.mjs +0 -10
  34. package/dist/sdk/epna-eea9c1a1.mjs +0 -10
  35. package/dist/sdk/flashbanc-5c12c9ac.mjs +0 -10
  36. package/dist/sdk/main-84942d54.mjs +0 -10172
  37. package/dist/sdk/nmi-83071be9.mjs +0 -10
  38. package/dist/sdk/payabli-63710f0d.mjs +0 -10
  39. package/dist/sdk/payway_rest-f3fcbf1d.mjs +0 -8
  40. package/dist/sdk/skybank-921272d5.mjs +0 -10
package/README.md CHANGED
@@ -1,96 +1,42 @@
1
- # payFURL client SDK
1
+ # PayFURL Client SDK
2
2
 
3
- The Client SDK is used to securely collect payment details in the browser.
3
+ The Client SDK is used to securely collect payment details in the browser. It seamlessly integrates into your existing payment page.
4
4
 
5
- The Client SDK will seamlessly plug into your existing payment page.
6
- When it's initialised, it will securely load an iframe hosted by payFURL.
7
- The iframe will collect the payment details, which will then be submitted to payFURL and converted to a payment token.
8
- The payment token will be added as a hidden input to the form.
9
- In case of PayPal or Buy Now Pay Later payments the payment details will be converted to a transactionId.
10
- The transactionId will be added as a hidden input to the form.
11
- Collecting the payment details is triggered when the form is submitted.
5
+ When initialized, the SDK securely loads an iframe hosted by payFURL.
6
+ This iframe collects the payment details, which are then submitted to payFURL and converted to a payment token.
7
+ The payment token is added as a hidden input to the form. For PayPal or Buy Now Pay Later payments, the payment details are converted to a transactionId, which is also added as a hidden input to the form.
8
+ Payment detail collection is triggered when the form is submitted.
12
9
 
13
- ## Usage
14
-
15
- Read here:
16
- https://docs.payfurl.com/client_sdk/
17
-
18
- Your `readme.md` file looks fine, but I can provide some improvements in formatting and clarity. Here's a revised version:
19
-
20
-
21
- ## Test Environment
22
-
23
- ### Preparation
24
-
25
- 1. Create a file `src/sdk/config.local.ts` with the following content:
26
-
27
- ```typescript
28
- export default {
29
- baseUrl: "http://localhost:3001",
30
- cssUrl: "http://localhost:3001/dist/sdk/",
31
- url: "http://localhost:3001/dist/iframe/",
32
- apiUrl: "https://localhost:5001",
33
- redirectUrl: "http://localhost:3001/checkout/redirect.html",
34
- sentryUrl: "",
35
- };
36
- ```
37
- Sentry is disabled if `sentryUrl` value is empty.
38
-
39
- 2. Run the following commands in your project directory:
10
+ ## Installation
11
+ Use npm to install the PayFURL Client SDK:
40
12
 
41
- - `npm install`
42
- - `npm run server`
43
- - `npm run build-iframe`
44
- - `npm run build-sdk`
13
+ ```bash
14
+ npm install @payfurl/client-sdk
15
+ ```
45
16
 
46
- ### Initialization
17
+ Import the SDK into your application:
47
18
 
48
- `sdk.html` is a simple page that loads the SDK and displays the result of the payment. To initialize the SDK, locate the following method in the `sdk.html` file:
19
+ ```javascript
20
+ import payfurl from '@payfurl/client-sdk';
21
+ ```
49
22
 
50
- ```javascript
51
- const pf = payfurl.init(
52
- "local", // environment name
53
- "pubtestd8d074aceb5defec8f2d0b806292bf2b5f4179c69d-au", // public key
54
- true // enable debug mode
55
- );
56
- ```
57
-
58
- To run the SDK on your local machine, you need to have the corresponding API running in the local environment.
59
-
60
- ### Switching between Environments
61
-
62
- To switch between different environments, follow these steps:
63
-
64
- 1. Update all parameters in the file `src/sdk/config.{environment}.ts` with the proper values.
65
- 2. Run `npm run build-iframe`
66
- 3. Run `npm run build-sdk`
67
- 4. Change the environment name in the `payfurl.init` method.
68
- 5. Run the API in the corresponding environment.
69
-
70
- ### Using an External SDK
71
-
72
- If you want to use an external SDK, replace this line in your `sdk.html`:
73
-
74
- ```html
75
- <script type="text/javascript" src="dist/sdk/payfurl.umd.js?v=4975"></script>
76
- ```
77
-
78
- with the desired version of the external SDK, for example:
23
+ ## Usage
79
24
 
80
- ```html
81
- <script type="text/javascript" src="https://assets.payfurl.com/v4.5.3.294/js/payfurl.js?v=4959"></script>
82
- ```
25
+ To initialize the SDK, use the following code:
83
26
 
84
- Please note that <span style="color:red">**the external SDK cannot work with the local environment**</span>,
85
- so ensure that the environment name in the `payfurl.init` method is
86
- <span style="color:red">**NOT**</span> set to "local."
27
+ ```javascript
28
+ import payfurl from '@payfurl/client';
29
+ const pf = payfurl.init(
30
+ "sandbox", // environment name
31
+ "<public-key>", // your public key
32
+ true // enable debug mode
33
+ );
34
+ ```
87
35
 
88
- ### Running
89
- - open `http://localhost:3001/sdk.html` in your favorite browser
90
- - enjoy *
36
+ To create a drop-in UI:
91
37
 
92
- (* - optional)
38
+ ```javascript
39
+ pf.addDropIn('<id-of-div-container>', 20, 'AUD');
40
+ ```
93
41
 
94
- ### Analyzing size
95
- 1. Run `npm run build-sdk`
96
- 2. Open `stats.html`
42
+ For more thorough documentation, visit [the PayFURL Client SDK docs](https://docs.payfurl.com/client_sdk/).
@@ -1,6 +1,6 @@
1
- import { MetricsGlobalThreeDsProvider as r } from "./MetricsGlobalThreeDsProvider-229dd8b8.mjs";
2
- import "./DefaultThreeDsProvider-4a202d3c.mjs";
3
- import "./main-84942d54.mjs";
1
+ import { MetricsGlobalThreeDsProvider as r } from "./MetricsGlobalThreeDsProvider-03343c8e.mjs";
2
+ import "./DefaultThreeDsProvider-30fe2dc5.mjs";
3
+ import "./main-3c938063.mjs";
4
4
  class i extends r {
5
5
  getType() {
6
6
  return "CxPay";
@@ -1,7 +1,7 @@
1
1
  var D = Object.defineProperty;
2
2
  var u = (a, e, s) => e in a ? D(a, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : a[e] = s;
3
3
  var o = (a, e, s) => (u(a, typeof e != "symbol" ? e + "" : e, s), s);
4
- import { d as S, r as d, o as g, a as p, c as T, b as i, e as _, C as m, u as I, p as f, f as y, _ as A, j as v, T as C, h as E, F as R } from "./main-84942d54.mjs";
4
+ import { d as S, r as d, o as g, a as p, c as T, b as i, e as _, C as m, u as I, p as f, f as y, _ as A, j as v, T as C, h as E, F as R } from "./main-3c938063.mjs";
5
5
  const P = (a) => (f("data-v-c82daa22"), a = a(), y(), a), U = { class: "mask" }, $ = { class: "wrapper" }, L = { class: "container" }, b = /* @__PURE__ */ P(() => /* @__PURE__ */ i("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)), M = ["action"], w = ["value"], N = /* @__PURE__ */ S({
6
6
  __name: "ThreeDsChallenge",
7
7
  props: {
@@ -1,8 +1,8 @@
1
1
  var c = Object.defineProperty;
2
2
  var h = (t, s, e) => s in t ? c(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
3
3
  var i = (t, s, e) => (h(t, typeof s != "symbol" ? s + "" : s, e), e);
4
- import { DefaultThreeDsProvider as d } from "./DefaultThreeDsProvider-4a202d3c.mjs";
5
- import { d as p, r as u, o as _, a as D, c as m, b as r, e as g, C as S, u as y, p as f, f as T, _ as v, h as C } from "./main-84942d54.mjs";
4
+ import { DefaultThreeDsProvider as d } from "./DefaultThreeDsProvider-30fe2dc5.mjs";
5
+ import { d as p, r as u, o as _, a as D, c as m, b as r, e as g, C as S, u as y, p as f, f as T, _ as v, h as C } from "./main-3c938063.mjs";
6
6
  const I = (t) => (f("data-v-82a75009"), t = t(), T(), t), P = { class: "mask" }, A = { class: "wrapper" }, V = { class: "container" }, E = /* @__PURE__ */ I(() => /* @__PURE__ */ r("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)), $ = ["action"], k = ["value"], x = /* @__PURE__ */ p({
7
7
  __name: "ecentric",
8
8
  props: {
@@ -1,6 +1,6 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-229dd8b8.mjs";
2
- import "./DefaultThreeDsProvider-4a202d3c.mjs";
3
- import "./main-84942d54.mjs";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-03343c8e.mjs";
2
+ import "./DefaultThreeDsProvider-30fe2dc5.mjs";
3
+ import "./main-3c938063.mjs";
4
4
  class i extends e {
5
5
  getType() {
6
6
  return "EPNA";
@@ -1,6 +1,6 @@
1
- import { MetricsGlobalThreeDsProvider as r } from "./MetricsGlobalThreeDsProvider-229dd8b8.mjs";
2
- import "./DefaultThreeDsProvider-4a202d3c.mjs";
3
- import "./main-84942d54.mjs";
1
+ import { MetricsGlobalThreeDsProvider as r } from "./MetricsGlobalThreeDsProvider-03343c8e.mjs";
2
+ import "./DefaultThreeDsProvider-30fe2dc5.mjs";
3
+ import "./main-3c938063.mjs";
4
4
  class s extends r {
5
5
  getType() {
6
6
  return "FlashBanc";
@@ -1,8 +1,8 @@
1
1
  var i = Object.defineProperty;
2
2
  var l = (n, r, e) => r in n ? i(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
3
3
  var o = (n, r, e) => (l(n, typeof r != "symbol" ? r + "" : r, e), e);
4
- import { DefaultThreeDsProvider as c } from "./DefaultThreeDsProvider-4a202d3c.mjs";
5
- import { d as u, a as d, c as p, b as a, n as h, _, h as g } from "./main-84942d54.mjs";
4
+ import { DefaultThreeDsProvider as c } from "./DefaultThreeDsProvider-30fe2dc5.mjs";
5
+ import { d as u, a as d, c as p, b as a, n as h, _, h as g } from "./main-3c938063.mjs";
6
6
  const m = { class: "mask" }, D = { class: "wrapper" }, S = ["src"], y = /* @__PURE__ */ u({
7
7
  __name: "GPayments",
8
8
  props: {
@@ -1,8 +1,8 @@
1
1
  var S = Object.defineProperty;
2
2
  var w = (o, n, t) => n in o ? S(o, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[n] = t;
3
3
  var l = (o, n, t) => (w(o, typeof n != "symbol" ? n + "" : n, t), t);
4
- import { DefaultThreeDsProvider as P } from "./DefaultThreeDsProvider-4a202d3c.mjs";
5
- import { d as f, r as v, o as E, i as A, w as b, v as T, a as I, c as x, b as p, e as G, C as L, p as N, f as M, _ as $, j as H, s as g, h as k } from "./main-84942d54.mjs";
4
+ import { DefaultThreeDsProvider as P } from "./DefaultThreeDsProvider-30fe2dc5.mjs";
5
+ import { d as f, r as v, o as E, i as A, w as b, v as T, a as I, c as x, b as p, e as G, C as L, p as N, f as M, _ as $, j as H, s as g, h as k } from "./main-3c938063.mjs";
6
6
  const O = (o) => (N("data-v-8a0b6dcb"), o = o(), M(), o), j = { class: "mask" }, B = { class: "wrapper" }, F = { class: "container" }, U = /* @__PURE__ */ O(() => /* @__PURE__ */ p("div", { id: "ThreeDsChallengeIFrame" }, null, -1)), W = /* @__PURE__ */ f({
7
7
  __name: "MetricsGlobalThreeDsChallenge",
8
8
  emits: ["close", "submit"],
@@ -1,6 +1,6 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-229dd8b8.mjs";
2
- import "./DefaultThreeDsProvider-4a202d3c.mjs";
3
- import "./main-84942d54.mjs";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-03343c8e.mjs";
2
+ import "./DefaultThreeDsProvider-30fe2dc5.mjs";
3
+ import "./main-3c938063.mjs";
4
4
  class m extends e {
5
5
  getType() {
6
6
  return "NMI";
@@ -1,8 +1,8 @@
1
1
  var d = Object.defineProperty;
2
2
  var p = (n, r, t) => r in n ? d(n, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[r] = t;
3
3
  var l = (n, r, t) => (p(n, typeof r != "symbol" ? r + "" : r, t), t);
4
- import { d as m, j as u, o as g, a as D, c as S, p as _, f, b as h, _ as y, s as P, h as T } from "./main-84942d54.mjs";
5
- import { DefaultThreeDsProvider as I, THREE_DS_METHOD_INVOCATION_COMPLETE as N, THREE_DS_CHALLENGE_COMPLETE as C } from "./DefaultThreeDsProvider-4a202d3c.mjs";
4
+ import { d as m, j as u, o as g, a as D, c as S, p as _, f, b as h, _ as y, s as P, h as T } from "./main-3c938063.mjs";
5
+ import { DefaultThreeDsProvider as I, THREE_DS_METHOD_INVOCATION_COMPLETE as N, THREE_DS_CHALLENGE_COMPLETE as C } from "./DefaultThreeDsProvider-30fe2dc5.mjs";
6
6
  const b = (n) => (_("data-v-3b52be97"), n = n(), f(), n), v = { class: "mask" }, E = /* @__PURE__ */ b(() => /* @__PURE__ */ h("div", { class: "wrapper" }, [
7
7
  /* @__PURE__ */ h("div", { class: "container" })
8
8
  ], -1)), x = [
@@ -0,0 +1,129 @@
1
+ import { DefaultThreeDsProvider as y } from "./DefaultThreeDsProvider-30fe2dc5.mjs";
2
+ import { r as c, o as p, i as _, I as P, d as T, k as C, a as w, c as E, b as g, _ as L, s as l, h as I } from "./main-3c938063.mjs";
3
+ const h = c(!1);
4
+ function S(o, ...e) {
5
+ h.value && console.log(o, e);
6
+ }
7
+ function u(o) {
8
+ var e, r;
9
+ (e = o == null ? void 0 : o.data) != null && e.status && o.data.status === P && (h.value = !!((r = o == null ? void 0 : o.data) != null && r.debug));
10
+ }
11
+ function k() {
12
+ return p(() => {
13
+ window.addEventListener("message", u);
14
+ }), _(() => {
15
+ window.removeEventListener("message", u);
16
+ }), {
17
+ debug: h,
18
+ logMessage: S
19
+ };
20
+ }
21
+ const R = { class: "modal-mask" }, b = { class: "modal-wrapper" }, v = ["src"], x = /* @__PURE__ */ T({
22
+ __name: "PayGLocalThreeDsChallenge",
23
+ props: {
24
+ url: null
25
+ },
26
+ emits: ["close"],
27
+ setup(o, { emit: e }) {
28
+ const r = o, { logMessage: a } = k(), t = c(r.url);
29
+ c(null), C(() => r.url, (s) => {
30
+ t.value = s;
31
+ }), p(() => {
32
+ window.addEventListener("message", n);
33
+ }), _(() => {
34
+ window.removeEventListener("message", n);
35
+ });
36
+ function n(s) {
37
+ var d;
38
+ if (a("PayGLocalThreeDsChallenge: Message received", s.data), !((d = s == null ? void 0 : s.data) != null && d["payglocal-token"]))
39
+ return;
40
+ const i = s.data["payglocal-token"];
41
+ a("Token received", i);
42
+ const m = i.split(".")[1], D = window.atob(m), f = JSON.parse(D);
43
+ e("close", f);
44
+ }
45
+ return (s, i) => (w(), E("div", R, [
46
+ g("div", b, [
47
+ g("iframe", {
48
+ src: t.value,
49
+ sandbox: "allow-same-origin allow-scripts allow-popups allow-forms"
50
+ }, null, 8, v)
51
+ ])
52
+ ]));
53
+ }
54
+ });
55
+ const A = /* @__PURE__ */ L(x, [["__scopeId", "data-v-6f042298"]]);
56
+ class U extends y {
57
+ getType() {
58
+ return "PayGLocal";
59
+ }
60
+ onPreAuth() {
61
+ var e, r, a;
62
+ if (this.log(`[${this.getType()}]: onPreAuth`), (e = this.threeDsProcessor) != null && e.getTokenId()) {
63
+ (r = this.threeDsProcessor) == null || r.getCardDetails(this.threeDsProcessor.getProviderId(), this.threeDsProcessor.getTokenId(), (t, n) => {
64
+ var s;
65
+ this.log(`[${this.getType()}]: getCardDetails`, t, n), (s = this.threeDsProcessor) == null || s.setPaymentInfo(t), this.initChallenge(n.RedirectUrl);
66
+ }, () => {
67
+ l(this.container, "Unable to get card information");
68
+ });
69
+ return;
70
+ }
71
+ (a = this.threeDsProcessor) == null || a.tokeniseCard(this.threeDsProcessor.getProviderId(), (t) => {
72
+ this.log(`[${this.getType()}]: tokeniseCard`, t), this.initChallenge(t.gatewayTokenData.RedirectUrl);
73
+ }, (t) => {
74
+ l(this.container, t);
75
+ });
76
+ }
77
+ onAuth(e, r) {
78
+ }
79
+ onPostAuth() {
80
+ }
81
+ initChallenge(e) {
82
+ if (this.log(`[${this.getType()}]: initChallenge`, e), !e) {
83
+ l(this.container, "3D Secure URL is missing");
84
+ return;
85
+ }
86
+ const { destroy: r } = I({
87
+ el: document.body,
88
+ component: A,
89
+ props: {
90
+ url: e
91
+ },
92
+ on: {
93
+ close: (a) => {
94
+ var t, n, s;
95
+ if (this.closeChallenge(), this.log(`[${this.getType()}]: Challenge Results`, a), a.status === "AUTHORIZED") {
96
+ (t = this.threeDsProcessor) == null || t.onSuccess({
97
+ acsRenderingType: {},
98
+ acsTransID: "",
99
+ authenticationType: "",
100
+ authenticationValue: "",
101
+ challengeCancel: "",
102
+ dsTransID: "",
103
+ eci: "",
104
+ interactionCounter: "",
105
+ messageCategory: "",
106
+ messageExtension: [],
107
+ messageType: "",
108
+ messageVersion: "",
109
+ threeDSRequestorTransID: "",
110
+ threeDSServerTransID: "",
111
+ transStatusReason: "",
112
+ transStatus: "Y"
113
+ });
114
+ return;
115
+ }
116
+ if (a.status === "CUSTOMER_CANCELLED") {
117
+ (n = this.threeDsProcessor) == null || n.onError({ error: "Challenge cancelled" });
118
+ return;
119
+ }
120
+ (s = this.threeDsProcessor) == null || s.onError({ error: "3D Secure failed" });
121
+ }
122
+ }
123
+ });
124
+ this.threeDSDestroy = r;
125
+ }
126
+ }
127
+ export {
128
+ U as PayGLocalThreeDsProvider
129
+ };
@@ -1,7 +1,7 @@
1
1
  var l = Object.defineProperty;
2
2
  var p = (r, t, o) => t in r ? l(r, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : r[t] = o;
3
3
  var n = (r, t, o) => (p(r, typeof t != "symbol" ? t + "" : t, o), o);
4
- import { R as d, g as y, H as m } from "./main-84942d54.mjs";
4
+ import { R as d, g as y, H as m } from "./main-3c938063.mjs";
5
5
  const h = {
6
6
  CHECKOUT: "CHECKOUT",
7
7
  CHARGE: "CHARGE"
@@ -16,7 +16,7 @@ const h = {
16
16
  }
17
17
  });
18
18
  class C {
19
- constructor(t, o, s, i, a, e) {
19
+ constructor(t, o, s, a, i, e) {
20
20
  n(this, "log");
21
21
  n(this, "container");
22
22
  n(this, "button", null);
@@ -32,7 +32,7 @@ class C {
32
32
  n(this, "onSuccess");
33
33
  n(this, "onFailure");
34
34
  n(this, "httpInvoker", null);
35
- this.log = t, this.apiUrl = e.apiUrl, this.container = o || document.body, this.options = e.options, this.clientParameters = e.clientParameters, this.providerId = e.providerId, this.amount = Number(i), this.currency = a, this.providerId = s, this.onSuccess = e.onSuccess || null, this.onFailure = e.onFailure || null;
35
+ this.log = t, this.apiUrl = e.apiUrl, this.container = o || document.body, this.options = e.options, this.clientParameters = e.clientParameters, this.providerId = e.providerId, this.amount = Number(a), this.currency = i, this.providerId = s, this.onSuccess = e.onSuccess || null, this.onFailure = e.onFailure || null;
36
36
  const c = new d(e.environment, y(e.publicKey));
37
37
  this.httpInvoker = new m(e.publicKey, e.version, c), this.init();
38
38
  }
@@ -47,13 +47,13 @@ class C {
47
47
  currency: String(this.currency).toLowerCase(),
48
48
  buttonMode: "callback"
49
49
  };
50
- this.log("[createPaymentRequestButton]", o), window.payway.createPaymentRequestButton(o, (s, i) => {
51
- var a;
52
- if (this.log("[createPaymentRequestButton]", s, i), s) {
53
- (a = this.onFailure) == null || a.call(this, s);
50
+ this.log("[createPaymentRequestButton]", o), window.payway.createPaymentRequestButton(o, (s, a) => {
51
+ var i;
52
+ if (this.log("[createPaymentRequestButton]", s, a), s) {
53
+ (i = this.onFailure) == null || i.call(this, s);
54
54
  return;
55
55
  }
56
- this.checkout(i.singleUseTokenId);
56
+ this.checkout(a.singleUseTokenId);
57
57
  });
58
58
  };
59
59
  window.payway ? t() : this.onLoad = t;
@@ -84,29 +84,31 @@ class C {
84
84
  ProviderToken: t
85
85
  }
86
86
  };
87
- this.log("[PayWayAppleButton][checkout]", o), (s = this.httpInvoker) == null || s.invoke(u(this.apiUrl)[h.CHECKOUT].url, u(this.apiUrl)[h.CHECKOUT].method, JSON.stringify(o), (i, a) => {
88
- this.log("[PayWayAppleButton][checkout]: successCheckoutHandler", i, a);
89
- const e = JSON.parse(a), c = JSON.parse(window.atob(e.checkoutData));
87
+ this.log("[PayWayAppleButton][checkout]", o), (s = this.httpInvoker) == null || s.invoke(u(this.apiUrl)[h.CHECKOUT].url, u(this.apiUrl)[h.CHECKOUT].method, JSON.stringify(o), (a, i) => {
88
+ this.log("[PayWayAppleButton][checkout]: successCheckoutHandler", a, i);
89
+ const e = JSON.parse(i), c = JSON.parse(window.atob(e.checkoutData));
90
90
  this.log("[PayWayAppleButton][checkout]: decodedData", c), this.charge(c.checkoutId);
91
- }, (i, a) => {
91
+ }, (a, i) => {
92
92
  var c;
93
- this.log("[PayWayAppleButton][checkout]: failureCheckoutHandler", i, a);
94
- const e = JSON.parse(a);
93
+ this.log("[PayWayAppleButton][checkout]: failureCheckoutHandler", a, i);
94
+ const e = JSON.parse(i);
95
95
  (c = this.onFailure) == null || c.call(this, { error: e.message });
96
96
  });
97
97
  }
98
98
  charge(t) {
99
99
  var o;
100
- this.log("[PayWayAppleButton][charge]", { checkoutId: t }), (o = this.httpInvoker) == null || o.invoke(u(this.apiUrl)[h.CHARGE].url, u(this.apiUrl)[h.CHARGE].method, JSON.stringify({ checkoutId: t }), (s, i) => {
100
+ this.log("[PayWayAppleButton][charge]", { checkoutId: t }), (o = this.httpInvoker) == null || o.invoke(u(this.apiUrl)[h.CHARGE].url, u(this.apiUrl)[h.CHARGE].method, JSON.stringify({ checkoutId: t }), (s, a) => {
101
101
  var e;
102
- this.log("[PayWayAppleButton][charge]: successChargeHandler", s, i);
103
- const a = JSON.parse(i);
104
- (e = this.onSuccess) == null || e.call(this, a || i);
105
- }, (s, i) => {
102
+ this.log("[PayWayAppleButton][charge]: successChargeHandler", s, a);
103
+ const i = JSON.parse(a);
104
+ (e = this.onSuccess) == null || e.call(this, {
105
+ transactionId: i == null ? void 0 : i.chargeId
106
+ });
107
+ }, (s, a) => {
106
108
  var e;
107
- this.log("[PayWayAppleButton][charge]: failureChargeHandler", s, i);
108
- const a = JSON.parse(i);
109
- (e = this.onFailure) == null || e.call(this, { error: a.message });
109
+ this.log("[PayWayAppleButton][charge]: failureChargeHandler", s, a);
110
+ const i = JSON.parse(a);
111
+ (e = this.onFailure) == null || e.call(this, { error: i.message });
110
112
  });
111
113
  }
112
114
  }
@@ -1,6 +1,6 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-229dd8b8.mjs";
2
- import "./DefaultThreeDsProvider-4a202d3c.mjs";
3
- import "./main-84942d54.mjs";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-03343c8e.mjs";
2
+ import "./DefaultThreeDsProvider-30fe2dc5.mjs";
3
+ import "./main-3c938063.mjs";
4
4
  class i extends e {
5
5
  getType() {
6
6
  return "Payabli";
@@ -1,6 +1,6 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-229dd8b8.mjs";
2
- import "./DefaultThreeDsProvider-4a202d3c.mjs";
3
- import "./main-84942d54.mjs";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-03343c8e.mjs";
2
+ import "./DefaultThreeDsProvider-30fe2dc5.mjs";
3
+ import "./main-3c938063.mjs";
4
4
  class s extends e {
5
5
  getType() {
6
6
  return "SkyBank";
@@ -0,0 +1,10 @@
1
+ import { CxPayThreeDsProvider as e } from "./CxPayThreeDsProvider-c6c31df8.mjs";
2
+ import "./MetricsGlobalThreeDsProvider-03343c8e.mjs";
3
+ import "./DefaultThreeDsProvider-30fe2dc5.mjs";
4
+ import "./main-3c938063.mjs";
5
+ function n(r, o, t) {
6
+ return new e(r, o, t);
7
+ }
8
+ export {
9
+ n as default
10
+ };
@@ -1,5 +1,5 @@
1
- import { DefaultThreeDsProvider as o } from "./DefaultThreeDsProvider-4a202d3c.mjs";
2
- import "./main-84942d54.mjs";
1
+ import { DefaultThreeDsProvider as o } from "./DefaultThreeDsProvider-30fe2dc5.mjs";
2
+ import "./main-3c938063.mjs";
3
3
  function a(e, r, t) {
4
4
  return new o(e, r, t);
5
5
  }
@@ -1,6 +1,6 @@
1
- import { EcentricThreeDsProvider as i } from "./EcentricThreeDsProvider-c9ebfd28.mjs";
2
- import "./DefaultThreeDsProvider-4a202d3c.mjs";
3
- import "./main-84942d54.mjs";
1
+ import { EcentricThreeDsProvider as i } from "./EcentricThreeDsProvider-f2dcdf2d.mjs";
2
+ import "./DefaultThreeDsProvider-30fe2dc5.mjs";
3
+ import "./main-3c938063.mjs";
4
4
  function m(r, e, t) {
5
5
  return new i(r, e, t);
6
6
  }
@@ -0,0 +1,10 @@
1
+ import { EpnaThreeDsProvider as t } from "./EpnaThreeDsProvider-69f0fad2.mjs";
2
+ import "./MetricsGlobalThreeDsProvider-03343c8e.mjs";
3
+ import "./DefaultThreeDsProvider-30fe2dc5.mjs";
4
+ import "./main-3c938063.mjs";
5
+ function a(r, e, o) {
6
+ return new t(r, e, o);
7
+ }
8
+ export {
9
+ a as default
10
+ };
@@ -0,0 +1,10 @@
1
+ import { FlashBancThreeDsProvider as e } from "./FlashBancThreeDsProvider-a1699ce9.mjs";
2
+ import "./MetricsGlobalThreeDsProvider-03343c8e.mjs";
3
+ import "./DefaultThreeDsProvider-30fe2dc5.mjs";
4
+ import "./main-3c938063.mjs";
5
+ function p(r, o, t) {
6
+ return new e(r, o, t);
7
+ }
8
+ export {
9
+ p as default
10
+ };
@@ -1,6 +1,6 @@
1
- import { GPaymentsThreeDsProvider as o } from "./GPaymentsThreeDsProvider-03ad4012.mjs";
2
- import "./DefaultThreeDsProvider-4a202d3c.mjs";
3
- import "./main-84942d54.mjs";
1
+ import { GPaymentsThreeDsProvider as o } from "./GPaymentsThreeDsProvider-d3c8c022.mjs";
2
+ import "./DefaultThreeDsProvider-30fe2dc5.mjs";
3
+ import "./main-3c938063.mjs";
4
4
  function p(r, e, t) {
5
5
  return new o(r, e, t);
6
6
  }