@payfurl/client 4.9.4 → 4.9.6

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 (24) hide show
  1. package/dist/sdk/{CloseIcon-DUKC8zu2.js → CloseIcon-BwxBac9r.js} +1040 -968
  2. package/dist/sdk/{DefaultThreeDsProvider-BQXZxRSe.js → DefaultThreeDsProvider-V6kOxHoH.js} +1 -1
  3. package/dist/sdk/{MetricsGlobalThreeDsProvider-CRGRhdai.js → MetricsGlobalThreeDsProvider-CgDVIbXk.js} +3 -3
  4. package/dist/sdk/{PayWayAppleButton-BoR7Jodl.js → PayWayAppleButton-NRBJ3jjI.js} +1 -1
  5. package/dist/sdk/{alerts-DMTJSYFZ.js → alerts-DE81O3wN.js} +1 -1
  6. package/dist/sdk/{cxpay-BpEM9LbT.js → cxpay-BEMrWL1q.js} +1 -1
  7. package/dist/sdk/{default-CE5nSCNU.js → default-BQDjOwfs.js} +1 -1
  8. package/dist/sdk/{ecentric-C-L8fXG9.js → ecentric-C5_oNEas.js} +2 -2
  9. package/dist/sdk/{epna-CJhaNici.js → epna-DX-S7yA6.js} +1 -1
  10. package/dist/sdk/{flashbanc-3uXb_QxD.js → flashbanc-xqp3XO6M.js} +1 -1
  11. package/dist/sdk/{forter-CMRlI8RN.js → forter-5rzXRwAX.js} +2 -2
  12. package/dist/sdk/{gpayments-D6zvi_nT.js → gpayments-DOv0-hRx.js} +2 -2
  13. package/dist/sdk/{metrics_global-Bkoz0wJ4.js → metrics_global-C--PnyF9.js} +1 -1
  14. package/dist/sdk/{nmi-D4gXIH6V.js → nmi-Y-RgOB0Y.js} +1 -1
  15. package/dist/sdk/{nuvei-ZtJQN-Yz.js → nuvei-BOMMfI_5.js} +2 -2
  16. package/dist/sdk/{payabli-DlSJfDyv.js → payabli-OU7W7cbE.js} +1 -1
  17. package/dist/sdk/payfurl.es.js +476 -516
  18. package/dist/sdk/payfurl.umd.js +8 -8
  19. package/dist/sdk/{payglocal-BC6XGiGa.js → payglocal-BxWTWcIu.js} +3 -3
  20. package/dist/sdk/{payway_rest-DJaZXkt6.js → payway_rest-BX6JbR1g.js} +1 -1
  21. package/dist/sdk/{skybank-D-w9VqY5.js → skybank-BxtSlq18.js} +1 -1
  22. package/dist/sdk/strings-DmWzID7u.js +174 -0
  23. package/package.json +1 -1
  24. package/dist/sdk/strings-5YUlt4uC.js +0 -113
@@ -1,6 +1,6 @@
1
- import { Dt as e, Et as t, It as n, Nt as r, Ot as i, Tt as a, Z as o, _t as s, ct as c, dt as l, h as u, vt as d, xt as f } from "./CloseIcon-DUKC8zu2.js";
2
- import { t as p } from "./alerts-DMTJSYFZ.js";
3
- import { t as m } from "./DefaultThreeDsProvider-BQXZxRSe.js";
1
+ import { Dt as e, Et as t, It as n, Nt as r, Ot as i, Tt as a, Z as o, _t as s, ct as c, dt as l, h as u, vt as d, xt as f } from "./CloseIcon-BwxBac9r.js";
2
+ import { t as p } from "./alerts-DE81O3wN.js";
3
+ import { t as m } from "./DefaultThreeDsProvider-V6kOxHoH.js";
4
4
  //#region src/iframe/setup/log.ts
5
5
  var h = n(!1);
