@payfurl/react-plugin 1.2.6 → 1.2.7

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 (59) hide show
  1. package/dist/CxPayThreeDsProvider-DAAmw4ya-CDOUGiWG.js +12 -0
  2. package/dist/DefaultThreeDsProvider-JPe2W_JG-bH2sJs83.js +241 -0
  3. package/dist/EcentricThreeDsProvider-Ddy0Fn5h-BDuqXhye.js +78 -0
  4. package/dist/{EpnaThreeDsProvider-C_tojNLc-DIM-7nJx.js → EpnaThreeDsProvider-Ng4Pmq0D-CwV4TNgl.js} +3 -3
  5. package/dist/FlashBancThreeDsProvider-DFZG4u44-6TmQipNC.js +12 -0
  6. package/dist/{GPaymentsThreeDsProvider-DSa9kCKg-BtB3DjwH.js → GPaymentsThreeDsProvider-BIku3bZP-DBcRTyGA.js} +34 -37
  7. package/dist/MetricsGlobalThreeDsProvider-BMeP5IWW-DAZlcVCc.js +135 -0
  8. package/dist/NmiThreeDsProvider-CzRH7vrp-O5u5frkm.js +12 -0
  9. package/dist/NuveiThreeDsProvider-DMO_bgOI-DV1Uqhrk.js +165 -0
  10. package/dist/PayGLocalThreeDsProvider-DDqJz4iC-DBo2F6p3.js +116 -0
  11. package/dist/PayWayAppleButton-DVoTz5Nn-1KU6o3AT.js +173 -0
  12. package/dist/{PayabliThreeDsProvider-COchAXx2-BQuz_Irn.js → PayabliThreeDsProvider-BWStZH6E-uKWOTuW-.js} +3 -3
  13. package/dist/SkyBankThreeDsProvider-U6pzbMJY-B9F5E7be.js +12 -0
  14. package/dist/cxpay-BnpH4Q1F-CqZusCD1.js +7 -0
  15. package/dist/default-B8ZcE4ja-Df8foed4.js +7 -0
  16. package/dist/ecentric-DwR-gEaW-D7EJixv8.js +7 -0
  17. package/dist/epna-BtQr8Mlq-CdoA1Foj.js +7 -0
  18. package/dist/{flashbanc-DrIG4m7r-BV1X_PsF.js → flashbanc-BNEJGUff-DX-o_bsN.js} +1 -1
  19. package/dist/{forter-CfW26Mkn-CmVDxLR0.js → forter-D0-GGAlC-B2I1zsvz.js} +18 -23
  20. package/dist/fraudProvider.type-Bzd9orn2-D-DU7Fmr.js +7 -0
  21. package/dist/fraudStatus.type-BvRk9kiK-zQpibcxa.js +24 -0
  22. package/dist/gpayments-QZCq0_0y-CChyao60.js +7 -0
  23. package/dist/index-BIgCRujv.js +11642 -0
  24. package/dist/metrics_global--mOHedmQ-BSlYrRxx.js +7 -0
  25. package/dist/nmi-BtKpUtad-RbToUxAS.js +7 -0
  26. package/dist/{nuvei-HtM7MLjQ-CTrF1cka.js → nuvei-BOfZN_Em-qgP8-fGC.js} +1 -1
  27. package/dist/{payabli-BgNx9N_g-DQ6euiaK.js → payabli-BfZ7IhDq-DQWCjgwk.js} +1 -1
  28. package/dist/payfurl-react.es.js +1 -1
  29. package/dist/payfurl-react.umd.js +26 -38
  30. package/dist/payglocal-CpEbJSpn-mfs00hdI.js +7 -0
  31. package/dist/payway_rest-CIjvQwcK-BcZGibTP.js +7 -0
  32. package/dist/plugins/payfurl/react/src/components/PayfurlDropin.d.ts +1 -1
  33. package/dist/skybank-DWPrfoAb-nBPi7AXK.js +7 -0
  34. package/dist/src/sdk/types/DropInOptions.type.d.ts +2 -0
  35. package/dist/src/sdk/types/GooglePayButtonOptions.type.d.ts +10 -0
  36. package/package.json +2 -2
  37. package/dist/CxPayThreeDsProvider-Bz7O7f0F-Ci3Y5QD-.js +0 -12
  38. package/dist/DefaultThreeDsProvider-VHq5xoNU-B98X5dUD.js +0 -224
  39. package/dist/EcentricThreeDsProvider-CWRQYa9Y-DBUNYhEB.js +0 -86
  40. package/dist/FlashBancThreeDsProvider-DvD_hlHn-BKR8ONrR.js +0 -12
  41. package/dist/MetricsGlobalThreeDsProvider-C1KPszqD-gukfr7oc.js +0 -146
  42. package/dist/NmiThreeDsProvider-CK1dan0G-vAf4JSbF.js +0 -12
  43. package/dist/NuveiThreeDsProvider-Cu2fB7rt-_VGkkIJi.js +0 -176
  44. package/dist/PayGLocalThreeDsProvider-Dsi0JOu8-C_RNLPw_.js +0 -127
  45. package/dist/PayWayAppleButton-DNeVogl8-C709mdwc.js +0 -157
  46. package/dist/SkyBankThreeDsProvider-BETsDyuS-DGje6s-d.js +0 -12
  47. package/dist/cxpay-CWoG5bR0-B5bioTOY.js +0 -7
  48. package/dist/default-CKovzYoW-BLSkXae5.js +0 -7
  49. package/dist/ecentric-RPlS3J2Q-CqmD9CJb.js +0 -7
  50. package/dist/epna-DIkbQdLV-D_8db8q0.js +0 -7
  51. package/dist/fraudProvider.type-ewIWghbD-ewIWghbD.js +0 -7
  52. package/dist/gpayments-DbPzgcxs-BWVhzASN.js +0 -7
  53. package/dist/index-B2hO1TjZ.js +0 -14112
  54. package/dist/metrics_global-CEnYLnX--CtPjo6_4.js +0 -7
  55. package/dist/nmi-DcUbphxD-CeDAyW0M.js +0 -7
  56. package/dist/payglocal-DvdtjOZ3-DYC6sOpu.js +0 -7
  57. package/dist/payway_rest-eM0Wk9-Y-Cw2A9cOC.js +0 -7
  58. package/dist/skybank-BFv-efpg-CwR7mlx2.js +0 -7
  59. /package/dist/{ThreeDsPostAuthResponse.type-CaV_50Qh-CaV_50Qh.js → ThreeDsPostAuthResponse.type-BFN9wqum-CaV_50Qh.js} +0 -0
