@payfurl/client 4.6.21 → 4.6.22

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 (32) hide show
  1. package/dist/sdk/{CxPayThreeDsProvider-ysOA5bLR.js → CxPayThreeDsProvider-DW5-rmwO.js} +1 -1
  2. package/dist/sdk/{DefaultThreeDsProvider-Be6gfYn_.js → DefaultThreeDsProvider-g71qaHoD.js} +1 -1
  3. package/dist/sdk/{EcentricThreeDsProvider-CKLcz5as.js → EcentricThreeDsProvider-DTJmqml3.js} +2 -2
  4. package/dist/sdk/{EpnaThreeDsProvider-Krzveb57.js → EpnaThreeDsProvider-DPIlaWq5.js} +1 -1
  5. package/dist/sdk/{FlashBancThreeDsProvider-CJLu0sTI.js → FlashBancThreeDsProvider-BpO5zxSu.js} +1 -1
  6. package/dist/sdk/{GPaymentsThreeDsProvider-CtQlgihk.js → GPaymentsThreeDsProvider-Uj-KdLuY.js} +2 -2
  7. package/dist/sdk/{MetricsGlobalThreeDsProvider-TgpG4rsv.js → MetricsGlobalThreeDsProvider-DfQkb-L7.js} +2 -2
  8. package/dist/sdk/{NmiThreeDsProvider-CSDa8FZu.js → NmiThreeDsProvider-Co1U2FbM.js} +1 -1
  9. package/dist/sdk/{NuveiThreeDsProvider-C51-thjW.js → NuveiThreeDsProvider-CE7Q7XRi.js} +2 -2
  10. package/dist/sdk/{PayGLocalThreeDsProvider-BgjSU-5J.js → PayGLocalThreeDsProvider-CSHV7ncX.js} +2 -2
  11. package/dist/sdk/PayWayAppleButton-oQN--UTw.js +179 -0
  12. package/dist/sdk/{PayabliThreeDsProvider-DLe5DA9v.js → PayabliThreeDsProvider-rZOZnzpg.js} +1 -1
  13. package/dist/sdk/{SkyBankThreeDsProvider-C00abS69.js → SkyBankThreeDsProvider-Dfkz0VY-.js} +1 -1
  14. package/dist/sdk/{ThreeDsProvider.interface-BqrnU_2p.js → ThreeDsProvider.interface-BABwfVIq.js} +4697 -4605
  15. package/dist/sdk/{cxpay-Cz4y2geS.js → cxpay-BceAQYZX.js} +1 -1
  16. package/dist/sdk/{default-CMUCo-dm.js → default-BdIfVoJM.js} +1 -1
  17. package/dist/sdk/{ecentric-BKnZ4vde.js → ecentric-BZLjBoWL.js} +1 -1
  18. package/dist/sdk/{epna-CNfQtVtP.js → epna-Ca-UF1RB.js} +1 -1
  19. package/dist/sdk/{flashbanc-DXa7kG4z.js → flashbanc-lRqJlfeQ.js} +1 -1
  20. package/dist/sdk/{gpayments-Ck3Izfmg.js → gpayments-DLKNKsyO.js} +1 -1
  21. package/dist/sdk/{metrics_global-DjHVWiDw.js → metrics_global-9qTq_V0Z.js} +1 -1
  22. package/dist/sdk/{nmi-DHtVpDhq.js → nmi-CDcLhbrU.js} +1 -1
  23. package/dist/sdk/{nuvei-CoZAS9EN.js → nuvei-C4zgJ-nu.js} +1 -1
  24. package/dist/sdk/{payabli-CPvAQMj1.js → payabli-BbSszo8x.js} +1 -1
  25. package/dist/sdk/payfurl.es.js +1 -1
  26. package/dist/sdk/payfurl.umd.js +13 -13
  27. package/dist/sdk/{payglocal-C6yFYoGo.js → payglocal-D2L0R5by.js} +1 -1
  28. package/dist/sdk/{payway_rest-UZu9CKxh.js → payway_rest-DwCkH5ss.js} +1 -1
  29. package/dist/sdk/{skybank-BCBwKCBm.js → skybank-BXzDLPyy.js} +1 -1
  30. package/dist/sdk/style.css +1 -1
  31. package/package.json +1 -1
  32. package/dist/sdk/PayWayAppleButton-CAgtQL1n.js +0 -159