6
6
  function g(e, ...t) {
@@ -1,4 +1,4 @@
1
- import { PayWayAppleButton as e } from "./PayWayAppleButton-BoR7Jodl.js";
1
+ import { PayWayAppleButton as e } from "./PayWayAppleButton-NRBJ3jjI.js";
2
2
  //#region src/sdk/processors/applepay/payway_rest.ts
3
3
  function t(t, n, r, i, a, o) {
4
4
  return new e(t, n, r, i, a, o);
@@ -1,4 +1,4 @@
1
- import { t as e } from "./MetricsGlobalThreeDsProvider-CRGRhdai.js";
1
+ import { t as e } from "./MetricsGlobalThreeDsProvider-CgDVIbXk.js";
2
2
  //#region src/sdk/3ds/SkyBankThreeDsProvider.ts
3
3
  var t = class extends e {
4
4
  getType() {
@@ -0,0 +1,174 @@
1
+ //#region src/sdk/config.local.ts
2
+ var e = {
3
+ baseUrl: "",
4
+ cssUrl: "",
5
+ redirectUrl: "",
6
+ url: "",
7
+ secureUrl: "/dist/secure/index.html",
8
+ apiUrl: "",
9
+ errorUrl: "https://y2it4xhgpx5junghaf3psg7a7q0splje.lambda-url.ap-southeast-2.on.aws"
10
+ }, t = {
11
+ baseUrl: "https://assets.payfurl.com",
12
+ cssUrl: "https://assets.payfurl.com/v4.9.6/js/",
13
+ url: "https://assets.payfurl.com/v4.9.6/iframe/index.html",
14
+ secureUrl: "https://assets.payfurl.com/v4.9.6/secure/index.html",
15
+ redirectUrl: "https://assets.payfurl.com/v4.9.6/checkout/redirect.html",
16
+ apiUrl: "https://develop-api.payfurl.com",
17
+ errorUrl: "https://y2it4xhgpx5junghaf3psg7a7q0splje.lambda-url.ap-southeast-2.on.aws"
18
+ }, n = {
19
+ baseUrl: "https://assets.payfurl.com",
20
+ cssUrl: "https://assets.payfurl.com/v4.9.6/js/",
21
+ url: "https://assets.payfurl.com/v4.9.6/iframe/index.html",
22
+ secureUrl: "https://assets.payfurl.com/v4.9.6/secure/index.html",
23
+ redirectUrl: "https://assets.payfurl.com/v4.9.6/checkout/redirect.html",
24
+ apiUrl: "https://sandbox-api.payfurl.com",
25
+ errorUrl: "https://gujl7xo5fhpkjaain4swyiymt40loyia.lambda-url.ap-southeast-2.on.aws"
26
+ }, r = {
27
+ baseUrl: "https://assets.payfurl.com",
28
+ cssUrl: "https://assets.payfurl.com/v4.9.6/js/",
29
+ url: "https://assets.payfurl.com/v4.9.6/iframe/index.html",
30
+ secureUrl: "https://assets.payfurl.com/v4.9.6/secure/index.html",
31
+ redirectUrl: "https://assets.payfurl.com/v4.9.6/checkout/redirect.html",
32
+ apiUrl: "https://api.payfurl.com",
33
+ errorUrl: "https://4rvkh6tupgcmqk3b2igkpdi2zi0mveyg.lambda-url.ap-southeast-2.on.aws"
34
+ }, i = {
35
+ name: "@payfurl/client",
36
+ private: !1,
37
+ version: "4.9.6",
38
+ files: ["dist/sdk"],
39
+ type: "module",
40
+ main: "./dist/sdk/payfurl.umd.js",
41
+ module: "./dist/sdk/payfurl.es.js",
42
+ types: "./dist/sdk/payfurl.d.ts",
43
+ exports: { ".": {
44
+ import: "./dist/sdk/payfurl.es.js",
45
+ require: "./dist/sdk/payfurl.umd.js"
46
+ } },
47
+ scripts: {
48
+ dev: "node .build/config-local.mjs && vite -c vite.iframe.config.ts",
49
+ "build-iframe": "node .build/config-local.mjs && vite build -c vite.iframe.config.ts --emptyOutDir",
50
+ "build-secure": "node .build/config-local.mjs && vite build -c vite.secure.config.ts --emptyOutDir",
51
+ "build-sdk": "node .build/config-local.mjs && vite build -c vite.sdk.config.ts",
52
+ build: "npm run build-all",
53
+ "build-all": "npm run build-iframe && npm run build-secure && npm run build-sdk",
54
+ preview: "vite preview",
55
+ server: "python3 -m http.server 3001",
56
+ test: "node .build/config-local.mjs && jest",
57
+ "update-packages": "ncu -u && npm update --save",
58
+ remove_js: "git ls-files -o --exclude-standard | grep '.js' | xargs rm",
59
+ remove_d_ts: "git ls-files -o --exclude-standard | grep '.d.ts' | xargs rm"
60
+ },
61
+ dependencies: {
62
+ dayjs: "^1.11.13",
63
+ vue: "^3.5.10"
64
+ },
65
+ devDependencies: {
66
+ "@babel/preset-env": "^7.25.4",
67
+ "@babel/types": "^7.25.6",
68
+ "@jest/globals": "^29.7.0",
69
+ "@rollup/plugin-typescript": "^12.1.0",
70
+ "@types/applepayjs": "^14.0.8",
71
+ "@types/jest": "^29.5.13",
72
+ "@types/jest-when": "^3.5.5",
73
+ "@types/node": "^22.7.4",
74
+ "@vitejs/plugin-vue": "^6.0.7",
75
+ "@vue/eslint-config-prettier": "^9.0.0",
76
+ "@vue/eslint-config-typescript": "^13.0.0",
77
+ "@vue/vue3-jest": "^29.2.6",
78
+ "babel-jest": "^29.7.0",
79
+ eslint: "^8.56.0",
80
+ "eslint-plugin-vue": "^9.28.0",
81
+ jest: "^29.7.0",
82
+ "jest-environment-jsdom": "^29.7.0",
83
+ "jest-when": "^3.6.0",
84
+ prettier: "^3.3.3",
85
+ "rollup-plugin-visualizer": "^5.12.0",
86
+ "ts-jest": "^29.2.5",
87
+ "ts-node": "^10.9.2",
88
+ tslib: "^2.8.1",
89
+ typescript: "^5.6.2",
90
+ vite: "^8.0.16",
91
+ "vite-plugin-checker": "^0.8.0",
92
+ "vue-tsc": "^2.1.6"
93
+ }
94
+ }, a;
95
+ (function(e) {
96
+ e.LOCAL = "local", e.DEVELOPMENT = "development", e.SANDBOX = "sandbox", e.PRODUCTION = "production";
97
+ })(a ||= {});
98
+ var o = {
99
+ [a.LOCAL]: e,
100
+ [a.DEVELOPMENT]: t,
101
+ [a.SANDBOX]: n,
102
+ [a.PRODUCTION]: r
103
+ };
104
+ function s(e) {
105
+ let t = o[e];
106
+ return t && Object.fromEntries(Object.entries(t).map(([e, t]) => [e, t.split("{VERSION}").join(i.version)]));
107
+ }
108
+ function c(e) {
109
+ let t = o[e];
110
+ return t ||= o[a.PRODUCTION], t.errorUrl;
111
+ }
112
+ //#endregion
113
+ //#region src/utils/httpInvoker.ts
114
+ var l = class {
115
+ publicKey = "";
116
+ version = "";
117
+ regionResolver = null;
118
+ constructor(e, t, n) {
119
+ this.publicKey = e || "", this.version = t || "", this.regionResolver = n || null;
120
+ }
121
+ invoke(e, t, n, r, i, a) {
122
+ let o = new XMLHttpRequest();
123
+ o || i?.(0, ""), o.onreadystatechange = function() {
124
+ o.readyState === 4 && (o.status === 200 || o.status === 201 ? r?.(o.status, o.responseText) : i?.(o.status, o.responseText));
125
+ };
126
+ let s = new URL(e);
127
+ if (this.regionResolver && (s.hostname = new URL(this.regionResolver.getRegionUrl()).hostname), o.open(t, s.toString()), o.setRequestHeader("Content-Type", "application/json"), this.publicKey && o.setRequestHeader("x-publickey", this.publicKey), this.version && o.setRequestHeader("sdk-version", this.version), a) for (let [e, t] of Object.entries(a)) o.setRequestHeader(e, t);
128
+ o.send(String(n));
129
+ }
130
+ }, u = { domain: "payfurl.com" }, d = {
131
+ [a.DEVELOPMENT]: {
132
+ AU: `https://develop-api-au.${u.domain}`,
133
+ DEFAULT: `https://develop-api.${u.domain}`
134
+ },
135
+ [a.SANDBOX]: {
136
+ AU: `https://sandbox-api-au.${u.domain}`,
137
+ DEFAULT: `https://sandbox-api.${u.domain}`
138
+ },
139
+ [a.PRODUCTION]: {
140
+ AU: `https://api-au.${u.domain}`,
141
+ DEFAULT: `https://api.${u.domain}`
142
+ },
143
+ [a.LOCAL]: { DEFAULT: "https://localhost:5001" }
144
+ }, f = class {
145
+ environment;
146
+ location;
147
+ constructor(e, t) {
148
+ this.environment = e.toLowerCase(), this.location = t.toUpperCase();
149
+ }
150
+ getRegionUrl() {
151
+ if (!d[this.environment]) throw Error(`Invalid environment: ${this.environment}`);
152
+ return d[this.environment][this.location] || d[this.environment].DEFAULT;
153
+ }
154
+ };
155
+ //#endregion
156
+ //#region src/utils/strings.ts
157
+ function p(e) {
158
+ return e.charAt(0).toUpperCase() + e.slice(1);
159
+ }
160
+ function m(e) {
161
+ return e.match(/-([a-z]{2})$/)?.[1] || "";
162
+ }
163
+ function h(e) {
164
+ let t = e.match(/\+(9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)(\d{1,14})$/);
165
+ return t ? [t[1], t[2]] : [e];
166
+ }
167
+ function g(e) {
168
+ return e ? e.replace(/(\d{4})\d{8}(\d{4})/, "$1 **** **** $2") : "";
169
+ }
170
+ function _(e) {
171
+ return e.replace(/\s/g, "");
172
+ }
173
+ //#endregion
174
+ export { h as a, a as c, i as d, g as i, s as l, p as n, f as o, m as r, l as s, _ as t, c as u };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@payfurl/client",
3
3
  "private": false,
4
- "version": "4.9.4",
4
+ "version": "4.9.6",
5
5
  "files": [
6
6
  "dist/sdk"
7
7
  ],
@@ -1,113 +0,0 @@
1
- //#region src/sdk/config.local.ts
2
- var e = {
3
- baseUrl: "",
4
- cssUrl: "",
5
- redirectUrl: "",
6
- url: "",
7
- secureUrl: "/dist/secure/index.html",
8
- apiUrl: "",
9
- errorUrl: "https://y2it4xhgpx5junghaf3psg7a7q0splje.lambda-url.ap-southeast-2.on.aws"
10
- }, t = {
11
- baseUrl: "https://assets.payfurl.com",
12
- cssUrl: "https://assets.payfurl.com/v4.9.4/js/",
13
- url: "https://assets.payfurl.com/v4.9.4/iframe/index.html",
14
- secureUrl: "https://assets.payfurl.com/v4.9.4/secure/index.html",
15
- redirectUrl: "https://assets.payfurl.com/v4.9.4/checkout/redirect.html",
16
- apiUrl: "https://develop-api.payfurl.com",
17
- errorUrl: "https://y2it4xhgpx5junghaf3psg7a7q0splje.lambda-url.ap-southeast-2.on.aws"
18
- }, n = {
19
- baseUrl: "https://assets.payfurl.com",
20
- cssUrl: "https://assets.payfurl.com/v4.9.4/js/",
21
- url: "https://assets.payfurl.com/v4.9.4/iframe/index.html",
22
- secureUrl: "https://assets.payfurl.com/v4.9.4/secure/index.html",
23
- redirectUrl: "https://assets.payfurl.com/v4.9.4/checkout/redirect.html",
24
- apiUrl: "https://sandbox-api.payfurl.com",
25
- errorUrl: "https://gujl7xo5fhpkjaain4swyiymt40loyia.lambda-url.ap-southeast-2.on.aws"
26
- }, r = {
27
- baseUrl: "https://assets.payfurl.com",
28
- cssUrl: "https://assets.payfurl.com/v4.9.4/js/",
29
- url: "https://assets.payfurl.com/v4.9.4/iframe/index.html",
30
- secureUrl: "https://assets.payfurl.com/v4.9.4/secure/index.html",
31
- redirectUrl: "https://assets.payfurl.com/v4.9.4/checkout/redirect.html",
32
- apiUrl: "https://api.payfurl.com",
33
- errorUrl: "https://4rvkh6tupgcmqk3b2igkpdi2zi0mveyg.lambda-url.ap-southeast-2.on.aws"
34
- }, i;
35
- (function(e) {
36
- e.LOCAL = "local", e.DEVELOPMENT = "development", e.SANDBOX = "sandbox", e.PRODUCTION = "production";
37
- })(i ||= {});
38
- var a = {
39
- [i.LOCAL]: e,
40
- [i.DEVELOPMENT]: t,
41
- [i.SANDBOX]: n,
42
- [i.PRODUCTION]: r
43
- };
44
- function o(e) {
45
- return a[e];
46
- }
47
- function s(e) {
48
- let t = a[e];
49
- return t ||= a[i.PRODUCTION], t.errorUrl;
50
- }
51
- //#endregion
52
- //#region src/utils/httpInvoker.ts
53
- var c = class {
54
- publicKey = "";
55
- version = "";
56
- regionResolver = null;
57
- constructor(e, t, n) {
58
- this.publicKey = e || "", this.version = t || "", this.regionResolver = n || null;
59
- }
60
- invoke(e, t, n, r, i, a) {
61
- let o = new XMLHttpRequest();
62
- o || i?.(0, ""), o.onreadystatechange = function() {
63
- o.readyState === 4 && (o.status === 200 || o.status === 201 ? r?.(o.status, o.responseText) : i?.(o.status, o.responseText));
64
- };
65
- let s = new URL(e);
66
- if (this.regionResolver && (s.hostname = new URL(this.regionResolver.getRegionUrl()).hostname), o.open(t, s.toString()), o.setRequestHeader("Content-Type", "application/json"), this.publicKey && o.setRequestHeader("x-publickey", this.publicKey), this.version && o.setRequestHeader("sdk-version", this.version), a) for (let [e, t] of Object.entries(a)) o.setRequestHeader(e, t);
67
- o.send(String(n));
68
- }
69
- }, l = { domain: "payfurl.com" }, u = {
70
- [i.DEVELOPMENT]: {
71
- AU: `https://develop-api-au.${l.domain}`,
72
- DEFAULT: `https://develop-api.${l.domain}`
73
- },
74
- [i.SANDBOX]: {
75
- AU: `https://sandbox-api-au.${l.domain}`,
76
- DEFAULT: `https://sandbox-api.${l.domain}`
77
- },
78
- [i.PRODUCTION]: {
79
- AU: `https://api-au.${l.domain}`,
80
- DEFAULT: `https://api.${l.domain}`
81
- },
82
- [i.LOCAL]: { DEFAULT: "https://localhost:5001" }
83
- }, d = class {
84
- environment;
85
- location;
86
- constructor(e, t) {
87
- this.environment = e.toLowerCase(), this.location = t.toUpperCase();
88
- }
89
- getRegionUrl() {
90
- if (!u[this.environment]) throw Error(`Invalid environment: ${this.environment}`);
91
- return u[this.environment][this.location] || u[this.environment].DEFAULT;
92
- }
93
- };
94
- //#endregion
95
- //#region src/utils/strings.ts
96
- function f(e) {
97
- return e.charAt(0).toUpperCase() + e.slice(1);
98
- }
99
- function p(e) {
100
- return e.match(/-([a-z]{2})$/)?.[1] || "";
101
- }
102
- function m(e) {
103
- let t = e.match(/\+(9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)(\d{1,14})$/);
104
- return t ? [t[1], t[2]] : [e];
105
- }
106
- function h(e) {
107
- return e ? e.replace(/(\d{4})\d{8}(\d{4})/, "$1 **** **** $2") : "";
108
- }
109
- function g(e) {
110
- return e.replace(/\s/g, "");
111
- }
112
- //#endregion
113
- export { m as a, i as c, h as i, o as l, f as n, d as o, p as r, c as s, g as t, s as u };