@paykka/card-checkout-ui 0.6.0 → 0.7.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/dist/card-checkout-ui.js +12 -12
- package/dist/card-checkout-ui.umd.cjs +12 -12
- package/dist/es/api/index.js +0 -2
- package/dist/es/api/modules/checkout/index.js +1 -15
- package/dist/es/api/modules/checkout/map.js +20 -3
- package/dist/es/api/modules/index.js +0 -2
- package/dist/es/components/AccountNameField/index.js +0 -3
- package/dist/es/components/AddressField/index.js +2 -7
- package/dist/es/components/AliPay/index.js +8 -7
- package/dist/es/components/ApplePay/index.js +7 -8
- package/dist/es/components/Card/index.js +301 -125
- package/dist/es/components/CardBrands/index.js +0 -2
- package/dist/es/components/CardExpireDateField/index.js +1 -4
- package/dist/es/components/CardHolderNameField/index.js +3 -5
- package/dist/es/components/CardIBANField/index.js +0 -3
- package/dist/es/components/CardNo/index.js +0 -2
- package/dist/es/components/CardNumberField/index.js +1 -4
- package/dist/es/components/CardSecurityCodeField/index.js +1 -4
- package/dist/es/components/CardSelector/index.js +0 -3
- package/dist/es/components/CombinedCardInfo/index.js +99 -0
- package/dist/es/components/EmailField/EmailField.js +0 -3
- package/dist/es/components/EncryptedCard/index.js +35 -75
- package/dist/es/components/GooglePay/index.js +62 -28
- package/dist/es/components/RecurringTip/index.js +0 -2
- package/dist/es/components/SecuredFieldsProvider/index.js +230 -1
- package/dist/es/components/SecuredIframe/index.js +3 -1
- package/dist/es/components/Sepa/index.js +21 -27
- package/dist/es/components/SubmitButton/index.js +0 -2
- package/dist/es/components/ThreeDS/index.js +94 -0
- package/dist/es/components/WechatPay/index.js +26 -25
- package/dist/es/components/index.js +1 -3
- package/dist/es/components/internal/Button/Button.js +0 -2
- package/dist/es/components/internal/Button/index.js +0 -2
- package/dist/es/components/internal/CheckBox/CheckBox.js +0 -2
- package/dist/es/components/internal/CheckBox/index.js +0 -2
- package/dist/es/components/internal/Form/type.js +0 -2
- package/dist/es/components/internal/Info/Info.js +0 -2
- package/dist/es/components/internal/Info/index.js +0 -2
- package/dist/es/components/internal/Input/Input.js +2 -2
- package/dist/es/components/internal/Input/type.js +0 -2
- package/dist/es/components/internal/LoadingCheck/LoadingCheck.js +0 -2
- package/dist/es/components/internal/LoadingCheck/index.js +0 -2
- package/dist/es/components/internal/Modal/Modal.js +40 -0
- package/dist/es/components/internal/Modal/modal2.js +1 -0
- package/dist/es/components/internal/Select/Select.js +0 -2
- package/dist/es/components/internal/Select/SelectMenu.js +0 -2
- package/dist/es/components/internal/Select/SelectMenuItem.js +0 -2
- package/dist/es/components/internal/icons/Icon3DSFail.js +3 -0
- package/dist/es/components/internal/icons/Icon3DSInfo.js +62 -0
- package/dist/es/components/internal/icons/Icon3DSSuccess.js +3 -0
- package/dist/es/config.js +0 -2
- package/dist/es/constant.js +3 -2
- package/dist/es/core/PayKKaCheckout.js +96 -42
- package/dist/es/core/Session.js +7 -6
- package/dist/es/core/environment.js +26 -0
- package/dist/es/core/error.js +21 -0
- package/dist/es/core/index.js +0 -2
- package/dist/es/core/query.js +0 -2
- package/dist/es/core.js +34 -34
- package/dist/es/hooks/index.js +0 -2
- package/dist/es/hooks/useBreakpoints.js +57 -0
- package/dist/es/hooks/useI18n.js +1 -2
- package/dist/es/hooks/usePayState.js +18 -24
- package/dist/es/i18n/index.js +0 -2
- package/dist/es/i18n/locales/de-DE.js +11 -1
- package/dist/es/i18n/locales/en-GB.js +11 -1
- package/dist/es/i18n/locales/es-ES.js +11 -1
- package/dist/es/i18n/locales/fr-FR.js +11 -1
- package/dist/es/i18n/locales/index.js +8 -6
- package/dist/es/i18n/locales/ja-JP.js +11 -1
- package/dist/es/i18n/locales/ko-KR.js +11 -1
- package/dist/es/i18n/locales/pt-PT.js +11 -1
- package/dist/es/i18n/locales/ru-RU.js +11 -1
- package/dist/es/i18n/locales/zh-CN.js +11 -1
- package/dist/es/i18n/locales/zh-HK.js +11 -1
- package/dist/es/i18n/locales/zh-TW.js +11 -1
- package/dist/es/i18n/util.js +11 -8
- package/dist/es/index.js +4 -2
- package/dist/es/style.css +186 -4
- package/dist/es/types/message.js +28 -0
- package/dist/es/utils/card-brand/brands.js +12 -10
- package/dist/es/utils/card-brand/index.js +3 -2
- package/dist/es/utils/iframe.js +23 -0
- package/dist/es/utils/index.js +0 -1
- package/dist/es/utils/style.js +47 -0
- package/dist/style.css +1 -1
- package/dist/types/api/modules/checkout/type.d.ts +14 -1
- package/dist/types/api/modules/get-browser-params.d.ts +1 -1
- package/dist/types/components/AddressField/type.d.ts +1 -0
- package/dist/types/components/AliPay/type.d.ts +4 -2
- package/dist/types/components/ApplePay/type.d.ts +4 -3
- package/dist/types/components/Card/type.d.ts +56 -10
- package/dist/types/components/CardHolderNameField/type.d.ts +1 -1
- package/dist/types/components/CombinedCardInfo/CombinedCardInfo.d.ts +5 -0
- package/dist/types/components/CombinedCardInfo/index.d.ts +2 -0
- package/dist/types/components/{CombinedEncryptedField → CombinedCardInfo}/type.d.ts +3 -2
- package/dist/types/components/GooglePay/type.d.ts +4 -3
- package/dist/types/components/SecuredFieldsProvider/index.d.ts +1 -0
- package/dist/types/components/SecuredFieldsProvider/type.d.ts +1 -153
- package/dist/types/components/SecuredFieldsProvider/utils/index.d.ts +1 -1
- package/dist/types/components/SecuredIframe/useSecuredInput.d.ts +2 -1
- package/dist/types/components/Sepa/type.d.ts +4 -2
- package/dist/types/components/ThreeDS/components/ThreeDSAuth/ThreeDSAuth.d.ts +3 -0
- package/dist/types/components/ThreeDS/components/ThreeDSAuth/index.d.ts +2 -0
- package/dist/types/components/ThreeDS/components/ThreeDSAuth/type.d.ts +17 -0
- package/dist/types/components/ThreeDS/components/ThreeDSIframe/ThreeDSIframe.d.ts +2 -0
- package/dist/types/components/ThreeDS/components/ThreeDSIframe/index.d.ts +1 -0
- package/dist/types/components/ThreeDS/components/ThreeDSIframe/output.d.ts +1 -0
- package/dist/types/components/ThreeDS/components/ThreeDSIframe/type.d.ts +5 -0
- package/dist/types/components/ThreeDS/components/ThreeDSStatus/ThreeDSStatus.d.ts +3 -0
- package/dist/types/components/ThreeDS/components/ThreeDSStatus/output.d.ts +1 -0
- package/dist/types/components/ThreeDS/components/ThreeDSStatus/type.d.ts +6 -0
- package/dist/types/components/ThreeDS/index.d.ts +1 -0
- package/dist/types/components/WechatPay/type.d.ts +4 -2
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/components/internal/Input/type.d.ts +1 -0
- package/dist/types/components/internal/Loading/Loading.d.ts +1 -0
- package/dist/types/components/internal/Loading/index.d.ts +1 -0
- package/dist/types/components/internal/Modal/Modal.d.ts +5 -0
- package/dist/types/components/internal/Modal/index.d.ts +0 -0
- package/dist/types/components/internal/Modal/type.d.ts +20 -0
- package/dist/types/components/internal/icons/Icon3DSFail.d.ts +2 -0
- package/dist/types/components/internal/icons/Icon3DSInfo.d.ts +2 -0
- package/dist/types/components/internal/icons/Icon3DSSuccess.d.ts +2 -0
- package/dist/types/components/internal/icons/index.d.ts +3 -0
- package/dist/types/constant.d.ts +6 -2
- package/dist/types/core/PayKKaCheckout.d.ts +22 -6
- package/dist/types/core/Session.d.ts +1 -1
- package/dist/types/core/context.d.ts +1 -0
- package/dist/types/core/environment.d.ts +4 -0
- package/dist/types/core/error.d.ts +16 -0
- package/dist/types/core/index.d.ts +1 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useBreakpoints.d.ts +15 -0
- package/dist/types/hooks/usePayState.d.ts +3 -6
- package/dist/types/i18n/locales/de-DE.d.ts +8 -0
- package/dist/types/i18n/locales/en-GB.d.ts +8 -0
- package/dist/types/i18n/locales/es-ES.d.ts +8 -0
- package/dist/types/i18n/locales/fr-FR.d.ts +8 -0
- package/dist/types/i18n/locales/index.d.ts +2 -2
- package/dist/types/i18n/locales/ja-JP.d.ts +8 -0
- package/dist/types/i18n/locales/ko-KR.d.ts +8 -0
- package/dist/types/i18n/locales/pt-PT.d.ts +8 -0
- package/dist/types/i18n/locales/ru-RU.d.ts +8 -0
- package/dist/types/i18n/locales/zh-CN.d.ts +8 -0
- package/dist/types/i18n/locales/zh-HK.d.ts +8 -0
- package/dist/types/i18n/locales/zh-TW.d.ts +8 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types/index.d.ts +39 -8
- package/dist/types/types/message.d.ts +170 -0
- package/dist/types/utils/card-brand/brands.d.ts +1 -8
- package/dist/types/utils/card-brand/index.d.ts +2 -2
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/style.d.ts +12 -0
- package/package.json +63 -63
- package/dist/es/components/CombinedEncryptedField/index.js +0 -75
- package/dist/es/components/SecuredFieldsProvider/SecuredFieldsProvider.js +0 -268
- package/dist/types/components/CombinedEncryptedField/CombinedEncryptedField.d.ts +0 -4
- package/dist/types/components/CombinedEncryptedField/index.d.ts +0 -2
- /package/dist/types/{components/SecuredFieldsProvider/utils → utils}/iframe.d.ts +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { h, y, T } from "../core.js";
|
|
2
|
+
const breakpoints = {
|
|
3
|
+
xs: 480,
|
|
4
|
+
sm: 928,
|
|
5
|
+
md: 992,
|
|
6
|
+
lg: 1200,
|
|
7
|
+
xl: 1366,
|
|
8
|
+
xxl: 1600
|
|
9
|
+
};
|
|
10
|
+
const useBreakpoints = () => {
|
|
11
|
+
const [width, setWidth] = h(() => {
|
|
12
|
+
return typeof window !== "undefined" ? window.innerWidth : 0;
|
|
13
|
+
});
|
|
14
|
+
y(() => {
|
|
15
|
+
if (typeof window === "undefined")
|
|
16
|
+
return;
|
|
17
|
+
const handleResize = () => {
|
|
18
|
+
setWidth(window.innerWidth);
|
|
19
|
+
};
|
|
20
|
+
window.addEventListener("resize", handleResize);
|
|
21
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
22
|
+
}, []);
|
|
23
|
+
const sortedEntries = T(() => {
|
|
24
|
+
return Object.entries(breakpoints).sort((a, b) => a[1] - b[1]);
|
|
25
|
+
}, [breakpoints]);
|
|
26
|
+
const { matches, current } = T(() => {
|
|
27
|
+
const matches2 = {
|
|
28
|
+
xs: false,
|
|
29
|
+
sm: false,
|
|
30
|
+
md: false,
|
|
31
|
+
lg: false,
|
|
32
|
+
xl: false,
|
|
33
|
+
xxl: false
|
|
34
|
+
};
|
|
35
|
+
let current2 = null;
|
|
36
|
+
for (let i = sortedEntries.length - 1; i >= 0; i--) {
|
|
37
|
+
const [name, value] = sortedEntries[i];
|
|
38
|
+
const isMatch = width >= value;
|
|
39
|
+
matches2[name] = isMatch;
|
|
40
|
+
if (isMatch && !current2) {
|
|
41
|
+
current2 = name;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return { matches: matches2, current: current2 };
|
|
45
|
+
}, [width, sortedEntries]);
|
|
46
|
+
const smaller = (breakpointName) => {
|
|
47
|
+
const threshold = breakpoints[breakpointName];
|
|
48
|
+
if (threshold === void 0) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
return width < threshold;
|
|
52
|
+
};
|
|
53
|
+
return { matches, current, smaller };
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
useBreakpoints
|
|
57
|
+
};
|
package/dist/es/hooks/useI18n.js
CHANGED
|
@@ -3,11 +3,10 @@ import { CoreContext } from "../core/context.js";
|
|
|
3
3
|
import "../utils/card-brand/brands.js";
|
|
4
4
|
import "../utils/system-info/get-browser-info.js";
|
|
5
5
|
import { I18n } from "../i18n/I18n.js";
|
|
6
|
-
import "../i18n/locales/index.js";
|
|
7
6
|
function useI18n(locale) {
|
|
8
7
|
const coreContext = x(CoreContext);
|
|
9
8
|
const [_i18n] = h((coreContext == null ? void 0 : coreContext.i18n) ?? new I18n());
|
|
10
|
-
_i18n.load(locale);
|
|
9
|
+
locale && _i18n.load(locale);
|
|
11
10
|
return { i18n: _i18n };
|
|
12
11
|
}
|
|
13
12
|
export {
|
|
@@ -1,31 +1,28 @@
|
|
|
1
1
|
import { h, y } from "../core.js";
|
|
2
|
-
import "../core/context.js";
|
|
3
|
-
import "../utils/card-brand/brands.js";
|
|
4
|
-
import "../utils/system-info/get-browser-info.js";
|
|
5
|
-
import { customLocale, fraudDetectionEnv } from "../config.js";
|
|
6
|
-
import { PayKKaCheckout } from "../core/PayKKaCheckout.js";
|
|
7
2
|
import { getFraudDetectionInstance } from "../out/fraud-detection.js";
|
|
8
3
|
import { useI18n } from "./useI18n.js";
|
|
9
|
-
|
|
4
|
+
import { customLocale, fraudDetectionEnv } from "../config.js";
|
|
5
|
+
import "../utils/card-brand/brands.js";
|
|
6
|
+
import { getBrowserInfo } from "../utils/system-info/get-browser-info.js";
|
|
7
|
+
function usePayState(session) {
|
|
10
8
|
const [validated, setValidated] = h(false);
|
|
11
9
|
const [submitButtonStatus, setSubmitButtonStatus] = h("unSubmit");
|
|
12
10
|
const [errorMsg, setErrorMsg] = h("");
|
|
13
|
-
const [session, setSession] = h(null);
|
|
14
11
|
const [sessionReady, setSessionReady] = h(false);
|
|
15
12
|
const [fraudDetection, setFraudDetection] = h(null);
|
|
16
|
-
|
|
17
|
-
const { i18n } = useI18n(customLocale);
|
|
13
|
+
const { i18n } = useI18n();
|
|
18
14
|
y(() => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
session.ready().then(() => {
|
|
16
|
+
var _a;
|
|
17
|
+
setSessionReady(true);
|
|
18
|
+
i18n.load(
|
|
19
|
+
customLocale || ((_a = session.checkout) == null ? void 0 : _a.locale) || getBrowserInfo().language
|
|
20
|
+
);
|
|
21
|
+
const fraudDetection2 = getFraudDetectionInstance(fraudDetectionEnv);
|
|
22
|
+
setFraudDetection(fraudDetection2);
|
|
23
|
+
fraudDetection2 == null ? void 0 : fraudDetection2.createFraudDetection();
|
|
24
|
+
});
|
|
25
|
+
}, []);
|
|
29
26
|
return {
|
|
30
27
|
validated,
|
|
31
28
|
setValidated,
|
|
@@ -33,12 +30,9 @@ function usePayState() {
|
|
|
33
30
|
setSubmitButtonStatus,
|
|
34
31
|
errorMsg,
|
|
35
32
|
setErrorMsg,
|
|
36
|
-
session,
|
|
37
|
-
setSession,
|
|
38
|
-
sessionReady,
|
|
39
|
-
setSessionReady,
|
|
40
33
|
i18n,
|
|
41
|
-
fraudDetection
|
|
34
|
+
fraudDetection,
|
|
35
|
+
sessionReady
|
|
42
36
|
};
|
|
43
37
|
}
|
|
44
38
|
export {
|
package/dist/es/i18n/index.js
CHANGED
|
@@ -21,6 +21,8 @@ const deDE = {
|
|
|
21
21
|
"card.cardSelector.change": "Ändern",
|
|
22
22
|
"card.cardSelector.useOtherCard": "Andere Karte verwenden",
|
|
23
23
|
"card.storeInfo": "Meine Kartendaten für zukünftige Nutzung speichern",
|
|
24
|
+
// card info
|
|
25
|
+
"card.info.label": "Kartendaten",
|
|
24
26
|
// common
|
|
25
27
|
"common.pay": "Jetzt kaufen",
|
|
26
28
|
"common.payProcessing": "Wird bearbeitet...",
|
|
@@ -33,6 +35,8 @@ const deDE = {
|
|
|
33
35
|
"common.noData": "Keine Daten",
|
|
34
36
|
"common.netError": "Netzwerkfehler",
|
|
35
37
|
"common.unknownError": "Unbekannter Fehler",
|
|
38
|
+
"common.cancel": "Abbrechen",
|
|
39
|
+
"common.confirm": "Bestätigen",
|
|
36
40
|
// common email
|
|
37
41
|
"common.email.label": "E-Mail",
|
|
38
42
|
"common.email.incomplete": "Bitte geben Sie Ihre E-Mail-Adresse ein",
|
|
@@ -53,7 +57,13 @@ const deDE = {
|
|
|
53
57
|
// sepa
|
|
54
58
|
"sepa.iban.label": "IBAN",
|
|
55
59
|
"sepa.iban.placeholder": "DE00 0000 0000 0000 0000 00",
|
|
56
|
-
"sepa.iban.invalid": "Die eingegebene IBAN ist ungültig"
|
|
60
|
+
"sepa.iban.invalid": "Die eingegebene IBAN ist ungültig",
|
|
61
|
+
// threeDS
|
|
62
|
+
"threeDS.paymentIncomplete": "Ihre letzte Zahlung ist unvollständig,",
|
|
63
|
+
"threeDS.completeFirst": "bitte vervollständigen Sie zunächst die Bearbeitung.",
|
|
64
|
+
"threeDS.authenticationSuccessful": "Authentifizierung erfolgreich,",
|
|
65
|
+
"threeDS.authenticationFailed": "Authentifizierung fehlgeschlagen,",
|
|
66
|
+
"threeDS.returnToCheckout": "Rückkehr erfolgt in Kürze."
|
|
57
67
|
};
|
|
58
68
|
export {
|
|
59
69
|
deDE as default
|
|
@@ -21,6 +21,8 @@ const enGB = {
|
|
|
21
21
|
"card.cardSelector.change": "Change",
|
|
22
22
|
"card.cardSelector.useOtherCard": "Use other card",
|
|
23
23
|
"card.storeInfo": "Save my card info. for future use",
|
|
24
|
+
// card info
|
|
25
|
+
"card.info.label": "Card Information",
|
|
24
26
|
// common
|
|
25
27
|
"common.pay": "Buy now",
|
|
26
28
|
"common.payProcessing": "Processing...",
|
|
@@ -33,6 +35,8 @@ const enGB = {
|
|
|
33
35
|
"common.noData": "No data",
|
|
34
36
|
"common.netError": "Network Error",
|
|
35
37
|
"common.unknownError": "Unknown Error",
|
|
38
|
+
"common.cancel": "Cancel",
|
|
39
|
+
"common.confirm": "Confirm",
|
|
36
40
|
// common email
|
|
37
41
|
"common.email.label": "Email",
|
|
38
42
|
"common.email.incomplete": "Please enter your email",
|
|
@@ -53,7 +57,13 @@ const enGB = {
|
|
|
53
57
|
// sepa
|
|
54
58
|
"sepa.iban.label": "IBAN",
|
|
55
59
|
"sepa.iban.placeholder": "DE00 0000 0000 0000 0000 00",
|
|
56
|
-
"sepa.iban.invalid": "Your entered IBAN is invalid"
|
|
60
|
+
"sepa.iban.invalid": "Your entered IBAN is invalid",
|
|
61
|
+
// threeDS
|
|
62
|
+
"threeDS.paymentIncomplete": "Your last payment is incomplete, ",
|
|
63
|
+
"threeDS.completeFirst": "please complete the processing first.",
|
|
64
|
+
"threeDS.authenticationSuccessful": "Authentication successful,",
|
|
65
|
+
"threeDS.authenticationFailed": "Authentication failed,",
|
|
66
|
+
"threeDS.returnToCheckout": "returning shortly."
|
|
57
67
|
};
|
|
58
68
|
export {
|
|
59
69
|
enGB as default
|
|
@@ -21,6 +21,8 @@ const esES = {
|
|
|
21
21
|
"card.cardSelector.change": "Cambiar",
|
|
22
22
|
"card.cardSelector.useOtherCard": "Usar otra tarjeta",
|
|
23
23
|
"card.storeInfo": "Guardar la información de mi tarjeta para futuros usos",
|
|
24
|
+
// card info
|
|
25
|
+
"card.info.label": "Información de la tarjeta",
|
|
24
26
|
// common
|
|
25
27
|
"common.pay": "Comprar ahora",
|
|
26
28
|
"common.payProcessing": "Procesando...",
|
|
@@ -33,6 +35,8 @@ const esES = {
|
|
|
33
35
|
"common.noData": "Sin datos",
|
|
34
36
|
"common.netError": "Error de Red",
|
|
35
37
|
"common.unknownError": "Error Desconocido",
|
|
38
|
+
"common.cancel": "Cancelar",
|
|
39
|
+
"common.confirm": "Confirmar",
|
|
36
40
|
// common email
|
|
37
41
|
"common.email.label": "Correo electrónico",
|
|
38
42
|
"common.email.incomplete": "Por favor ingresa tu correo electrónico",
|
|
@@ -53,7 +57,13 @@ const esES = {
|
|
|
53
57
|
// sepa
|
|
54
58
|
"sepa.iban.label": "IBAN",
|
|
55
59
|
"sepa.iban.placeholder": "DE00 0000 0000 0000 0000 00",
|
|
56
|
-
"sepa.iban.invalid": "El IBAN que ingresaste no es válido"
|
|
60
|
+
"sepa.iban.invalid": "El IBAN que ingresaste no es válido",
|
|
61
|
+
// threeDS
|
|
62
|
+
"threeDS.paymentIncomplete": "Tu último pago está incompleto, ",
|
|
63
|
+
"threeDS.completeFirst": "por favor completa el proceso primero.",
|
|
64
|
+
"threeDS.authenticationSuccessful": "Autenticación exitosa,",
|
|
65
|
+
"threeDS.authenticationFailed": "Autenticación fallida,",
|
|
66
|
+
"threeDS.returnToCheckout": "volviendo en breve."
|
|
57
67
|
};
|
|
58
68
|
export {
|
|
59
69
|
esES as default
|
|
@@ -21,6 +21,8 @@ const frFR = {
|
|
|
21
21
|
"card.cardSelector.change": "Changer",
|
|
22
22
|
"card.cardSelector.useOtherCard": "Utiliser une autre carte",
|
|
23
23
|
"card.storeInfo": "Enregistrer les informations de ma carte pour une utilisation future",
|
|
24
|
+
// card info
|
|
25
|
+
"card.info.label": "Informations de la carte",
|
|
24
26
|
// common
|
|
25
27
|
"common.pay": "Acheter maintenant",
|
|
26
28
|
"common.payProcessing": "Traitement en cours...",
|
|
@@ -33,6 +35,8 @@ const frFR = {
|
|
|
33
35
|
"common.noData": "Pas de données",
|
|
34
36
|
"common.netError": "Erreur Réseau",
|
|
35
37
|
"common.unknownError": "Erreur Inconnue",
|
|
38
|
+
"common.cancel": "Annuler",
|
|
39
|
+
"common.confirm": "Confirmer",
|
|
36
40
|
// common email
|
|
37
41
|
"common.email.label": "E-mail",
|
|
38
42
|
"common.email.incomplete": "Veuillez entrer votre e-mail",
|
|
@@ -53,7 +57,13 @@ const frFR = {
|
|
|
53
57
|
// sepa
|
|
54
58
|
"sepa.iban.label": "IBAN",
|
|
55
59
|
"sepa.iban.placeholder": "DE00 0000 0000 0000 0000 00",
|
|
56
|
-
"sepa.iban.invalid": "L'IBAN que vous avez saisi est invalide"
|
|
60
|
+
"sepa.iban.invalid": "L'IBAN que vous avez saisi est invalide",
|
|
61
|
+
// threeDS
|
|
62
|
+
"threeDS.paymentIncomplete": "Votre dernier paiement est incomplet, ",
|
|
63
|
+
"threeDS.completeFirst": "veuillez d'abord compléter le traitement.",
|
|
64
|
+
"threeDS.authenticationSuccessful": "Authentification réussie,",
|
|
65
|
+
"threeDS.authenticationFailed": "Authentification échouée,",
|
|
66
|
+
"threeDS.returnToCheckout": "retour imminent."
|
|
57
67
|
};
|
|
58
68
|
export {
|
|
59
69
|
frFR as default
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
const getLocales = () => {
|
|
2
|
+
return Object.entries(/* @__PURE__ */ Object.assign({ "./de-DE.ts": () => import("./de-DE.js"), "./en-GB.ts": () => import("./en-GB.js"), "./es-ES.ts": () => import("./es-ES.js"), "./fr-FR.ts": () => import("./fr-FR.js"), "./ja-JP.ts": () => import("./ja-JP.js"), "./ko-KR.ts": () => import("./ko-KR.js"), "./pt-PT.ts": () => import("./pt-PT.js"), "./ru-RU.ts": () => import("./ru-RU.js"), "./zh-CN.ts": () => import("./zh-CN.js"), "./zh-HK.ts": () => import("./zh-HK.js"), "./zh-TW.ts": () => import("./zh-TW.js") })).reduce((prev, [path, loader]) => {
|
|
3
|
+
const key = path.match(/\.\/(.+)\./)[1];
|
|
4
|
+
prev[key] = loader;
|
|
5
|
+
return prev;
|
|
6
|
+
}, {});
|
|
7
|
+
};
|
|
6
8
|
var LocaleKey = /* @__PURE__ */ ((LocaleKey2) => {
|
|
7
9
|
LocaleKey2["deDE"] = "de-DE";
|
|
8
10
|
LocaleKey2["enGB"] = "en-GB";
|
|
@@ -19,5 +21,5 @@ var LocaleKey = /* @__PURE__ */ ((LocaleKey2) => {
|
|
|
19
21
|
})(LocaleKey || {});
|
|
20
22
|
export {
|
|
21
23
|
LocaleKey,
|
|
22
|
-
|
|
24
|
+
getLocales
|
|
23
25
|
};
|
|
@@ -21,6 +21,8 @@ const jaJP = {
|
|
|
21
21
|
"card.cardSelector.change": "変更",
|
|
22
22
|
"card.cardSelector.useOtherCard": "他のカードを使用",
|
|
23
23
|
"card.storeInfo": "今後の利用のためにカード情報を保存する",
|
|
24
|
+
// card info
|
|
25
|
+
"card.info.label": "カード情報",
|
|
24
26
|
// common
|
|
25
27
|
"common.pay": "今すぐ購入",
|
|
26
28
|
"common.payProcessing": "処理中...",
|
|
@@ -33,6 +35,8 @@ const jaJP = {
|
|
|
33
35
|
"common.noData": "データなし",
|
|
34
36
|
"common.netError": "ネットワークエラー",
|
|
35
37
|
"common.unknownError": "不明なエラー",
|
|
38
|
+
"common.cancel": "キャンセル",
|
|
39
|
+
"common.confirm": "確認",
|
|
36
40
|
// common email
|
|
37
41
|
"common.email.label": "メール",
|
|
38
42
|
"common.email.incomplete": "メールアドレスを入力してください",
|
|
@@ -53,7 +57,13 @@ const jaJP = {
|
|
|
53
57
|
// sepa
|
|
54
58
|
"sepa.iban.label": "IBAN",
|
|
55
59
|
"sepa.iban.placeholder": "DE00 0000 0000 0000 0000 00",
|
|
56
|
-
"sepa.iban.invalid": "入力されたIBANは無効です"
|
|
60
|
+
"sepa.iban.invalid": "入力されたIBANは無効です",
|
|
61
|
+
// threeDS
|
|
62
|
+
"threeDS.paymentIncomplete": "最後の支払いが不完全です。",
|
|
63
|
+
"threeDS.completeFirst": "まず処理を完了してください。",
|
|
64
|
+
"threeDS.authenticationSuccessful": "認証に成功しました。",
|
|
65
|
+
"threeDS.authenticationFailed": "認証に失敗しました。",
|
|
66
|
+
"threeDS.returnToCheckout": "まもなく戻ります。"
|
|
57
67
|
};
|
|
58
68
|
export {
|
|
59
69
|
jaJP as default
|
|
@@ -21,6 +21,8 @@ const koKR = {
|
|
|
21
21
|
"card.cardSelector.change": "변경",
|
|
22
22
|
"card.cardSelector.useOtherCard": "다른 카드 사용",
|
|
23
23
|
"card.storeInfo": "미래에 사용할 카드 정보를 저장합니다",
|
|
24
|
+
// card info
|
|
25
|
+
"card.info.label": "카드 정보",
|
|
24
26
|
// common
|
|
25
27
|
"common.pay": "지금 구매",
|
|
26
28
|
"common.payProcessing": "처리 중...",
|
|
@@ -33,6 +35,8 @@ const koKR = {
|
|
|
33
35
|
"common.noData": "데이터 없음",
|
|
34
36
|
"common.netError": "네트워크 오류",
|
|
35
37
|
"common.unknownError": "알 수 없는 오류",
|
|
38
|
+
"common.cancel": "취소",
|
|
39
|
+
"common.confirm": "확인",
|
|
36
40
|
// common email
|
|
37
41
|
"common.email.label": "이메일",
|
|
38
42
|
"common.email.incomplete": "이메일을 입력해 주세요",
|
|
@@ -53,7 +57,13 @@ const koKR = {
|
|
|
53
57
|
// sepa
|
|
54
58
|
"sepa.iban.label": "IBAN",
|
|
55
59
|
"sepa.iban.placeholder": "DE00 0000 0000 0000 0000 00",
|
|
56
|
-
"sepa.iban.invalid": "입력한 IBAN이 유효하지 않습니다"
|
|
60
|
+
"sepa.iban.invalid": "입력한 IBAN이 유효하지 않습니다",
|
|
61
|
+
// threeDS
|
|
62
|
+
"threeDS.paymentIncomplete": "최근 결제가 완료되지 않았습니다, ",
|
|
63
|
+
"threeDS.completeFirst": "먼저 처리를 완료해 주세요.",
|
|
64
|
+
"threeDS.authenticationSuccessful": "인증이 성공했습니다,",
|
|
65
|
+
"threeDS.authenticationFailed": "인증이 실패했습니다,",
|
|
66
|
+
"threeDS.returnToCheckout": "곧 돌아갑니다."
|
|
57
67
|
};
|
|
58
68
|
export {
|
|
59
69
|
koKR as default
|
|
@@ -21,6 +21,8 @@ const ptPT = {
|
|
|
21
21
|
"card.cardSelector.change": "Trocar",
|
|
22
22
|
"card.cardSelector.useOtherCard": "Usar outro cartão",
|
|
23
23
|
"card.storeInfo": "Salvar as informações do meu cartão para uso futuro",
|
|
24
|
+
// card info
|
|
25
|
+
"card.info.label": "Informação do cartão",
|
|
24
26
|
// common
|
|
25
27
|
"common.pay": "Comprar agora",
|
|
26
28
|
"common.payProcessing": "Processando...",
|
|
@@ -33,6 +35,8 @@ const ptPT = {
|
|
|
33
35
|
"common.noData": "Sem dados",
|
|
34
36
|
"common.netError": "Erro de Rede",
|
|
35
37
|
"common.unknownError": "Erro Desconhecido",
|
|
38
|
+
"common.cancel": "Cancelar",
|
|
39
|
+
"common.confirm": "Confirmar",
|
|
36
40
|
// common email
|
|
37
41
|
"common.email.label": "Email",
|
|
38
42
|
"common.email.incomplete": "Por favor, insira seu email",
|
|
@@ -53,7 +57,13 @@ const ptPT = {
|
|
|
53
57
|
// sepa
|
|
54
58
|
"sepa.iban.label": "IBAN",
|
|
55
59
|
"sepa.iban.placeholder": "DE00 0000 0000 0000 0000 00",
|
|
56
|
-
"sepa.iban.invalid": "O IBAN que introduziu é inválido"
|
|
60
|
+
"sepa.iban.invalid": "O IBAN que introduziu é inválido",
|
|
61
|
+
// threeDS
|
|
62
|
+
"threeDS.paymentIncomplete": "Seu último pagamento está incompleto, ",
|
|
63
|
+
"threeDS.completeFirst": "por favor, conclua o processamento primeiro.",
|
|
64
|
+
"threeDS.authenticationSuccessful": "Autenticação bem-sucedida,",
|
|
65
|
+
"threeDS.authenticationFailed": "Autenticação falhou,",
|
|
66
|
+
"threeDS.returnToCheckout": "a regressar em breve."
|
|
57
67
|
};
|
|
58
68
|
export {
|
|
59
69
|
ptPT as default
|
|
@@ -21,6 +21,8 @@ const ruRU = {
|
|
|
21
21
|
"card.cardSelector.change": "Изменить",
|
|
22
22
|
"card.cardSelector.useOtherCard": "Использовать другую карту",
|
|
23
23
|
"card.storeInfo": "Сохранить информацию о моей карте для будущего использования",
|
|
24
|
+
// card info
|
|
25
|
+
"card.info.label": "Данные карты",
|
|
24
26
|
// common
|
|
25
27
|
"common.pay": "Купить сейчас",
|
|
26
28
|
"common.payProcessing": "Обработка...",
|
|
@@ -33,6 +35,8 @@ const ruRU = {
|
|
|
33
35
|
"common.noData": "Нет данных",
|
|
34
36
|
"common.netError": "Ошибка сети",
|
|
35
37
|
"common.unknownError": "Неизвестная ошибка",
|
|
38
|
+
"common.cancel": "Отмена",
|
|
39
|
+
"common.confirm": "Подтвердить",
|
|
36
40
|
// common email
|
|
37
41
|
"common.email.label": "Электронная почта",
|
|
38
42
|
"common.email.incomplete": "Пожалуйста, введите вашу электронную почту",
|
|
@@ -53,7 +57,13 @@ const ruRU = {
|
|
|
53
57
|
// sepa
|
|
54
58
|
"sepa.iban.label": "IBAN",
|
|
55
59
|
"sepa.iban.placeholder": "DE00 0000 0000 0000 0000 00",
|
|
56
|
-
"sepa.iban.invalid": "Введенный вами IBAN недействителен"
|
|
60
|
+
"sepa.iban.invalid": "Введенный вами IBAN недействителен",
|
|
61
|
+
// threeDS
|
|
62
|
+
"threeDS.paymentIncomplete": "Ваш последний платеж не завершен, ",
|
|
63
|
+
"threeDS.completeFirst": "пожалуйста, завершите его в первую очередь.",
|
|
64
|
+
"threeDS.authenticationSuccessful": "Аутентификация успешна,",
|
|
65
|
+
"threeDS.authenticationFailed": "Аутентификация не удалась,",
|
|
66
|
+
"threeDS.returnToCheckout": "скоро возврат."
|
|
57
67
|
};
|
|
58
68
|
export {
|
|
59
69
|
ruRU as default
|
|
@@ -21,6 +21,8 @@ const zhCN = {
|
|
|
21
21
|
"card.cardSelector.change": "更换",
|
|
22
22
|
"card.cardSelector.useOtherCard": "输入卡信息支付",
|
|
23
23
|
"card.storeInfo": "存储卡信息以开启快捷支付",
|
|
24
|
+
// card info
|
|
25
|
+
"card.info.label": "卡信息",
|
|
24
26
|
// common
|
|
25
27
|
"common.pay": "支付",
|
|
26
28
|
"common.payProcessing": "处理中...",
|
|
@@ -33,6 +35,8 @@ const zhCN = {
|
|
|
33
35
|
"common.noData": "暂无数据",
|
|
34
36
|
"common.netError": "网络异常",
|
|
35
37
|
"common.unknownError": "未知异常",
|
|
38
|
+
"common.cancel": "取消",
|
|
39
|
+
"common.confirm": "确认",
|
|
36
40
|
// common email
|
|
37
41
|
"common.email.label": "邮箱",
|
|
38
42
|
"common.email.incomplete": "请输入邮箱",
|
|
@@ -53,7 +57,13 @@ const zhCN = {
|
|
|
53
57
|
// sepa
|
|
54
58
|
"sepa.iban.label": "IBAN",
|
|
55
59
|
"sepa.iban.placeholder": "DE00 0000 0000 0000 0000 00",
|
|
56
|
-
"sepa.iban.invalid": "您输入的IBAN无效"
|
|
60
|
+
"sepa.iban.invalid": "您输入的IBAN无效",
|
|
61
|
+
// threeDS
|
|
62
|
+
"threeDS.paymentIncomplete": "您的上一笔支付未完成,",
|
|
63
|
+
"threeDS.completeFirst": "请先完成处理",
|
|
64
|
+
"threeDS.authenticationSuccessful": "认证成功,",
|
|
65
|
+
"threeDS.authenticationFailed": "认证失败,",
|
|
66
|
+
"threeDS.returnToCheckout": "即将返回"
|
|
57
67
|
};
|
|
58
68
|
export {
|
|
59
69
|
zhCN as default
|
|
@@ -21,6 +21,8 @@ const zhHK = {
|
|
|
21
21
|
"card.cardSelector.change": "更換",
|
|
22
22
|
"card.cardSelector.useOtherCard": "輸入卡信息支付",
|
|
23
23
|
"card.storeInfo": "存儲卡信息以開啓快捷支付",
|
|
24
|
+
// card info
|
|
25
|
+
"card.info.label": "卡資料",
|
|
24
26
|
// common
|
|
25
27
|
"common.pay": "支付",
|
|
26
28
|
"common.payProcessing": "處理中...",
|
|
@@ -33,6 +35,8 @@ const zhHK = {
|
|
|
33
35
|
"common.noData": "暫無數據",
|
|
34
36
|
"common.netError": "網絡異常",
|
|
35
37
|
"common.unknownError": "未知異常",
|
|
38
|
+
"common.cancel": "取消",
|
|
39
|
+
"common.confirm": "確認",
|
|
36
40
|
// common email
|
|
37
41
|
"common.email.label": "郵箱",
|
|
38
42
|
"common.email.incomplete": "請輸入郵箱",
|
|
@@ -53,7 +57,13 @@ const zhHK = {
|
|
|
53
57
|
// sepa
|
|
54
58
|
"sepa.iban.label": "IBAN",
|
|
55
59
|
"sepa.iban.placeholder": "DE00 0000 0000 0000 0000 00",
|
|
56
|
-
"sepa.iban.invalid": "您輸入的IBAN無效"
|
|
60
|
+
"sepa.iban.invalid": "您輸入的IBAN無效",
|
|
61
|
+
// threeDS
|
|
62
|
+
"threeDS.paymentIncomplete": "您的上一筆支付未完成,",
|
|
63
|
+
"threeDS.completeFirst": "請先完成處理",
|
|
64
|
+
"threeDS.authenticationSuccessful": "認證成功,",
|
|
65
|
+
"threeDS.authenticationFailed": "認證失敗,",
|
|
66
|
+
"threeDS.returnToCheckout": "即將返回"
|
|
57
67
|
};
|
|
58
68
|
export {
|
|
59
69
|
zhHK as default
|
|
@@ -21,6 +21,8 @@ const zhTW = {
|
|
|
21
21
|
"card.cardSelector.change": "更換",
|
|
22
22
|
"card.cardSelector.useOtherCard": "輸入卡信息支付",
|
|
23
23
|
"card.storeInfo": "存儲卡信息以開啓快捷支付",
|
|
24
|
+
// card info
|
|
25
|
+
"card.info.label": "卡片資訊",
|
|
24
26
|
// common
|
|
25
27
|
"common.pay": "支付",
|
|
26
28
|
"common.payProcessing": "處理中...",
|
|
@@ -33,6 +35,8 @@ const zhTW = {
|
|
|
33
35
|
"common.noData": "暫無數據",
|
|
34
36
|
"common.netError": "網絡異常",
|
|
35
37
|
"common.unknownError": "未知異常",
|
|
38
|
+
"common.cancel": "取消",
|
|
39
|
+
"common.confirm": "確認",
|
|
36
40
|
// common email
|
|
37
41
|
"common.email.label": "郵箱",
|
|
38
42
|
"common.email.incomplete": "請輸入郵箱",
|
|
@@ -53,7 +57,13 @@ const zhTW = {
|
|
|
53
57
|
// sepa
|
|
54
58
|
"sepa.iban.label": "IBAN",
|
|
55
59
|
"sepa.iban.placeholder": "DE00 0000 0000 0000 0000 00",
|
|
56
|
-
"sepa.iban.invalid": "您輸入的IBAN無效"
|
|
60
|
+
"sepa.iban.invalid": "您輸入的IBAN無效",
|
|
61
|
+
// threeDS
|
|
62
|
+
"threeDS.paymentIncomplete": "您的上一筆支付未完成,",
|
|
63
|
+
"threeDS.completeFirst": "請先完成處理",
|
|
64
|
+
"threeDS.authenticationSuccessful": "認證成功,",
|
|
65
|
+
"threeDS.authenticationFailed": "認證失敗,",
|
|
66
|
+
"threeDS.returnToCheckout": "即將返回"
|
|
57
67
|
};
|
|
58
68
|
export {
|
|
59
69
|
zhTW as default
|
package/dist/es/i18n/util.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFunction } from "../utils/is.js";
|
|
2
2
|
import "../utils/card-brand/brands.js";
|
|
3
3
|
import { getBrowserInfo } from "../utils/system-info/get-browser-info.js";
|
|
4
|
-
import {
|
|
4
|
+
import { LocaleKey, getLocales } from "./locales/index.js";
|
|
5
5
|
import enGB from "./locales/en-GB.js";
|
|
6
6
|
function normalizedLocale(locale) {
|
|
7
7
|
return locale.replaceAll("_", "-").toLowerCase();
|
|
@@ -9,14 +9,17 @@ function normalizedLocale(locale) {
|
|
|
9
9
|
function getLocaleLanguage(locale) {
|
|
10
10
|
return locale.split("-")[0];
|
|
11
11
|
}
|
|
12
|
-
const
|
|
13
|
-
return {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
12
|
+
const getLocaleList = () => {
|
|
13
|
+
return Object.entries(getLocales()).map(([key, value]) => {
|
|
14
|
+
return {
|
|
15
|
+
locale: normalizedLocale(key),
|
|
16
|
+
language: getLocaleLanguage(key),
|
|
17
|
+
translation: value
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
};
|
|
19
21
|
function mergeCustomLocales(customLocales) {
|
|
22
|
+
const localeList = getLocaleList();
|
|
20
23
|
return localeList;
|
|
21
24
|
}
|
|
22
25
|
function getTranslation(locale, customLocales) {
|
package/dist/es/index.js
CHANGED
|
@@ -16,12 +16,13 @@ import { SecuredIframe } from "./components/SecuredIframe/index.js";
|
|
|
16
16
|
import { Sepa } from "./components/Sepa/index.js";
|
|
17
17
|
import { IBANField } from "./components/CardIBANField/index.js";
|
|
18
18
|
import { EEncryptedCardType, ENCRYPTED_CARD_ITEM_ATTR, ENCRYPTED_CARD_WRAPPER_ID, EncryptedCard, PayKKaEncryptedCard } from "./components/EncryptedCard/index.js";
|
|
19
|
-
import {
|
|
19
|
+
import { CombinedCardInfo } from "./components/CombinedCardInfo/index.js";
|
|
20
20
|
import "./core/context.js";
|
|
21
21
|
import { create } from "./core/create.js";
|
|
22
22
|
import { Session } from "./core/Session.js";
|
|
23
23
|
import { querySession } from "./core/query.js";
|
|
24
24
|
import { PayKKaCheckout } from "./core/PayKKaCheckout.js";
|
|
25
|
+
import { PayKKaError } from "./core/error.js";
|
|
25
26
|
import { I18n } from "./i18n/I18n.js";
|
|
26
27
|
import { LocaleKey } from "./i18n/locales/index.js";
|
|
27
28
|
import { setApiUrl, setCDNUrl, setCheckoutConfig, setCustomLocale, setCustomReqHeaders, setFraudDetectionEnv } from "./config.js";
|
|
@@ -39,7 +40,7 @@ export {
|
|
|
39
40
|
CardNumberField,
|
|
40
41
|
CardSecurityCodeField,
|
|
41
42
|
CardSelector,
|
|
42
|
-
|
|
43
|
+
CombinedCardInfo,
|
|
43
44
|
EEncryptedCardType,
|
|
44
45
|
ENCRYPTED_CARD_ITEM_ATTR,
|
|
45
46
|
ENCRYPTED_CARD_WRAPPER_ID,
|
|
@@ -50,6 +51,7 @@ export {
|
|
|
50
51
|
LocaleKey,
|
|
51
52
|
PayKKaCheckout,
|
|
52
53
|
PayKKaEncryptedCard,
|
|
54
|
+
PayKKaError,
|
|
53
55
|
SecuredIframe,
|
|
54
56
|
Sepa,
|
|
55
57
|
Session,
|