@@ -1,4 +1,4 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-TgpG4rsv.js";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-DfQkb-L7.js";
2
2
  class a extends e {
3
3
  getType() {
4
4
  return "CxPay";
@@ -1,7 +1,7 @@
1
1
  var d = Object.defineProperty;
2
2
  var S = (n, e, s) => e in n ? d(n, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : n[e] = s;
3
3
  var r = (n, e, s) => S(n, typeof e != "symbol" ? e + "" : e, s);
4
- import { d as p, r as g, o as m, a as T, c as f, b as D, e as I, C as y, u as C, _ as A, h as E, T as v, f as _ } from "./ThreeDsProvider.interface-BqrnU_2p.js";
4
+ import { d as p, r as g, o as m, a as T, c as f, b as D, e as I, C as y, u as C, _ as A, h as E, T as v, f as _ } from "./ThreeDsProvider.interface-BABwfVIq.js";
5
5
  const R = { class: "mask" }, P = { class: "wrapper" }, U = { class: "container" }, $ = ["action"], b = ["value"], L = /* @__PURE__ */ p({
6
6
  __name: "ThreeDsChallenge",
7
7
  props: {
@@ -1,8 +1,8 @@
1
1
  var h = Object.defineProperty;
2
2
  var c = (s, t, e) => t in s ? h(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
3
  var l = (s, t, e) => c(s, typeof t != "symbol" ? t + "" : t, e);
4
- import { DefaultThreeDsProvider as d } from "./DefaultThreeDsProvider-Be6gfYn_.js";
5
- import { d as p, r as u, o as D, a as m, c as g, b as a, e as f, C as S, u as T, _, f as y } from "./ThreeDsProvider.interface-BqrnU_2p.js";
4
+ import { DefaultThreeDsProvider as d } from "./DefaultThreeDsProvider-g71qaHoD.js";
5
+ import { d as p, r as u, o as D, a as m, c as g, b as a, e as f, C as S, u as T, _, f as y } from "./ThreeDsProvider.interface-BABwfVIq.js";
6
6
  const C = { class: "mask" }, v = { class: "wrapper" }, P = { class: "container" }, I = ["action"], A = ["value"], V = /* @__PURE__ */ p({
7
7
  __name: "ecentric",
8
8
  props: {
@@ -1,4 +1,4 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-TgpG4rsv.js";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-DfQkb-L7.js";
2
2
  class a extends e {
3
3
  getType() {
4
4
  return "EPNA";
@@ -1,4 +1,4 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-TgpG4rsv.js";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-DfQkb-L7.js";
2
2
  class t extends e {
3
3
  getType() {
4
4
  return "FlashBanc";
@@ -1,8 +1,8 @@
1
1
  var i = Object.defineProperty;
2
2
  var l = (o, r, e) => r in o ? i(o, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[r] = e;
3
3
  var n = (o, r, e) => l(o, typeof r != "symbol" ? r + "" : r, e);
4
- import { DefaultThreeDsProvider as c } from "./DefaultThreeDsProvider-Be6gfYn_.js";
5
- import { d, a as u, c as p, b as h, n as a, _ as g, f as D } from "./ThreeDsProvider.interface-BqrnU_2p.js";
4
+ import { DefaultThreeDsProvider as c } from "./DefaultThreeDsProvider-g71qaHoD.js";
5
+ import { d, a as u, c as p, b as h, n as a, _ as g, f as D } from "./ThreeDsProvider.interface-BABwfVIq.js";
6
6
  const S = { class: "mask" }, m = { class: "wrapper" }, y = ["src"], f = /* @__PURE__ */ d({
7
7
  __name: "GPayments",
8
8
  props: {
@@ -1,8 +1,8 @@
1
1
  var S = Object.defineProperty;
2
2
  var P = (h, o, t) => o in h ? S(h, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[o] = t;
3
3
  var m = (h, o, t) => P(h, typeof o != "symbol" ? o + "" : o, t);
4
- import { DefaultThreeDsProvider as f } from "./DefaultThreeDsProvider-Be6gfYn_.js";
5
- import { d as E, r as _, o as A, i as v, w as T, v as b, a as x, c as I, b as g, e as L, C as N, _ as G, h as $, s as p, f as H } from "./ThreeDsProvider.interface-BqrnU_2p.js";
4
+ import { DefaultThreeDsProvider as f } from "./DefaultThreeDsProvider-g71qaHoD.js";
5
+ import { d as E, r as _, o as A, i as v, w as T, v as b, a as x, c as I, b as g, e as L, C as N, _ as G, h as $, s as p, f as H } from "./ThreeDsProvider.interface-BABwfVIq.js";
6
6
  const M = { class: "mask" }, k = { class: "wrapper" }, O = { class: "container" }, j = /* @__PURE__ */ E({
7
7
  __name: "MetricsGlobalThreeDsChallenge",
8
8
  emits: ["close", "submit"],
@@ -1,4 +1,4 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-TgpG4rsv.js";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-DfQkb-L7.js";
2
2
  class t extends e {
3
3
  getType() {
4
4
  return "NMI";
@@ -1,8 +1,8 @@
1
1
  var u = Object.defineProperty;
2
2
  var p = (n, o, t) => o in n ? u(n, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[o] = t;
3
3
  var h = (n, o, t) => p(n, typeof o != "symbol" ? o + "" : o, t);
4
- import { d as m, h as d, o as g, a as D, c as S, b as l, _ as f, s as y, f as P } from "./ThreeDsProvider.interface-BqrnU_2p.js";
5
- import { DefaultThreeDsProvider as T, THREE_DS_METHOD_INVOCATION_COMPLETE as N, THREE_DS_CHALLENGE_COMPLETE as I } from "./DefaultThreeDsProvider-Be6gfYn_.js";
4
+ import { d as m, h as d, o as g, a as D, c as S, b as l, _ as f, s as y, f as P } from "./ThreeDsProvider.interface-BABwfVIq.js";
5
+ import { DefaultThreeDsProvider as T, THREE_DS_METHOD_INVOCATION_COMPLETE as N, THREE_DS_CHALLENGE_COMPLETE as I } from "./DefaultThreeDsProvider-g71qaHoD.js";
6
6
  const C = { class: "mask" }, _ = /* @__PURE__ */ m({
7
7
  __name: "nuvei",
8
8
  props: {
@@ -1,5 +1,5 @@
1
- import { DefaultThreeDsProvider as C } from "./DefaultThreeDsProvider-Be6gfYn_.js";
2
- import { r as h, o as p, i as D, I as y, d as _, j as w, a as E, c as I, b as u, _ as L, s as c, f as S } from "./ThreeDsProvider.interface-BqrnU_2p.js";
1
+ import { DefaultThreeDsProvider as C } from "./DefaultThreeDsProvider-g71qaHoD.js";
2
+ import { r as h, o as p, i as D, I as y, d as _, j as w, a as E, c as I, b as u, _ as L, s as c, f as S } from "./ThreeDsProvider.interface-BABwfVIq.js";
3
3
  const d = h(!1);
4
4
  function R(s, ...e) {
5
5
  d.value && console.log(s, e);
@@ -0,0 +1,179 @@
1
+ var g = Object.defineProperty;
2
+ var b = (o, t, i) => t in o ? g(o, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : o[t] = i;
3
+ var e = (o, t, i) => b(o, typeof t != "symbol" ? t + "" : t, i);
4
+ import { R as A, g as v, H as C } from "./ThreeDsProvider.interface-BABwfVIq.js";
5
+ const d = {
6
+ CHECKOUT: "CHECKOUT",
7
+ CHARGE: "CHARGE"
8
+ }, y = (o) => ({
9
+ [d.CHECKOUT]: {
10
+ url: o + "/payment_method/checkout",
11
+ method: "POST"
12
+ },
13
+ [d.CHARGE]: {
14
+ url: o + "/charge/checkout",
15
+ method: "POST"
16
+ }
17
+ });
18
+ class f {
19
+ constructor(t, i, n, r, a, s) {
20
+ e(this, "log");
21
+ e(this, "container");
22
+ e(this, "button", null);
23
+ e(this, "validator", null);
24
+ e(this, "validationError", null);
25
+ e(this, "providerId");
26
+ e(this, "apiUrl");
27
+ e(this, "amount");
28
+ e(this, "currency");
29
+ e(this, "clientParameters");
30
+ e(this, "billingAddress", null);
31
+ e(this, "customer", null);
32
+ e(this, "order", null);
33
+ e(this, "buttonId", "apple-pay-payway-button");
34
+ e(this, "validatorId", "apple-pay-payway-button-validator");
35
+ e(this, "onLoad", () => {
36
+ });
37
+ e(this, "onSuccess");
38
+ e(this, "onFailure");
39
+ e(this, "userOnValidate");
40
+ e(this, "httpInvoker", null);
41
+ this.log = t, this.apiUrl = s.apiUrl, this.container = i || document.body, this.clientParameters = s.clientParameters, this.providerId = s.providerId, this.amount = Number(r), this.currency = a, this.providerId = n, this.onSuccess = s.onSuccess || null, this.onFailure = s.onFailure || null, this.userOnValidate = s.onValidate;
42
+ const p = new A(s.environment, v(s.publicKey));
43
+ this.httpInvoker = new C(s.publicKey, s.version, p), this.init(), setInterval(() => {
44
+ var h;
45
+ if (this.validator) {
46
+ if (((h = this.userOnValidate) == null ? void 0 : h.call(this)) === !1) {
47
+ this.validator.style.display = "block";
48
+ return;
49
+ }
50
+ this.validator.style.display = "none", this.validationError.style.display = "none";
51
+ }
52
+ }, 1e3);
53
+ }
54
+ draw() {
55
+ const t = () => {
56
+ this.onLoad = () => {
57
+ };
58
+ const i = {
59
+ container: this.buttonId,
60
+ publishableApiKey: this.clientParameters.PublishableApiKey,
61
+ principalAmount: this.amount,
62
+ currency: String(this.currency).toLowerCase(),
63
+ buttonMode: "callback"
64
+ };
65
+ this.log("[createPaymentRequestButton]", i), window.payway.createPaymentRequestButton(i, (n, r) => {
66
+ var a;
67
+ if (this.log("[createPaymentRequestButton]", n, r), n) {
68
+ (a = this.onFailure) == null || a.call(this, n);
69
+ return;
70
+ }
71
+ this.checkout(r.singleUseTokenId);
72
+ }), this.addValidator();
73
+ };
74
+ window.payway ? t() : this.onLoad = t;
75
+ }
76
+ show() {
77
+ this.button && (this.button.style.display = "block");
78
+ }
79
+ hide() {
80
+ this.button && (this.button.style.display = "none");
81
+ }
82
+ init() {
83
+ const t = document.createElement("div");
84
+ t.id = this.buttonId, t.style.position = "relative", this.container.appendChild(t), this.button = t, this.initScript();
85
+ }
86
+ addValidator() {
87
+ var i;
88
+ if (document.getElementById(this.validatorId))
89
+ return;
90
+ const t = document.createElement("div");
91
+ t.id = this.validatorId, t.style.width = "100%", t.style.height = "100%", t.style.position = "absolute", t.style.top = "0", t.style.left = "0", t.style.display = "none", (i = this.button) == null || i.appendChild(t), this.validator = t;
92
+ }
93
+ initScript() {
94
+ const t = document.createElement("script");
95
+ t.src = "https://api.payway.com.au/rest/v1/payway.js", t.onload = () => {
96
+ this.onLoad && this.onLoad();
97
+ }, document.head.appendChild(t);
98
+ }
99
+ checkout(t) {
100
+ var n, r, a, s, p, h;
101
+ const i = {
102
+ providerId: this.providerId,
103
+ amount: this.amount,
104
+ currency: this.currency,
105
+ reference: (n = this.order) == null ? void 0 : n.orderNumber,
106
+ options: {
107
+ ProviderToken: t
108
+ },
109
+ customer: {
110
+ firstName: (r = this.customer) == null ? void 0 : r.firstName,
111
+ lastName: (a = this.customer) == null ? void 0 : a.lastName,
112
+ email: (s = this.customer) == null ? void 0 : s.email,
113
+ phone: (p = this.customer) == null ? void 0 : p.phoneNumber,
114
+ billingAddress: this.billingAddress && {
115
+ name: `${this.billingAddress.firstName} ${this.billingAddress.lastName}`,
116
+ addressLine1: this.billingAddress.streetAddress,
117
+ addressLine2: this.billingAddress.streetAddress2,
118
+ suburb: this.billingAddress.city,
119
+ countryCode: this.billingAddress.country,
120
+ postcode: this.billingAddress.postalCode,
121
+ state: this.billingAddress.state
122
+ } || void 0
123
+ },
124
+ items: this.order && this.order.orderItems.map((l) => ({
125
+ name: l.name,
126
+ reference: l.sku,
127
+ quantity: Number(l.quantity),
128
+ amount: Number(l.unitPrice)
129
+ })) || []
130
+ };
131
+ this.log("[PayWayAppleButton][checkout]", i), (h = this.httpInvoker) == null || h.invoke(y(this.apiUrl)[d.CHECKOUT].url, y(this.apiUrl)[d.CHECKOUT].method, JSON.stringify(i), (l, u) => {
132
+ this.log("[PayWayAppleButton][checkout]: successCheckoutHandler", l, u);
133
+ const m = JSON.parse(u), c = JSON.parse(window.atob(m.checkoutData));
134
+ this.log("[PayWayAppleButton][checkout]: decodedData", c), this.charge(c.checkoutId);
135
+ }, (l, u) => {
136
+ var c;
137
+ this.log("[PayWayAppleButton][checkout]: failureCheckoutHandler", l, u);
138
+ const m = JSON.parse(u);
139
+ (c = this.onFailure) == null || c.call(this, { error: m.message });
140
+ });
141
+ }
142
+ charge(t) {
143
+ var i;
144
+ this.log("[PayWayAppleButton][charge]", { checkoutId: t }), (i = this.httpInvoker) == null || i.invoke(y(this.apiUrl)[d.CHARGE].url, y(this.apiUrl)[d.CHARGE].method, JSON.stringify({ checkoutId: t }), (n, r) => {
145
+ var s;
146
+ this.log("[PayWayAppleButton][charge]: successChargeHandler", n, r);
147
+ const a = JSON.parse(r);
148
+ (s = this.onSuccess) == null || s.call(this, {
149
+ transactionId: a == null ? void 0 : a.chargeId
150
+ });
151
+ }, (n, r) => {
152
+ var s;
153
+ this.log("[PayWayAppleButton][charge]: failureChargeHandler", n, r);
154
+ const a = JSON.parse(r);
155
+ (s = this.onFailure) == null || s.call(this, { error: a.message });
156
+ });
157
+ }
158
+ redraw() {
159
+ this.button && (this.button.innerHTML = "", this.draw());
160
+ }
161
+ setAmount(t) {
162
+ this.log("[PayWayAppleButton][setAmount]", t), this.amount = t, this.redraw();
163
+ }
164
+ setCurrency(t) {
165
+ this.log("[PayWayAppleButton][setCurrency]", t), this.currency = t, this.redraw();
166
+ }
167
+ setCustomerInfo(t) {
168
+ this.log("[PayWayAppleButton][setCustomerInfo]", t), this.customer = { ...t };
169
+ }
170
+ setBillingAddress(t) {
171
+ this.log("[PayWayAppleButton][setBillingAddress]", t), this.billingAddress = { ...t };
172
+ }
173
+ setOrderInfo(t) {
174
+ this.log("[PayWayAppleButton][setOrderInfo]", t), this.order = { ...t };
175
+ }
176
+ }
177
+ export {
178
+ f as PayWayAppleButton
179
+ };
@@ -1,4 +1,4 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-TgpG4rsv.js";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-DfQkb-L7.js";
2
2
  class t extends e {
3
3
  getType() {
4
4
  return "Payabli";
@@ -1,4 +1,4 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-TgpG4rsv.js";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-DfQkb-L7.js";
2
2
  class a extends e {
3
3
  getType() {
4
4
  return "SkyBank";