@payfurl/client 4.6.1 → 4.6.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.
Files changed (40) hide show
  1. package/README.md +4 -0
  2. package/dist/sdk/{CxPayThreeDsProvider-068b25ce.mjs → CxPayThreeDsProvider-40d2c5fb.mjs} +3 -3
  3. package/dist/sdk/{DefaultThreeDsProvider-e98c909f.mjs → DefaultThreeDsProvider-5cb383f3.mjs} +21 -20
  4. package/dist/sdk/EcentricThreeDsProvider-3dcd4237.mjs +90 -0
  5. package/dist/sdk/{EpnaThreeDsProvider-189e652c.mjs → EpnaThreeDsProvider-a660b17d.mjs} +3 -3
  6. package/dist/sdk/{FlashBancThreeDsProvider-36e453b8.mjs → FlashBancThreeDsProvider-b99fd0a8.mjs} +3 -3
  7. package/dist/sdk/{GPaymentsThreeDsProvider-fe5a9704.mjs → GPaymentsThreeDsProvider-5cf80737.mjs} +4 -4
  8. package/dist/sdk/MetricsGlobalThreeDsProvider-d1b2c081.mjs +153 -0
  9. package/dist/sdk/{NmiThreeDsProvider-f7c7a154.mjs → NmiThreeDsProvider-396a0ddd.mjs} +3 -3
  10. package/dist/sdk/NuveiThreeDsProvider-26959462.mjs +182 -0
  11. package/dist/sdk/PayWayAppleButton-c8432bce.mjs +115 -0
  12. package/dist/sdk/{PayabliThreeDsProvider-66b568d3.mjs → PayabliThreeDsProvider-a7d94b89.mjs} +3 -3
  13. package/dist/sdk/{SkyBankThreeDsProvider-fbfe9597.mjs → SkyBankThreeDsProvider-20cd542d.mjs} +3 -3
  14. package/dist/sdk/{ThreeDsProvider.interface-da0ab2aa.mjs → ThreeDsProvider.interface-370c3a6b.mjs} +9 -3
  15. package/dist/sdk/cxpay-6d57641b.mjs +10 -0
  16. package/dist/sdk/{default-957c2000.mjs → default-76303d08.mjs} +2 -2
  17. package/dist/sdk/ecentric-81f3631c.mjs +9 -0
  18. package/dist/sdk/epna-b6806a36.mjs +10 -0
  19. package/dist/sdk/flashbanc-a06cb783.mjs +10 -0
  20. package/dist/sdk/{gpayments-dce1eccd.mjs → gpayments-49110aa8.mjs} +3 -3
  21. package/dist/sdk/main-55a85033.mjs +9835 -0
  22. package/dist/sdk/{metrics_global-5f5b54ee.mjs → metrics_global-ba0fb545.mjs} +3 -3
  23. package/dist/sdk/nmi-8ce29228.mjs +10 -0
  24. package/dist/sdk/nuvei-f2384e2a.mjs +9 -0
  25. package/dist/sdk/payabli-1a296ee4.mjs +10 -0
  26. package/dist/sdk/payfurl.es.js +1 -1
  27. package/dist/sdk/payfurl.umd.js +13 -51
  28. package/dist/sdk/payway_rest-e2ce2046.mjs +8 -0
  29. package/dist/sdk/skybank-bc06021d.mjs +10 -0
  30. package/dist/sdk/style.css +1 -1
  31. package/package.json +3 -2
  32. package/dist/sdk/MetricsGlobalThreeDsProvider-7f36be7b.mjs +0 -147
  33. package/dist/sdk/cxpay-6ff3d8ba.mjs +0 -10
  34. package/dist/sdk/ecentric-7741cdc3.mjs +0 -165
  35. package/dist/sdk/epna-1da33a88.mjs +0 -10
  36. package/dist/sdk/flashbanc-6eb51520.mjs +0 -10
  37. package/dist/sdk/main-eb4bb451.mjs +0 -18753
  38. package/dist/sdk/nmi-d67f1324.mjs +0 -10
  39. package/dist/sdk/payabli-02b4bd3b.mjs +0 -10
  40. package/dist/sdk/skybank-53b51d4e.mjs +0 -10