@@ -1,176 +0,0 @@
1
- import { y as d, P as p, J as m, u as h, F as g, e as D, z as S, a as y, b as l } from "./index-B2hO1TjZ.js";
2
- import { DefaultThreeDsProvider as v, THREE_DS_METHOD_INVOCATION_COMPLETE as P, THREE_DS_CHALLENGE_COMPLETE as T } from "./DefaultThreeDsProvider-VHq5xoNU-B98X5dUD.js";
3
- var f = Object.defineProperty, I = (n, e, a) => e in n ? f(n, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : n[e] = a, c = (n, e, a) => I(n, typeof e != "symbol" ? e + "" : e, a);
4
- const N = { class: "mask" }, C = /* @__PURE__ */ g({
5
- __name: "nuvei",
6
- props: {
7
- threeDSServerTransID: {},
8
- sessionToken: {},
9
- env: {},
10
- merchantId: {},
11
- merchantSiteId: {},
12
- cardNumber: {},
13
- cardHolderName: {},
14
- expirationMonth: {},
15
- expirationYear: {},
16
- CVV: {},
17
- firstName: {},
18
- lastName: {},
19
- email: {},
20
- country: {}
21
- },
22
- setup(n) {
23
- const { hideSpinner: e, showSpinner: a } = h(), s = n;
24
- D(() => {
25
- a();
26
- const t = document.createElement("script");
27
- t.type = "text/javascript", t.src = "https://cdn.safecharge.com/safecharge_resources/v1/websdk/safecharge.js", t.onload = () => {
28
- const r = new MutationObserver(function() {
29
- document.getElementsByClassName("sfcModal-dialog")[0] && (e(), r.disconnect());
30
- }), i = { childList: !0 }, u = document.querySelector("body");
31
- r.observe(u, i), o();
32
- }, document.head.appendChild(t);
33
- });
34
- function o() {
35
- var t = SafeCharge({
36
- env: s.env,
37
- // Nuvei API environment - 'int' (integration) or 'prod' (production - default if omitted)
38
- merchantId: s.merchantId,
39
- //as assigned by Nuvei
40
- merchantSiteId: s.merchantSiteId
41
- // your Merchant Site ID provided by Nuvei
42
- });
43
- t.fields({
44
- fonts: [
45
- {
46
- cssUrl: "https://fonts.googleapis.com/css?family=Source+Code+Pro"
47
- }
48
- // include your custom fonts
49
- ],
50
- locale: "en"
51
- // You can set your users preferred locale. If not provided, we try to auto-detect.
52
- }), t.authenticate3d({
53
- sessionToken: s.sessionToken,
54
- // received from openOrder API
55
- paymentOption: {
56
- card: {
57
- cardNumber: s.cardNumber,
58
- cardHolderName: s.cardHolderName,
59
- expirationMonth: s.expirationMonth,
60
- expirationYear: s.expirationYear,
61
- CVV: s.CVV
62
- }
63
- },
64
- billingAddress: {
65
- firstName: s.firstName,
66
- lastName: s.lastName,
67
- email: s.email,
68
- country: s.country
69
- }
70
- }, function(r) {
71
- window.postMessage({ status: "3ds_challenge_complete", cres: r }, "*");
72
- });
73
- }
74
- return (t, r) => (S(), y("div", N, [...r[0] || (r[0] = [
75
- l("div", { class: "wrapper" }, [
76
- l("div", { class: "container" })
77
- ], -1)
78
- ])]));
79
- }
80
- }), _ = /* @__PURE__ */ m(C, [["__scopeId", "data-v-6293d147"]]), { hideSpinner: E } = h();
81
- class A extends v {
82
- constructor() {
83
- super(...arguments), c(this, "_paResPayload", null), c(this, "onSuccess", (e, a) => {
84
- var s, o;
85
- this.closeChallenge(), E();
86
- const t = JSON.parse(a);
87
- t.authenticationValue ? (s = this.threeDsProcessor) == null || s.onSuccess(t) : (this.log(`[${this.getType()}][_onSuccess] 3D Secure failed`, t), (o = this.threeDsProcessor) == null || o.onError({ error: "3D Secure failed" }));
88
- }), c(this, "onDoAuthSuccess", (e, a) => {
89
- var s, o, t;
90
- const r = JSON.parse(a);
91
- if (this.log(`[${this.getType()}][onDoAuthSuccess]`, r), !r.transStatus || !r.authenticationValue) {
92
- this.onError(e, "No transStatus specified");
93
- return;
94
- }
95
- switch (r.transStatus) {
96
- case "C":
97
- this.doNuveiChallenge(r.authenticationValue, (s = this.threeDsProcessor) == null ? void 0 : s.getAddressInfo(), (o = this.threeDsProcessor) == null ? void 0 : o.getPaymentInfo());
98
- break;
99
- default:
100
- this.log(`[${this.getType()}][threeDsAuth], 3DS challenge not required, tranStatus: ` + r.transStatus), (t = this.threeDsProcessor) == null || t.onSuccess({
101
- threeDSServerTransID: r.threeDSServerTransID,
102
- threeDSRequestorTransID: "",
103
- acsRenderingType: r.acsRenderingType,
104
- acsTransID: r.acsTransID,
105
- authenticationType: r.authenticationType,
106
- authenticationValue: r.authenticationValue,
107
- challengeCancel: "",
108
- dsTransID: r.dsTransID,
109
- eci: r.eci,
110
- interactionCounter: "",
111
- messageCategory: "",
112
- messageExtension: r.messageExtension,
113
- messageType: r.messageType,
114
- messageVersion: r.messageVersion,
115
- transStatus: r.transStatus,
116
- transStatusReason: r.transStatusReason
117
- });
118
- break;
119
- }
120
- });
121
- }
122
- getType() {
123
- return "Nuvei";
124
- }
125
- onPreAuth() {
126
- var e, a;
127
- this.log(`[${this.getType()}]: onPreAuth`), (e = this.threeDsProcessor) != null && e.getTokenId() ? (a = this.threeDsProcessor) == null || a.getCardDetails(this.threeDsProcessor.getProviderId(), this.threeDsProcessor.getTokenId(), (s) => {
128
- var o;
129
- (o = this.threeDsProcessor) == null || o.setPaymentInfo(s), super.onPreAuth();
130
- }, () => {
131
- d(this.container, "Unable to get card information");
132
- }) : super.onPreAuth();
133
- }
134
- onPostAuth() {
135
- var e;
136
- this.log(`[${this.getType()}][onAuth] Do Post Authentication for transId`, this.threeDSServerTransID, this._paResPayload), (e = this.threeDsProcessor) == null || e.onPostAuth({
137
- threeDSServerTransID: this.threeDSServerTransID,
138
- authenticationValue: this._paResPayload.cavv,
139
- eci: this._paResPayload.eci,
140
- dsTransID: this._paResPayload.dsTransID,
141
- threeDsVersion: this._paResPayload.threeDVersion,
142
- xid: this._paResPayload.xid
143
- }, this.onSuccess, this.onError);
144
- }
145
- doNuveiChallenge(e, a, s) {
146
- var o;
147
- const t = JSON.parse(e);
148
- (t === null || !t.merchantId || !t.merchantSiteId) && ((o = this.threeDsProcessor) == null || o.onError({ error: "3D Secure failed" })), a && (t.firstName = a.firstName, t.lastName = a.lastName, t.email = a.email, t.country = a.country), s && (t.cardNumber = s.cardNumber, t.cardHolderName = s.cardholder || "", t.expirationMonth = s.expiryDate.substring(2, 4), t.expirationYear = s.expiryDate.substring(0, 2), t.CVV = s.ccv);
149
- const { destroy: r } = p({
150
- el: document.body,
151
- component: _,
152
- props: t,
153
- on: {
154
- close: () => {
155
- var i;
156
- r(), this.threeDSDestroy = () => {
157
- }, (i = this.threeDsProcessor) == null || i.onError({ error: "Challenge cancelled" });
158
- }
159
- }
160
- });
161
- this.threeDSDestroy = r;
162
- }
163
- messageHandler(e) {
164
- var a, s, o;
165
- if ((a = e == null ? void 0 : e.data) != null && a.status) {
166
- if (e.data.status === P) {
167
- this.log(`[${this.getType()}][messageHandler] 3Ds Method invocation complete`), e.stopPropagation(), this.onAuth(!0, "");
168
- return;
169
- }
170
- e.data.status === T && (this.log(`[${this.getType()}][messageHandler] 3Ds Challenge complete`, e.data), e.stopPropagation(), this.closeChallenge(), e.data.cres && ((s = e.data.cres) == null ? void 0 : s.result) === "APPROVED" && ((o = e.data.cres) == null ? void 0 : o.errCode) === "0" ? (this._paResPayload = e.data.cres, this.onPostAuth()) : (this.log(`[${this.getType()}][messageHandler] Failed 3DS Challenge`, e.data), this.onError(400, "Failed 3DS Challenge")));
171
- }
172
- }
173
- }
174
- export {
175
- A as NuveiThreeDsProvider
176
- };
@@ -1,127 +0,0 @@
1
- import { DefaultThreeDsProvider as f } from "./DefaultThreeDsProvider-VHq5xoNU-B98X5dUD.js";
2
- import { y as h, P as C, J as w, F as E, i as D, O as I, g as L, e as m, h as p, z as S, a as k, b as g, k as R, j as b } from "./index-B2hO1TjZ.js";
3
- const c = D(!1);
4
- function A(r, ...e) {
5
- c.value && console.log(r, e);
6
- }
7
- function v(r) {
8
- var e, t;
9
- (e = r == null ? void 0 : r.data) != null && e.status && r.data.status === R && (c.value = !!((t = r == null ? void 0 : r.data) != null && t.debug));
10
- }
11
- function $() {
12
- return m(() => {
13
- window.addEventListener("message", v);
14
- }), p(() => {
15
- window.removeEventListener("message", v);
16
- }), {
17
- debug: c,
18
- logMessage: A
19
- };
20
- }
21
- const x = { class: "modal-mask" }, U = { class: "modal-wrapper" }, G = ["src"], M = /* @__PURE__ */ E({
22
- __name: "PayGLocalThreeDsChallenge",
23
- props: {
24
- url: {}
25
- },
26
- emits: ["close"],
27
- setup(r, { emit: e }) {
28
- const { logMessage: t } = $(), a = r, s = e, o = D(a.url), n = I(() => b(o.value) ? o.value : "");
29
- L(() => a.url, (l) => {
30
- o.value = l;
31
- }), m(() => {
32
- window.addEventListener("message", u);
33
- }), p(() => {
34
- window.removeEventListener("message", u);
35
- });
36
- function u(l) {
37
- var i;
38
- if (t("PayGLocalThreeDsChallenge: Message received", l.data), !((i = l == null ? void 0 : l.data) != null && i["payglocal-token"])) return;
39
- const d = l.data["payglocal-token"];
40
- t("Token received", d);
41
- const P = d.split(".")[1], T = window.atob(P), y = JSON.parse(T);
42
- s("close", y);
43
- }
44
- return (l, i) => (S(), k("div", x, [
45
- g("div", U, [
46
- g("iframe", {
47
- src: n.value,
48
- sandbox: "allow-same-origin allow-scripts allow-popups allow-forms"
49
- }, null, 8, G)
50
- ])
51
- ]));
52
- }
53
- }), O = /* @__PURE__ */ w(M, [["__scopeId", "data-v-0699f67d"]]);
54
- class F extends f {
55
- getType() {
56
- return "PayGLocal";
57
- }
58
- onPreAuth() {
59
- var e, t, a;
60
- if (this.log(`[${this.getType()}]: onPreAuth`), (e = this.threeDsProcessor) != null && e.getTokenId()) {
61
- (t = this.threeDsProcessor) == null || t.getCardDetails(this.threeDsProcessor.getProviderId(), this.threeDsProcessor.getTokenId(), (s, o) => {
62
- var n;
63
- this.log(`[${this.getType()}]: getCardDetails`, s, o), (n = this.threeDsProcessor) == null || n.setPaymentInfo(s), this.initChallenge(o.RedirectUrl);
64
- }, () => {
65
- h(this.container, "Unable to get card information");
66
- });
67
- return;
68
- }
69
- (a = this.threeDsProcessor) == null || a.tokeniseCard(this.threeDsProcessor.getProviderId(), (s) => {
70
- this.log(`[${this.getType()}]: tokeniseCard`, s), this.initChallenge(s.gatewayTokenData.RedirectUrl);
71
- }, (s) => {
72
- h(this.container, s);
73
- });
74
- }
75
- onAuth(e, t) {
76
- }
77
- onPostAuth() {
78
- }
79
- initChallenge(e) {
80
- if (this.log(`[${this.getType()}]: initChallenge`, e), !e) {
81
- h(this.container, "3D Secure URL is missing");
82
- return;
83
- }
84
- const { destroy: t } = C({
85
- el: document.body,
86
- component: O,
87
- props: {
88
- url: e
89
- },
90
- on: {
91
- close: (a) => {
92
- var s, o, n;
93
- if (this.closeChallenge(), this.log(`[${this.getType()}]: Challenge Results`, a), a.status === "AUTHORIZED") {
94
- (s = this.threeDsProcessor) == null || s.onSuccess({
95
- acsRenderingType: {},
96
- acsTransID: "",
97
- authenticationType: "",
98
- authenticationValue: "",
99
- challengeCancel: "",
100
- dsTransID: "",
101
- eci: "",
102
- interactionCounter: "",
103
- messageCategory: "",
104
- messageExtension: [],
105
- messageType: "",
106
- messageVersion: "",
107
- threeDSRequestorTransID: "",
108
- threeDSServerTransID: "",
109
- transStatusReason: "",
110
- transStatus: "Y"
111
- });
112
- return;
113
- }
114
- if (a.status === "CUSTOMER_CANCELLED") {
115
- (o = this.threeDsProcessor) == null || o.onError({ error: "Challenge cancelled" });
116
- return;
117
- }
118
- (n = this.threeDsProcessor) == null || n.onError({ error: "3D Secure failed" });
119
- }
120
- }
121
- });
122
- this.threeDSDestroy = t;
123
- }
124
- }
125
- export {
126
- F as PayGLocalThreeDsProvider
127
- };
@@ -1,157 +0,0 @@
1
- import { R as b, $ as v, T as g } from "./index-B2hO1TjZ.js";
2
- var A = Object.defineProperty, C = (n, t, e) => t in n ? A(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, i = (n, t, e) => C(n, typeof t != "symbol" ? t + "" : t, e);
3
- const h = {
4
- CHECKOUT: "CHECKOUT",
5
- CHARGE: "CHARGE"
6
- }, m = (n) => ({
7
- [h.CHECKOUT]: {
8
- url: n + "/payment_method/checkout",
9
- method: "POST"
10
- },
11
- [h.CHARGE]: {
12
- url: n + "/charge/checkout",
13
- method: "POST"
14
- }
15
- });
16
- class k {
17
- constructor(t, e, o, a, r, s) {
18
- i(this, "log"), i(this, "container"), i(this, "button", null), i(this, "validator", null), i(this, "validationError", null), i(this, "providerId"), i(this, "apiUrl"), i(this, "amount"), i(this, "currency"), i(this, "clientParameters"), i(this, "billingAddress", null), i(this, "customer", null), i(this, "order", null), i(this, "buttonId", "apple-pay-payway-button"), i(this, "validatorId", "apple-pay-payway-button-validator"), i(this, "onLoad", () => {
19
- }), i(this, "onSuccess"), i(this, "onFailure"), i(this, "userOnValidate"), i(this, "httpInvoker", null), this.log = t, this.apiUrl = s.apiUrl, this.container = e || document.body, this.clientParameters = s.clientParameters, this.providerId = s.providerId, this.amount = Number(a), this.currency = r, this.providerId = o, this.onSuccess = s.onSuccess || null, this.onFailure = s.onFailure || null, this.userOnValidate = s.onValidate;
20
- const c = new b(s.environment, v(s.publicKey));
21
- this.httpInvoker = new g(s.publicKey, s.version, c), this.init(), setInterval(() => {
22
- var d;
23
- if (this.validator) {
24
- if (((d = this.userOnValidate) == null ? void 0 : d.call(this)) === !1) {
25
- this.validator.style.display = "block";
26
- return;
27
- }
28
- this.validator.style.display = "none", this.validationError.style.display = "none";
29
- }
30
- }, 1e3);
31
- }
32
- draw() {
33
- const t = () => {
34
- this.onLoad = () => {
35
- };
36
- const e = {
37
- container: this.buttonId,
38
- publishableApiKey: this.clientParameters.PublishableApiKey,
39
- principalAmount: this.amount,
40
- currency: String(this.currency).toLowerCase(),
41
- buttonMode: "callback"
42
- };
43
- this.log("[createPaymentRequestButton]", e), window.payway.createPaymentRequestButton(e, (o, a) => {
44
- var r;
45
- if (this.log("[createPaymentRequestButton]", o, a), o) {
46
- (r = this.onFailure) == null || r.call(this, o);
47
- return;
48
- }
49
- this.checkout(a.singleUseTokenId);
50
- }), this.addValidator();
51
- };
52
- window.payway ? t() : this.onLoad = t;
53
- }
54
- show() {
55
- this.button && (this.button.style.display = "block");
56
- }
57
- hide() {
58
- this.button && (this.button.style.display = "none");
59
- }
60
- init() {
61
- const t = document.createElement("div");
62
- t.id = this.buttonId, t.style.position = "relative", this.container.appendChild(t), this.button = t, this.initScript();
63
- }
64
- addValidator() {
65
- var t;
66
- if (document.getElementById(this.validatorId))
67
- return;
68
- const e = document.createElement("div");
69
- e.id = this.validatorId, e.style.width = "100%", e.style.height = "100%", e.style.position = "absolute", e.style.top = "0", e.style.left = "0", e.style.display = "none", (t = this.button) == null || t.appendChild(e), this.validator = e;
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 e, o, a, r, s, c;
79
- const d = {
80
- providerId: this.providerId,
81
- amount: this.amount,
82
- currency: this.currency,
83
- reference: (e = this.order) == null ? void 0 : e.orderNumber,
84
- options: {
85
- ProviderToken: t
86
- },
87
- customer: {
88
- firstName: (o = this.customer) == null ? void 0 : o.firstName,
89
- lastName: (a = this.customer) == null ? void 0 : a.lastName,
90
- email: (r = this.customer) == null ? void 0 : r.email,
91
- phone: (s = this.customer) == null ? void 0 : s.phoneNumber,
92
- billingAddress: this.billingAddress && {
93
- name: `${this.billingAddress.firstName} ${this.billingAddress.lastName}`,
94
- addressLine1: this.billingAddress.streetAddress,
95
- addressLine2: this.billingAddress.streetAddress2,
96
- suburb: this.billingAddress.city,
97
- countryCode: this.billingAddress.country,
98
- postcode: this.billingAddress.postalCode,
99
- state: this.billingAddress.state
100
- } || void 0
101
- },
102
- items: this.order && this.order.orderItems.map((l) => ({
103
- name: l.name,
104
- reference: l.sku,
105
- quantity: Number(l.quantity),
106
- amount: Number(l.unitPrice)
107
- })) || []
108
- };
109
- this.log("[PayWayAppleButton][checkout]", d), (c = this.httpInvoker) == null || c.invoke(m(this.apiUrl)[h.CHECKOUT].url, m(this.apiUrl)[h.CHECKOUT].method, JSON.stringify(d), (l, u) => {
110
- this.log("[PayWayAppleButton][checkout]: successCheckoutHandler", l, u);
111
- const p = JSON.parse(u), y = JSON.parse(window.atob(p.checkoutData));
112
- this.log("[PayWayAppleButton][checkout]: decodedData", y), this.charge(y.checkoutId);
113
- }, (l, u) => {
114
- var p;
115
- this.log("[PayWayAppleButton][checkout]: failureCheckoutHandler", l, u);
116
- const y = JSON.parse(u);
117
- (p = this.onFailure) == null || p.call(this, { error: y.message });
118
- });
119
- }
120
- charge(t) {
121
- var e;
122
- this.log("[PayWayAppleButton][charge]", { checkoutId: t }), (e = this.httpInvoker) == null || e.invoke(m(this.apiUrl)[h.CHARGE].url, m(this.apiUrl)[h.CHARGE].method, JSON.stringify({ checkoutId: t }), (o, a) => {
123
- var r;
124
- this.log("[PayWayAppleButton][charge]: successChargeHandler", o, a);
125
- const s = JSON.parse(a);
126
- (r = this.onSuccess) == null || r.call(this, {
127
- transactionId: s == null ? void 0 : s.chargeId
128
- });
129
- }, (o, a) => {
130
- var r;
131
- this.log("[PayWayAppleButton][charge]: failureChargeHandler", o, a);
132
- const s = JSON.parse(a);
133
- (r = this.onFailure) == null || r.call(this, { error: s.message });
134
- });
135
- }
136
- redraw() {
137
- this.button && (this.button.innerHTML = "", this.draw());
138
- }
139
- setAmount(t) {
140
- this.log("[PayWayAppleButton][setAmount]", t), this.amount = t, this.redraw();
141
- }
142
- setCurrency(t) {
143
- this.log("[PayWayAppleButton][setCurrency]", t), this.currency = t, this.redraw();
144
- }
145
- setCustomerInfo(t) {
146
- this.log("[PayWayAppleButton][setCustomerInfo]", t), this.customer = { ...t };
147
- }
148
- setBillingAddress(t) {
149
- this.log("[PayWayAppleButton][setBillingAddress]", t), this.billingAddress = { ...t };
150
- }
151
- setOrderInfo(t) {
152
- this.log("[PayWayAppleButton][setOrderInfo]", t), this.order = { ...t };
153
- }
154
- }
155
- export {
156
- k as PayWayAppleButton
157
- };
@@ -1,12 +0,0 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-C1KPszqD-gukfr7oc.js";
2
- class s extends e {
3
- getType() {
4
- return "SkyBank";
5
- }
6
- getDomain() {
7
- return "secure.skybankgateway.com";
8
- }
9
- }
10
- export {
11
- s as SkyBankThreeDsProvider
12
- };
@@ -1,7 +0,0 @@
1
- import { CxPayThreeDsProvider as n } from "./CxPayThreeDsProvider-Bz7O7f0F-Ci3Y5QD-.js";
2
- function t(r, e, a) {
3
- return new n(r, e, a);
4
- }
5
- export {
6
- t as default
7
- };
@@ -1,7 +0,0 @@
1
- import { DefaultThreeDsProvider as o } from "./DefaultThreeDsProvider-VHq5xoNU-B98X5dUD.js";
2
- function a(e, r, t) {
3
- return new o(e, r, t);
4
- }
5
- export {
6
- a as default
7
- };
@@ -1,7 +0,0 @@
1
- import { EcentricThreeDsProvider as i } from "./EcentricThreeDsProvider-CWRQYa9Y-DBUNYhEB.js";
2
- function o(r, e, t) {
3
- return new i(r, e, t);
4
- }
5
- export {
6
- o as default
7
- };
@@ -1,7 +0,0 @@
1
- import { EpnaThreeDsProvider as n } from "./EpnaThreeDsProvider-C_tojNLc-DIM-7nJx.js";
2
- function t(r, e, a) {
3
- return new n(r, e, a);
4
- }
5
- export {
6
- t as default
7
- };
@@ -1,7 +0,0 @@
1
- var r;
2
- (function(e) {
3
- e.FORTER = "forter";
4
- })(r || (r = {}));
5
- export {
6
- r as FraudProviderType
7
- };
@@ -1,7 +0,0 @@
1
- import { GPaymentsThreeDsProvider as a } from "./GPaymentsThreeDsProvider-DSa9kCKg-BtB3DjwH.js";
2
- function o(e, r, t) {
3
- return new a(e, r, t);
4
- }
5
- export {
6
- o as default
7
- };