@astropay/payments-lib 1.0.4 → 2.0.0
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.
- package/README.md +18 -8
- package/dist/astropay-payments-lib.es.js +1 -1
- package/dist/astropay-payments-lib.umd.js +143 -148
- package/dist/{main-BtluJl6M.js → main-DhA4kci7.js} +14710 -14466
- package/dist/{profiler-CtuhY6VX.js → profiler-CVMzUp0S.js} +1 -1
- package/dist/public/AstroPayCardPayment/index.d.ts +1 -3
- package/dist/{startRecording-hiPgcX9z.js → startRecording-DlN4lIUz.js} +1 -1
- package/dist/types/index.d.ts +3 -7
- package/package.json +3 -8
|
@@ -9,9 +9,6 @@ import { APCardPayment } from '../../types';
|
|
|
9
9
|
* amount: 100,
|
|
10
10
|
* currency: 'USD',
|
|
11
11
|
* country: 'BR'
|
|
12
|
-
* config: {
|
|
13
|
-
* userId: 'user-id-789';
|
|
14
|
-
* },
|
|
15
12
|
* // Optional props
|
|
16
13
|
* showPaymentSummary: true,
|
|
17
14
|
* expirationDateFormat: 'MM/YY'
|
|
@@ -30,6 +27,7 @@ export declare class AstroPayCardPayment extends Component<HTMLDivElement> {
|
|
|
30
27
|
private createPayment;
|
|
31
28
|
private renderAstroPayCardMethod;
|
|
32
29
|
private showErrorMessage;
|
|
30
|
+
private showSuccessContent;
|
|
33
31
|
/**
|
|
34
32
|
* Renders the payment component into the specified DOM container.
|
|
35
33
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as A, C, b as ft, i as Y, g as V, N as h, P as X, S as pt, a as B, c as ht, d as mt, e as St, f as q, r as gt, h as Et, j as yt, k as Tt, l as j, m as J, t as _, n as x, o as M, p as K, q as N, u as Q, v as Z, w as Nt, x as vt, y as b, z as D, A as R, B as wt, D as Mt, E as It, F as Rt, G as Ct, H as bt, I as _t, J as Lt, K as Dt, L as xt, M as Ot, O as At, Q as Vt, R as Pt, T as kt, U as zt } from "./main-
|
|
1
|
+
import { s as A, C, b as ft, i as Y, g as V, N as h, P as X, S as pt, a as B, c as ht, d as mt, e as St, f as q, r as gt, h as Et, j as yt, k as Tt, l as j, m as J, t as _, n as x, o as M, p as K, q as N, u as Q, v as Z, w as Nt, x as vt, y as b, z as D, A as R, B as wt, D as Mt, E as It, F as Rt, G as Ct, H as bt, I as _t, J as Lt, K as Dt, L as xt, M as Ot, O as At, Q as Vt, R as Pt, T as kt, U as zt } from "./main-DhA4kci7.js";
|
|
2
2
|
const P = /* @__PURE__ */ new WeakMap();
|
|
3
3
|
function T(t) {
|
|
4
4
|
return P.has(t);
|
package/dist/types/index.d.ts
CHANGED
|
@@ -9,9 +9,6 @@ type APEnvironment = (typeof CONFIG_ENVIRONMENT_VALUES)[number];
|
|
|
9
9
|
type APAvailableTheme = (typeof CONFIG_THEME_VALUES)[number];
|
|
10
10
|
type APAvailableLanguages = (typeof CONFIG_LANGUAGE_VALUES)[number];
|
|
11
11
|
type APAvailableCurrencyMode = (typeof CONFIG_CURRENCY_MODE_VALUES)[number];
|
|
12
|
-
type APCardConfig = {
|
|
13
|
-
userId: string;
|
|
14
|
-
};
|
|
15
12
|
type APComponentStyles = {
|
|
16
13
|
backgroundColor: string;
|
|
17
14
|
fontFamily: string;
|
|
@@ -199,10 +196,10 @@ type APFullCheckout = {
|
|
|
199
196
|
paymentExternalId?: string;
|
|
200
197
|
showTitle?: boolean;
|
|
201
198
|
showDescription?: boolean;
|
|
202
|
-
cardConfig?:
|
|
199
|
+
cardConfig?: {
|
|
203
200
|
showPaymentSummary?: boolean;
|
|
204
201
|
expirationDateFormat?: 'MM/YYYY' | 'MM/YY';
|
|
205
|
-
}
|
|
202
|
+
} | undefined;
|
|
206
203
|
user?: {
|
|
207
204
|
phoneNumber?: string;
|
|
208
205
|
email?: string;
|
|
@@ -295,7 +292,6 @@ type APCardPayment = {
|
|
|
295
292
|
amount: number;
|
|
296
293
|
currency: string;
|
|
297
294
|
country: string;
|
|
298
|
-
config: APCardConfig;
|
|
299
295
|
showPaymentSummary?: boolean | undefined;
|
|
300
296
|
expirationDateFormat?: 'MM/YYYY' | 'MM/YY' | undefined;
|
|
301
297
|
order?: {
|
|
@@ -333,4 +329,4 @@ type APCardPayment = {
|
|
|
333
329
|
onSuccess?: () => void;
|
|
334
330
|
onError?: () => void;
|
|
335
331
|
};
|
|
336
|
-
export type {
|
|
332
|
+
export type { APEnvironment, APAvailableTheme, APAvailableLanguages, APAvailableCurrencyMode, APComponentStyles, APCore, APFullCheckout, APPayment, APCardPayment, };
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "2.0.0",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"name": "@astropay/payments-lib",
|
|
5
5
|
"description": "Official AstroPay payments library for web and mobile.",
|
|
@@ -76,26 +76,20 @@
|
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@commitlint/cli": "^19.7.1",
|
|
78
78
|
"@commitlint/config-conventional": "^19.7.1",
|
|
79
|
-
"@emotion/css": "^11.13.5",
|
|
80
79
|
"@eslint/js": "^9.25.1",
|
|
81
|
-
"@types/axios": "^0.14.4",
|
|
82
80
|
"@types/jest": "^29.5.14",
|
|
83
81
|
"@types/node": "^22.13.1",
|
|
84
82
|
"@types/qrcode": "^1.5.5",
|
|
85
83
|
"@typescript-eslint/eslint-plugin": "^8.31.1",
|
|
86
84
|
"@typescript-eslint/parser": "^8.31.1",
|
|
87
|
-
"axios": "^1.7.9",
|
|
88
|
-
"bowser": "^2.11.0",
|
|
89
85
|
"commitizen": "^4.3.1",
|
|
90
86
|
"cz-conventional-changelog": "^3.3.0",
|
|
91
87
|
"eslint": "^9.25.1",
|
|
92
88
|
"eslint-plugin-import": "^2.31.0",
|
|
93
89
|
"globals": "^16.0.0",
|
|
94
90
|
"husky": "^9.1.7",
|
|
95
|
-
"i18next": "^24.2.2",
|
|
96
91
|
"jest": "^29.7.0",
|
|
97
92
|
"prettier": "^3.4.2",
|
|
98
|
-
"qrcode": "^1.5.4",
|
|
99
93
|
"rollup-plugin-visualizer": "^5.14.0",
|
|
100
94
|
"standard-version": "^9.5.0",
|
|
101
95
|
"ts-jest": "^29.3.1",
|
|
@@ -109,5 +103,6 @@
|
|
|
109
103
|
"commitizen": {
|
|
110
104
|
"path": "./node_modules/cz-conventional-changelog"
|
|
111
105
|
}
|
|
112
|
-
}
|
|
106
|
+
},
|
|
107
|
+
"packageManager": "npm@11.6.1"
|
|
113
108
|
}
|