@@ -0,0 +1,115 @@
1
+ var l = Object.defineProperty;
2
+ var p = (r, t, o) => t in r ? l(r, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : r[t] = o;
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-55a85033.mjs";
5
+ const h = {
6
+ CHECKOUT: "CHECKOUT",
7
+ CHARGE: "CHARGE"
8
+ }, u = (r) => ({
9
+ [h.CHECKOUT]: {
10
+ url: r + "/payment_method/checkout",
11
+ method: "POST"
12
+ },
13
+ [h.CHARGE]: {
14
+ url: r + "/charge/checkout",
15
+ method: "POST"
16
+ }
17
+ });
18
+ class C {
19
+ constructor(t, o, s, i, a, e) {
20
+ n(this, "log");
21
+ n(this, "container");
22
+ n(this, "button", null);
23
+ n(this, "providerId");
24
+ n(this, "apiUrl");
25
+ n(this, "amount");
26
+ n(this, "currency");
27
+ n(this, "options");
28
+ n(this, "clientParameters");
29
+ n(this, "buttonId", "apple-pay-payway-button");
30
+ n(this, "onLoad", () => {
31
+ });
32
+ n(this, "onSuccess");
33
+ n(this, "onFailure");
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;
36
+ const c = new d(e.environment, y(e.publicKey));
37
+ this.httpInvoker = new m(e.publicKey, e.version, c), this.init();
38
+ }
39
+ draw() {
40
+ const t = () => {
41
+ this.onLoad = () => {
42
+ };
43
+ const o = {
44
+ container: this.buttonId,
45
+ publishableApiKey: this.clientParameters.PublishableApiKey,
46
+ principalAmount: this.amount,
47
+ currency: String(this.currency).toLowerCase(),
48
+ buttonMode: "callback"
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);
54
+ return;
55
+ }
56
+ this.checkout(i.singleUseTokenId);
57
+ });
58
+ };
59
+ window.payway ? t() : this.onLoad = t;
60
+ }
61
+ show() {
62
+ this.button && (this.button.style.display = "block");
63
+ }
64
+ hide() {
65
+ this.button && (this.button.style.display = "none");
66
+ }
67
+ init() {
68
+ const t = document.createElement("div");
69
+ t.id = this.buttonId, this.container.appendChild(t), this.button = t, this.initScript();
70
+ }
71
+ initScript() {
72
+ const t = document.createElement("script");
73
+ t.src = "https://api.payway.com.au/rest/v1/payway.js", t.onload = () => {
74
+ this.onLoad && this.onLoad();
75
+ }, document.head.appendChild(t);
76
+ }
77
+ checkout(t) {
78
+ var s;
79
+ const o = {
80
+ providerId: this.providerId,
81
+ amount: this.amount,
82
+ currency: this.currency,
83
+ options: {
84
+ ProviderToken: t
85
+ }
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));
90
+ this.log("[PayWayAppleButton][checkout]: decodedData", c), this.charge(c.checkoutId);
91
+ }, (i, a) => {
92
+ var c;
93
+ this.log("[PayWayAppleButton][checkout]: failureCheckoutHandler", i, a);
94
+ const e = JSON.parse(a);
95
+ (c = this.onFailure) == null || c.call(this, { error: e.message });
96
+ });
97
+ }
98
+ charge(t) {
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) => {
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) => {
106
+ 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 });
110
+ });
111
+ }
112
+ }
113
+ export {
114
+ C as PayWayAppleButton
115
+ };
@@ -1,6 +1,6 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-7f36be7b.mjs";
2
- import "./DefaultThreeDsProvider-e98c909f.mjs";
3
- import "./main-eb4bb451.mjs";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-d1b2c081.mjs";
2
+ import "./DefaultThreeDsProvider-5cb383f3.mjs";
3
+ import "./main-55a85033.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-7f36be7b.mjs";
2
- import "./DefaultThreeDsProvider-e98c909f.mjs";
3
- import "./main-eb4bb451.mjs";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-d1b2c081.mjs";
2
+ import "./DefaultThreeDsProvider-5cb383f3.mjs";
3
+ import "./main-55a85033.mjs";
4
4
  class s extends e {
5
5
  getType() {
6
6
  return "SkyBank";
@@ -8,11 +8,17 @@ const e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8
8
  __proto__: null
9
9
  }, Symbol.toStringTag, { value: "Module" })), l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10
10
  __proto__: null
11
+ }, Symbol.toStringTag, { value: "Module" })), n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12
+ __proto__: null
13
+ }, Symbol.toStringTag, { value: "Module" })), _ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14
+ __proto__: null
11
15
  }, Symbol.toStringTag, { value: "Module" }));
12
16
  export {
13
- o as T,
17
+ e as A,
18
+ l as T,
14
19
  t as a,
15
20
  r as b,
16
- l as c,
17
- e as f
21
+ n as c,
22
+ _ as d,
23
+ o as f
18
24
  };
@@ -0,0 +1,10 @@
1
+ import { CxPayThreeDsProvider as e } from "./CxPayThreeDsProvider-40d2c5fb.mjs";
2
+ import "./MetricsGlobalThreeDsProvider-d1b2c081.mjs";
3
+ import "./DefaultThreeDsProvider-5cb383f3.mjs";
4
+ import "./main-55a85033.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-e98c909f.mjs";
2
- import "./main-eb4bb451.mjs";
1
+ import { DefaultThreeDsProvider as o } from "./DefaultThreeDsProvider-5cb383f3.mjs";
2
+ import "./main-55a85033.mjs";
3
3
  function a(e, r, t) {
4
4
  return new o(e, r, t);
5
5
  }
@@ -0,0 +1,9 @@
1
+ import { EcentricThreeDsProvider as i } from "./EcentricThreeDsProvider-3dcd4237.mjs";
2
+ import "./DefaultThreeDsProvider-5cb383f3.mjs";
3
+ import "./main-55a85033.mjs";
4
+ function m(r, e, t) {
5
+ return new i(r, e, t);
6
+ }
7
+ export {
8
+ m as default
9
+ };
@@ -0,0 +1,10 @@
1
+ import { EpnaThreeDsProvider as t } from "./EpnaThreeDsProvider-a660b17d.mjs";
2
+ import "./MetricsGlobalThreeDsProvider-d1b2c081.mjs";
3
+ import "./DefaultThreeDsProvider-5cb383f3.mjs";
4
+ import "./main-55a85033.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-b99fd0a8.mjs";
2
+ import "./MetricsGlobalThreeDsProvider-d1b2c081.mjs";
3
+ import "./DefaultThreeDsProvider-5cb383f3.mjs";
4
+ import "./main-55a85033.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-fe5a9704.mjs";
2
- import "./DefaultThreeDsProvider-e98c909f.mjs";
3
- import "./main-eb4bb451.mjs";
1
+ import { GPaymentsThreeDsProvider as o } from "./GPaymentsThreeDsProvider-5cf80737.mjs";
2
+ import "./DefaultThreeDsProvider-5cb383f3.mjs";
3
+ import "./main-55a85033.mjs";
4
4
  function p(r, e, t) {
5
5
  return new o(r, e, t);
6
6
  }