@netceterapx/click-to-pay-sdk 2.1.0 → 2.2.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 +8 -1
- package/build/click-to-pay-sdk.es.js +1448 -1590
- package/build/click-to-pay-sdk.js +1 -1
- package/index.d.ts +11 -3
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ var __publicField = (obj, key, value) => {
|
|
|
4
4
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
|
+
var _a;
|
|
7
8
|
function noop() {
|
|
8
9
|
}
|
|
9
10
|
function assign(tar, src) {
|
|
@@ -893,6 +894,7 @@ const GENERAL_EVENTS = "generalEvents";
|
|
|
893
894
|
const CONSUMER_STATUS = "consumerStatus";
|
|
894
895
|
const PERFORMANCE_UPDATE = "performanceUpdate";
|
|
895
896
|
const USER_ACTION_UPDATE = "userActionUpdate";
|
|
897
|
+
const FLOW_EVENT_CARD_SELECTION = "cardSelection";
|
|
896
898
|
var FlowStep = /* @__PURE__ */ ((FlowStep2) => {
|
|
897
899
|
FlowStep2["ON_INITIATED_IDENTITY_VALIDATION"] = "ON_INITIATED_IDENTITY_VALIDATION";
|
|
898
900
|
FlowStep2["ON_IDENTITY_VALIDATION_COMPLETED"] = "ON_IDENTITY_VALIDATION_COMPLETED";
|
|
@@ -1882,7 +1884,7 @@ function instance$r($$self, $$props, $$invalidate) {
|
|
|
1882
1884
|
let { name = "" } = $$props;
|
|
1883
1885
|
let { showLoadingSpinner = false } = $$props;
|
|
1884
1886
|
let { buttonStyle = void 0 } = $$props;
|
|
1885
|
-
let { disabled =
|
|
1887
|
+
let { disabled = false } = $$props;
|
|
1886
1888
|
const getIconColorBasedOnButtonState = (buttonStyle2, disabled2) => {
|
|
1887
1889
|
switch (buttonStyle2) {
|
|
1888
1890
|
case ButtonStyle.FILLED:
|
|
@@ -2348,7 +2350,7 @@ var LANG = /* @__PURE__ */ ((LANG2) => {
|
|
|
2348
2350
|
LANG2["de_AT"] = "de_AT";
|
|
2349
2351
|
LANG2["de_DE"] = "de_DE";
|
|
2350
2352
|
LANG2["el_GR"] = "el_GR";
|
|
2351
|
-
LANG2["
|
|
2353
|
+
LANG2["en_GB"] = "en_GB";
|
|
2352
2354
|
LANG2["en_US"] = "en_US";
|
|
2353
2355
|
LANG2["es_ES"] = "es_ES";
|
|
2354
2356
|
LANG2["fi_FI"] = "fi_FI";
|
|
@@ -2382,7 +2384,7 @@ const dictionary = {
|
|
|
2382
2384
|
label: {
|
|
2383
2385
|
resendCode: {
|
|
2384
2386
|
[LANG.en_US]: "Resend code",
|
|
2385
|
-
[LANG.
|
|
2387
|
+
[LANG.en_GB]: "Resend code",
|
|
2386
2388
|
[LANG.de_DE]: "Code erneut senden",
|
|
2387
2389
|
[LANG.cs_CZ]: "Znovu odeslat kód",
|
|
2388
2390
|
[LANG.sk_SK]: "Znovu odoslať kód",
|
|
@@ -2415,7 +2417,7 @@ const dictionary = {
|
|
|
2415
2417
|
},
|
|
2416
2418
|
oneTimeCode: {
|
|
2417
2419
|
[LANG.en_US]: "One time code",
|
|
2418
|
-
[LANG.
|
|
2420
|
+
[LANG.en_GB]: "One-time code",
|
|
2419
2421
|
[LANG.de_DE]: "Einmaliger Code",
|
|
2420
2422
|
[LANG.cs_CZ]: "Jednorázový kód",
|
|
2421
2423
|
[LANG.sk_SK]: "Jednorazový kód",
|
|
@@ -2448,7 +2450,7 @@ const dictionary = {
|
|
|
2448
2450
|
},
|
|
2449
2451
|
verifyAndContinue: {
|
|
2450
2452
|
[LANG.en_US]: "Verify & continue",
|
|
2451
|
-
[LANG.
|
|
2453
|
+
[LANG.en_GB]: "Verify & continue",
|
|
2452
2454
|
[LANG.de_DE]: "Überprüfen und fortfahren",
|
|
2453
2455
|
[LANG.cs_CZ]: "Ověřit a pokračovat",
|
|
2454
2456
|
[LANG.sk_SK]: "Overiť a pokračovať",
|
|
@@ -2481,7 +2483,7 @@ const dictionary = {
|
|
|
2481
2483
|
},
|
|
2482
2484
|
moreCards: {
|
|
2483
2485
|
[LANG.en_US]: "More Cards",
|
|
2484
|
-
[LANG.
|
|
2486
|
+
[LANG.en_GB]: "More Cards",
|
|
2485
2487
|
[LANG.de_DE]: "Weitere Karten",
|
|
2486
2488
|
[LANG.cs_CZ]: "Více karet",
|
|
2487
2489
|
[LANG.sk_SK]: "Viac kariet",
|
|
@@ -2514,7 +2516,7 @@ const dictionary = {
|
|
|
2514
2516
|
},
|
|
2515
2517
|
lessCards: {
|
|
2516
2518
|
[LANG.en_US]: "Less Cards",
|
|
2517
|
-
[LANG.
|
|
2519
|
+
[LANG.en_GB]: "Fewer Cards",
|
|
2518
2520
|
[LANG.de_DE]: "Weniger Karten",
|
|
2519
2521
|
[LANG.cs_CZ]: "Méně karet",
|
|
2520
2522
|
[LANG.sk_SK]: "Menej kariet",
|
|
@@ -2547,7 +2549,7 @@ const dictionary = {
|
|
|
2547
2549
|
},
|
|
2548
2550
|
accessCards: {
|
|
2549
2551
|
[LANG.en_US]: "Access Cards",
|
|
2550
|
-
[LANG.
|
|
2552
|
+
[LANG.en_GB]: "Access Cards",
|
|
2551
2553
|
[LANG.de_DE]: "Auf Karten zugreifen",
|
|
2552
2554
|
[LANG.cs_CZ]: "Přístupové karty",
|
|
2553
2555
|
[LANG.sk_SK]: "Zobraziť karty",
|
|
@@ -2580,7 +2582,7 @@ const dictionary = {
|
|
|
2580
2582
|
},
|
|
2581
2583
|
pay: {
|
|
2582
2584
|
[LANG.en_US]: "Pay [amount] [currency][with]",
|
|
2583
|
-
[LANG.
|
|
2585
|
+
[LANG.en_GB]: "Pay [amount] [currency][with]",
|
|
2584
2586
|
[LANG.de_DE]: "Bezahle [amount] [currency][with]",
|
|
2585
2587
|
[LANG.cs_CZ]: "Zaplatit [amount] [currency][with]",
|
|
2586
2588
|
[LANG.sk_SK]: "Zaplatiť [amount] [currency][with]",
|
|
@@ -2613,7 +2615,7 @@ const dictionary = {
|
|
|
2613
2615
|
},
|
|
2614
2616
|
with: {
|
|
2615
2617
|
[LANG.en_US]: " with [panLastFour]",
|
|
2616
|
-
[LANG.
|
|
2618
|
+
[LANG.en_GB]: " with [panLastFour]",
|
|
2617
2619
|
[LANG.de_DE]: " mit [panLastFour]",
|
|
2618
2620
|
[LANG.cs_CZ]: " pomocí [panLastFour]",
|
|
2619
2621
|
[LANG.sk_SK]: " kartou [panLastFour]",
|
|
@@ -2646,7 +2648,7 @@ const dictionary = {
|
|
|
2646
2648
|
},
|
|
2647
2649
|
goBack: {
|
|
2648
2650
|
[LANG.en_US]: "Go Back",
|
|
2649
|
-
[LANG.
|
|
2651
|
+
[LANG.en_GB]: "Go Back",
|
|
2650
2652
|
[LANG.de_DE]: "Zurück",
|
|
2651
2653
|
[LANG.cs_CZ]: "Zpět",
|
|
2652
2654
|
[LANG.sk_SK]: "Späť",
|
|
@@ -2679,7 +2681,7 @@ const dictionary = {
|
|
|
2679
2681
|
},
|
|
2680
2682
|
switchId: {
|
|
2681
2683
|
[LANG.en_US]: "Switch ID",
|
|
2682
|
-
[LANG.
|
|
2684
|
+
[LANG.en_GB]: "Switch ID",
|
|
2683
2685
|
[LANG.de_DE]: "ID ändern",
|
|
2684
2686
|
[LANG.cs_CZ]: "Přepnout doklad totožnosti",
|
|
2685
2687
|
[LANG.sk_SK]: "Prepnúť ID",
|
|
@@ -2712,7 +2714,7 @@ const dictionary = {
|
|
|
2712
2714
|
},
|
|
2713
2715
|
alternativePayment: {
|
|
2714
2716
|
[LANG.en_US]: "Alternative payment",
|
|
2715
|
-
[LANG.
|
|
2717
|
+
[LANG.en_GB]: "Alternative payment",
|
|
2716
2718
|
[LANG.de_DE]: "Alternative Zahlung",
|
|
2717
2719
|
[LANG.cs_CZ]: "Alternativní platba",
|
|
2718
2720
|
[LANG.sk_SK]: "Alternatívny spôsob platby",
|
|
@@ -2745,7 +2747,7 @@ const dictionary = {
|
|
|
2745
2747
|
},
|
|
2746
2748
|
required: {
|
|
2747
2749
|
[LANG.en_US]: "Required",
|
|
2748
|
-
[LANG.
|
|
2750
|
+
[LANG.en_GB]: "Required",
|
|
2749
2751
|
[LANG.de_DE]: "Pflichtfeld",
|
|
2750
2752
|
[LANG.cs_CZ]: "Povinné",
|
|
2751
2753
|
[LANG.sk_SK]: "Povinné",
|
|
@@ -2778,7 +2780,7 @@ const dictionary = {
|
|
|
2778
2780
|
},
|
|
2779
2781
|
expired: {
|
|
2780
2782
|
[LANG.en_US]: "Expired",
|
|
2781
|
-
[LANG.
|
|
2783
|
+
[LANG.en_GB]: "Expired",
|
|
2782
2784
|
[LANG.de_DE]: "Abgelaufen",
|
|
2783
2785
|
[LANG.cs_CZ]: "Platnost vypršela",
|
|
2784
2786
|
[LANG.sk_SK]: "Platnosť vypršala",
|
|
@@ -2811,7 +2813,7 @@ const dictionary = {
|
|
|
2811
2813
|
},
|
|
2812
2814
|
suspended: {
|
|
2813
2815
|
[LANG.en_US]: "Suspended",
|
|
2814
|
-
[LANG.
|
|
2816
|
+
[LANG.en_GB]: "Suspended",
|
|
2815
2817
|
[LANG.de_DE]: "Ausgesetzt",
|
|
2816
2818
|
[LANG.cs_CZ]: "Pozastaveno",
|
|
2817
2819
|
[LANG.sk_SK]: "Odstavljeno",
|
|
@@ -2844,7 +2846,7 @@ const dictionary = {
|
|
|
2844
2846
|
},
|
|
2845
2847
|
pending: {
|
|
2846
2848
|
[LANG.en_US]: "Pending",
|
|
2847
|
-
[LANG.
|
|
2849
|
+
[LANG.en_GB]: "Pending",
|
|
2848
2850
|
[LANG.de_DE]: "Ausstehend",
|
|
2849
2851
|
[LANG.cs_CZ]: "Čeká se na",
|
|
2850
2852
|
[LANG.sk_SK]: "V pričakovanju",
|
|
@@ -2877,7 +2879,7 @@ const dictionary = {
|
|
|
2877
2879
|
},
|
|
2878
2880
|
invalidEmail: {
|
|
2879
2881
|
[LANG.en_US]: "Not an email address.",
|
|
2880
|
-
[LANG.
|
|
2882
|
+
[LANG.en_GB]: "Not an email address.",
|
|
2881
2883
|
[LANG.de_DE]: "Keine E-Mail-Adresse.",
|
|
2882
2884
|
[LANG.cs_CZ]: "Nejedná se o e-mailovou adresu.",
|
|
2883
2885
|
[LANG.sk_SK]: "Neplatná e-mailová adresa.",
|
|
@@ -2910,7 +2912,7 @@ const dictionary = {
|
|
|
2910
2912
|
},
|
|
2911
2913
|
invalidCreditCardNumber: {
|
|
2912
2914
|
[LANG.en_US]: "Invalid credit card number.",
|
|
2913
|
-
[LANG.
|
|
2915
|
+
[LANG.en_GB]: "Invalid credit card number.",
|
|
2914
2916
|
[LANG.de_DE]: "Ungültige Kreditkartennummer.",
|
|
2915
2917
|
[LANG.cs_CZ]: "Neplatné číslo kreditní karty.",
|
|
2916
2918
|
[LANG.sk_SK]: "Neplatné číslo kreditnej karty.",
|
|
@@ -2943,7 +2945,7 @@ const dictionary = {
|
|
|
2943
2945
|
},
|
|
2944
2946
|
unsupportedCreditCardBrand: {
|
|
2945
2947
|
[LANG.en_US]: "Not recognized card brand. We offer support for: [cardBrands]",
|
|
2946
|
-
[LANG.
|
|
2948
|
+
[LANG.en_GB]: "Not recognized card brand. We offer support for: [cardBrands]",
|
|
2947
2949
|
[LANG.de_DE]: "Karte nicht erkannt. Wir unterstützen: [cardBrands]",
|
|
2948
2950
|
[LANG.cs_CZ]: "Karty této značky neakceptujeme. Podporujeme: [cardBrands]",
|
|
2949
2951
|
[LANG.sk_SK]: "Neznáma značka karty. Podporované sú tieto karty: [cardBrands]",
|
|
@@ -2976,7 +2978,7 @@ const dictionary = {
|
|
|
2976
2978
|
},
|
|
2977
2979
|
exactLength: {
|
|
2978
2980
|
[LANG.en_US]: "Should be [range] characters",
|
|
2979
|
-
[LANG.
|
|
2981
|
+
[LANG.en_GB]: "Should be [range] characters",
|
|
2980
2982
|
[LANG.de_DE]: "Sollte [range] Zeichen sein",
|
|
2981
2983
|
[LANG.cs_CZ]: "Požadovaný počet znaků: [range]",
|
|
2982
2984
|
[LANG.sk_SK]: "Počet znakov by mal byť [range]",
|
|
@@ -3009,7 +3011,7 @@ const dictionary = {
|
|
|
3009
3011
|
},
|
|
3010
3012
|
invalidCvv: {
|
|
3011
3013
|
[LANG.en_US]: "Provided Security Code is invalid",
|
|
3012
|
-
[LANG.
|
|
3014
|
+
[LANG.en_GB]: "Provided Security Code is invalid",
|
|
3013
3015
|
[LANG.de_DE]: "Der angegebene Sicherheitscode ist ungültig",
|
|
3014
3016
|
[LANG.cs_CZ]: "Zadaný Security Code je neplatný",
|
|
3015
3017
|
[LANG.sk_SK]: "Zadaný Security Code je neplatný",
|
|
@@ -3042,7 +3044,7 @@ const dictionary = {
|
|
|
3042
3044
|
},
|
|
3043
3045
|
otpInvalid: {
|
|
3044
3046
|
[LANG.en_US]: "Provided OTP code is not correct",
|
|
3045
|
-
[LANG.
|
|
3047
|
+
[LANG.en_GB]: "Provided OTP code is not correct",
|
|
3046
3048
|
[LANG.de_DE]: "Das angegebene Einmalkennwort ist nicht korrekt",
|
|
3047
3049
|
[LANG.cs_CZ]: "Zadaný jednorázový kód není správný",
|
|
3048
3050
|
[LANG.sk_SK]: "Zadaný jednorazový kód nie je správny",
|
|
@@ -3075,7 +3077,7 @@ const dictionary = {
|
|
|
3075
3077
|
},
|
|
3076
3078
|
otpRetriesExceeded: {
|
|
3077
3079
|
[LANG.en_US]: "Number of maximum retries exceeded",
|
|
3078
|
-
[LANG.
|
|
3080
|
+
[LANG.en_GB]: "Number of maximum retries exceeded",
|
|
3079
3081
|
[LANG.de_DE]: "Anzahl der maximalen Wiederholungsversuche überschritten",
|
|
3080
3082
|
[LANG.cs_CZ]: "Byl překročen max. počet opakování",
|
|
3081
3083
|
[LANG.sk_SK]: "Bol prekročený maximálny počet pokusov",
|
|
@@ -3108,7 +3110,7 @@ const dictionary = {
|
|
|
3108
3110
|
},
|
|
3109
3111
|
otpExpired: {
|
|
3110
3112
|
[LANG.en_US]: "OTP code expired",
|
|
3111
|
-
[LANG.
|
|
3113
|
+
[LANG.en_GB]: "OTP code expired",
|
|
3112
3114
|
[LANG.de_DE]: "Einmalkennwort abgelaufen",
|
|
3113
3115
|
[LANG.cs_CZ]: "Platnost jednorázového kódu vypršela",
|
|
3114
3116
|
[LANG.sk_SK]: "Platnosť jednorazového kódu vypršala",
|
|
@@ -3141,7 +3143,7 @@ const dictionary = {
|
|
|
3141
3143
|
},
|
|
3142
3144
|
successfulResendOtpCode: {
|
|
3143
3145
|
[LANG.en_US]: "New code has been sent",
|
|
3144
|
-
[LANG.
|
|
3146
|
+
[LANG.en_GB]: "New code has been sent",
|
|
3145
3147
|
[LANG.de_DE]: "Neuer Code wurde gesendet",
|
|
3146
3148
|
[LANG.cs_CZ]: "Nový kód byl odeslán",
|
|
3147
3149
|
[LANG.sk_SK]: "Nový kód bol odoslaný",
|
|
@@ -3174,7 +3176,7 @@ const dictionary = {
|
|
|
3174
3176
|
},
|
|
3175
3177
|
pleaseSelectCardFirst: {
|
|
3176
3178
|
[LANG.en_US]: "Please select one of the available cards first",
|
|
3177
|
-
[LANG.
|
|
3179
|
+
[LANG.en_GB]: "Please select one of the available cards first",
|
|
3178
3180
|
[LANG.de_DE]: "Bitte wählen Sie zunächst eine der verfügbaren Karten aus",
|
|
3179
3181
|
[LANG.cs_CZ]: "Nejdřív vyberte jednu z dostupných karet",
|
|
3180
3182
|
[LANG.sk_SK]: "Najskôr vyberte jednu z dostupných kariet",
|
|
@@ -3207,7 +3209,7 @@ const dictionary = {
|
|
|
3207
3209
|
},
|
|
3208
3210
|
cardExpired: {
|
|
3209
3211
|
[LANG.en_US]: "Credit card is expired",
|
|
3210
|
-
[LANG.
|
|
3212
|
+
[LANG.en_GB]: "Credit card is expired",
|
|
3211
3213
|
[LANG.de_DE]: "Die Kreditkarte ist abgelaufen",
|
|
3212
3214
|
[LANG.cs_CZ]: "Platnost kreditní karty vypršela",
|
|
3213
3215
|
[LANG.sk_SK]: "Platnosť kreditnej karty vypršala",
|
|
@@ -3240,7 +3242,7 @@ const dictionary = {
|
|
|
3240
3242
|
},
|
|
3241
3243
|
contactUsLink: {
|
|
3242
3244
|
[LANG.en_US]: "Questions? Contact us",
|
|
3243
|
-
[LANG.
|
|
3245
|
+
[LANG.en_GB]: "Questions? Contact us",
|
|
3244
3246
|
[LANG.de_DE]: "Sie haben noch Fragen? Kontaktieren Sie uns",
|
|
3245
3247
|
[LANG.cs_CZ]: "Máte dotazy? Obraťte se na nás",
|
|
3246
3248
|
[LANG.sk_SK]: "Máte nejaké otázky? Kontaktujte nás",
|
|
@@ -3273,7 +3275,7 @@ const dictionary = {
|
|
|
3273
3275
|
},
|
|
3274
3276
|
sendingNewCode: {
|
|
3275
3277
|
[LANG.en_US]: "Sending code",
|
|
3276
|
-
[LANG.
|
|
3278
|
+
[LANG.en_GB]: "Sending code",
|
|
3277
3279
|
[LANG.de_DE]: "Code wird gesendet",
|
|
3278
3280
|
[LANG.cs_CZ]: "Odesílání kódu",
|
|
3279
3281
|
[LANG.sk_SK]: "Kód sa odosiela",
|
|
@@ -3306,7 +3308,7 @@ const dictionary = {
|
|
|
3306
3308
|
},
|
|
3307
3309
|
notAuthenticated: {
|
|
3308
3310
|
[LANG.en_US]: "You must be authenticated fist before choosing that action",
|
|
3309
|
-
[LANG.
|
|
3311
|
+
[LANG.en_GB]: "You must be authenticated fist before choosing that action",
|
|
3310
3312
|
[LANG.de_DE]: "Sie müssen zunächst authentifiziert werden, ehe Sie diese Aktion auswählen können",
|
|
3311
3313
|
[LANG.cs_CZ]: "Výběr této akce je podmíněn ověřením",
|
|
3312
3314
|
[LANG.sk_SK]: "Pred výberom tejto akcie musíte najskôr overiť svoju totožnosť",
|
|
@@ -3339,7 +3341,7 @@ const dictionary = {
|
|
|
3339
3341
|
},
|
|
3340
3342
|
clickToPay: {
|
|
3341
3343
|
[LANG.en_US]: "Click to Pay",
|
|
3342
|
-
[LANG.
|
|
3344
|
+
[LANG.en_GB]: "Click to Pay",
|
|
3343
3345
|
[LANG.de_DE]: "Click to Pay",
|
|
3344
3346
|
[LANG.cs_CZ]: "Click to Pay",
|
|
3345
3347
|
[LANG.sk_SK]: "Click to Pay",
|
|
@@ -3372,7 +3374,7 @@ const dictionary = {
|
|
|
3372
3374
|
},
|
|
3373
3375
|
weAreLookingUpYourCards: {
|
|
3374
3376
|
[LANG.en_US]: "We are checking with Click To Pay to see if you have saved any cards...",
|
|
3375
|
-
[LANG.
|
|
3377
|
+
[LANG.en_GB]: "We are checking with Click To Pay to see if you have saved any cards...",
|
|
3376
3378
|
[LANG.de_DE]: "Wir überprüfen mit Click To Pay, ob Sie Karten gespeichert haben...",
|
|
3377
3379
|
[LANG.cs_CZ]: "Pomocí funkce Click To Pay zjišťujeme, zda jste uložili nějaké karty...",
|
|
3378
3380
|
[LANG.sk_SK]: "Kontrolujeme službu Click To Pay, aby sme zistili, či máte nejaké uložené karty...",
|
|
@@ -3405,7 +3407,7 @@ const dictionary = {
|
|
|
3405
3407
|
},
|
|
3406
3408
|
cardStackLoaderAltDescription: {
|
|
3407
3409
|
[LANG.en_US]: "Stacking cards animation loader",
|
|
3408
|
-
[LANG.
|
|
3410
|
+
[LANG.en_GB]: "Stacking cards animation loader",
|
|
3409
3411
|
[LANG.de_DE]: "Ladeprogramm für Stapelkarten-Animationen",
|
|
3410
3412
|
[LANG.cs_CZ]: "Animace načítání stránky s naskládanými kartami",
|
|
3411
3413
|
[LANG.sk_SK]: "Animácia načítavania stránky s kartami ukladanými na seba",
|
|
@@ -3438,7 +3440,7 @@ const dictionary = {
|
|
|
3438
3440
|
},
|
|
3439
3441
|
weAreAddingYourCardToCtP: {
|
|
3440
3442
|
[LANG.en_US]: "We're now adding your card to Click to Pay...",
|
|
3441
|
-
[LANG.
|
|
3443
|
+
[LANG.en_GB]: "We’re now adding your card to Click to Pay...",
|
|
3442
3444
|
[LANG.de_DE]: "Wir fügen jetzt Ihre Karte zu Click to Pay hinzu...",
|
|
3443
3445
|
[LANG.cs_CZ]: "Vaši kartu nyní přidáváme do služby Click to Pay...",
|
|
3444
3446
|
[LANG.sk_SK]: "Teraz vašu kartu pridáme do služby Click to Pay...",
|
|
@@ -3471,7 +3473,7 @@ const dictionary = {
|
|
|
3471
3473
|
},
|
|
3472
3474
|
weWillSendYouAConfirmationEmail: {
|
|
3473
3475
|
[LANG.en_US]: "(we'll send you a confirmation email)",
|
|
3474
|
-
[LANG.
|
|
3476
|
+
[LANG.en_GB]: "(we’ll send you a confirmation email)",
|
|
3475
3477
|
[LANG.de_DE]: "(wir senden Ihnen eine Bestätigungs-E-Mail)",
|
|
3476
3478
|
[LANG.cs_CZ]: "(zašleme vám potvrzovací e-mail)",
|
|
3477
3479
|
[LANG.sk_SK]: "(pošleme vám potvrdzujúci e-mail)",
|
|
@@ -3506,7 +3508,7 @@ const dictionary = {
|
|
|
3506
3508
|
logInScreen: {
|
|
3507
3509
|
header1: {
|
|
3508
3510
|
[LANG.en_US]: "Already have",
|
|
3509
|
-
[LANG.
|
|
3511
|
+
[LANG.en_GB]: "Already have",
|
|
3510
3512
|
[LANG.de_DE]: "Sie haben bereits eine",
|
|
3511
3513
|
[LANG.cs_CZ]: "Už máte již",
|
|
3512
3514
|
[LANG.sk_SK]: "Máte už",
|
|
@@ -3539,7 +3541,7 @@ const dictionary = {
|
|
|
3539
3541
|
},
|
|
3540
3542
|
header2: {
|
|
3541
3543
|
[LANG.en_US]: "?",
|
|
3542
|
-
[LANG.
|
|
3544
|
+
[LANG.en_GB]: "?",
|
|
3543
3545
|
[LANG.de_DE]: "?",
|
|
3544
3546
|
[LANG.cs_CZ]: "?",
|
|
3545
3547
|
[LANG.sk_SK]: "?",
|
|
@@ -3572,7 +3574,7 @@ const dictionary = {
|
|
|
3572
3574
|
},
|
|
3573
3575
|
emailInputPlaceholder: {
|
|
3574
3576
|
[LANG.en_US]: "Enter email address",
|
|
3575
|
-
[LANG.
|
|
3577
|
+
[LANG.en_GB]: "Enter email address",
|
|
3576
3578
|
[LANG.de_DE]: "E-Mail-Adresse eingeben",
|
|
3577
3579
|
[LANG.cs_CZ]: "Zadejte e-mailovou adresu",
|
|
3578
3580
|
[LANG.sk_SK]: "Zadajte e-mailovú adresu",
|
|
@@ -3605,7 +3607,7 @@ const dictionary = {
|
|
|
3605
3607
|
},
|
|
3606
3608
|
subHeader: {
|
|
3607
3609
|
[LANG.en_US]: "Enter your email to access your cards (your email is your user ID)",
|
|
3608
|
-
[LANG.
|
|
3610
|
+
[LANG.en_GB]: "Enter your email to access your cards (your email is your user ID)",
|
|
3609
3611
|
[LANG.de_DE]: "Geben Sie Ihre E-Mail-Adresse ein, um auf Ihre Karten zuzugreifen (Ihre E-Mail-Adresse ist Ihre Benutzer-ID)",
|
|
3610
3612
|
[LANG.cs_CZ]: "Zadejte e-mail pro přístup k vašim kartám (váš e-mail je vaše ID uživatele)",
|
|
3611
3613
|
[LANG.sk_SK]: "Zadajte e-mail na prístup k svojim kartám (Vaša e-mailová adresa je vaše ID používateľa)",
|
|
@@ -3638,7 +3640,7 @@ const dictionary = {
|
|
|
3638
3640
|
},
|
|
3639
3641
|
helperText: {
|
|
3640
3642
|
[LANG.en_US]: "Click to Pay will use this information to check if you have any saved cards.",
|
|
3641
|
-
[LANG.
|
|
3643
|
+
[LANG.en_GB]: "Click to Pay will use this information to check if you have any saved cards.",
|
|
3642
3644
|
[LANG.de_DE]: "Mit diesen Informationen prüft Click to Pay, ob Sie eine Karte gespeichert haben.",
|
|
3643
3645
|
[LANG.cs_CZ]: "Click to Pay využije tyto informace pro ověření, jestli máte nějaké uložené platební karty.",
|
|
3644
3646
|
[LANG.sk_SK]: "Služba Click to Pay použije tieto informácie na kontrolu, či máte nejaké uložené karty.",
|
|
@@ -3673,7 +3675,7 @@ const dictionary = {
|
|
|
3673
3675
|
otpScreen: {
|
|
3674
3676
|
header: {
|
|
3675
3677
|
[LANG.en_US]: "Access your saved Click to Pay cards",
|
|
3676
|
-
[LANG.
|
|
3678
|
+
[LANG.en_GB]: "Access your saved Click to Pay cards",
|
|
3677
3679
|
[LANG.de_DE]: "Greifen Sie auf Ihre in Click to Pay gespeicherten Karten zu",
|
|
3678
3680
|
[LANG.cs_CZ]: "Přístup k uloženým kartám Click to Pay",
|
|
3679
3681
|
[LANG.sk_SK]: "Zobraziť uložené karty Click to Pay",
|
|
@@ -3706,7 +3708,7 @@ const dictionary = {
|
|
|
3706
3708
|
},
|
|
3707
3709
|
confirmationSentToVisa: {
|
|
3708
3710
|
[LANG.en_US]: "We've asked Click to Pay to send you a onetime passcode to [maskedValidationChannel] to confirm it's you.",
|
|
3709
|
-
[LANG.
|
|
3711
|
+
[LANG.en_GB]: "We’ve asked Click to Pay to send you a one-time passcode to [maskedValidationChannel] to confirm it’s you.",
|
|
3710
3712
|
[LANG.de_DE]: "Click to Pay wird Ihnen ein einmaliges Passwort an [maskedValidationChannel] zusenden, um Ihre Identität zu bestätigen.",
|
|
3711
3713
|
[LANG.cs_CZ]: "Požádali jsme Click to Pay, aby vám poslal jednorázové heslo na [maskedValidationChannel] pro potvrzení, že jste to vy. ",
|
|
3712
3714
|
[LANG.sk_SK]: "Požiadali sme službu Click to Pay o poslanie jednorazového kódu na [maskedValidationChannel] na overenie, že ste to vy. ",
|
|
@@ -3739,7 +3741,7 @@ const dictionary = {
|
|
|
3739
3741
|
},
|
|
3740
3742
|
confirmationSentToMC: {
|
|
3741
3743
|
[LANG.en_US]: "Enter the code Mastercard sent to [maskedValidationChannel]",
|
|
3742
|
-
[LANG.
|
|
3744
|
+
[LANG.en_GB]: "Enter the code Mastercard sent to [maskedValidationChannel]",
|
|
3743
3745
|
[LANG.de_DE]: "Geben Sie den an [maskedValidationChannel] gesendeten Mastercard-Code ein",
|
|
3744
3746
|
[LANG.cs_CZ]: "Zadejte kód Mastercard zaslaný na [maskedValidationChannel]",
|
|
3745
3747
|
[LANG.sk_SK]: "Uveďte kód Mastercard odoslaný na [maskedValidationChannel]",
|
|
@@ -3772,7 +3774,7 @@ const dictionary = {
|
|
|
3772
3774
|
},
|
|
3773
3775
|
skipVerificationNextTime: {
|
|
3774
3776
|
[LANG.en_US]: "Skip verification next time",
|
|
3775
|
-
[LANG.
|
|
3777
|
+
[LANG.en_GB]: "Skip verification next time",
|
|
3776
3778
|
[LANG.de_DE]: "Überprüfung beim nächsten Mal überspringen",
|
|
3777
3779
|
[LANG.cs_CZ]: "Příště přeskočit ověření",
|
|
3778
3780
|
[LANG.sk_SK]: "Nabudúce preskočiť overenie",
|
|
@@ -3805,7 +3807,7 @@ const dictionary = {
|
|
|
3805
3807
|
},
|
|
3806
3808
|
mobile: {
|
|
3807
3809
|
[LANG.en_US]: "Mobile",
|
|
3808
|
-
[LANG.
|
|
3810
|
+
[LANG.en_GB]: "Mobile",
|
|
3809
3811
|
[LANG.de_DE]: "Mobilgeräte",
|
|
3810
3812
|
[LANG.cs_CZ]: "Mobilní telefon",
|
|
3811
3813
|
[LANG.sk_SK]: "Mobil",
|
|
@@ -3838,7 +3840,7 @@ const dictionary = {
|
|
|
3838
3840
|
},
|
|
3839
3841
|
email: {
|
|
3840
3842
|
[LANG.en_US]: "Email",
|
|
3841
|
-
[LANG.
|
|
3843
|
+
[LANG.en_GB]: "Email",
|
|
3842
3844
|
[LANG.de_DE]: "E-Mail",
|
|
3843
3845
|
[LANG.cs_CZ]: "E-mail",
|
|
3844
3846
|
[LANG.sk_SK]: "E-mail",
|
|
@@ -3873,7 +3875,7 @@ const dictionary = {
|
|
|
3873
3875
|
handledErrorScreen: {
|
|
3874
3876
|
header: {
|
|
3875
3877
|
[LANG.en_US]: "There was a problem with your Click to Pay account.",
|
|
3876
|
-
[LANG.
|
|
3878
|
+
[LANG.en_GB]: "There was a problem with your Click to Pay account.",
|
|
3877
3879
|
[LANG.de_DE]: "Es gab ein Problem mit Ihrer Click to Pay ID.",
|
|
3878
3880
|
[LANG.cs_CZ]: "Nastal problém s vaším účtem Click to Pay.",
|
|
3879
3881
|
[LANG.sk_SK]: "Vyskytol sa problém s vaším účtom Click to Pay.",
|
|
@@ -3906,7 +3908,7 @@ const dictionary = {
|
|
|
3906
3908
|
},
|
|
3907
3909
|
lockedAccount: {
|
|
3908
3910
|
[LANG.en_US]: "Your account has been temporarily locked. You can select the alternative payment method, use a different account or try again at a later date.",
|
|
3909
|
-
[LANG.
|
|
3911
|
+
[LANG.en_GB]: "Your account has been temporarily locked. You can select the alternative payment method, use a different account or try again at a later date.",
|
|
3910
3912
|
[LANG.de_DE]: "Ihre ID wurde vorübergehend gesperrt. Sie können eine alternative Bezahlmethode auswählen, eine andere ID verwenden oder es zu einem späteren Zeitpunkt erneut versuchen.",
|
|
3911
3913
|
[LANG.cs_CZ]: "Váš účet byl dočasně zablokován. Můžete si vybrat alternativní způsob platby, použít jiný účet nebo to zkusit znovu později.",
|
|
3912
3914
|
[LANG.sk_SK]: "Váš účet bol dočasne zablokovaný. Môžete si vybrať alternatívny spôsob platby, použiť iný účet alebo to skúsiť znovu inokedy.",
|
|
@@ -3941,7 +3943,7 @@ const dictionary = {
|
|
|
3941
3943
|
unhandledErrorScreen: {
|
|
3942
3944
|
header: {
|
|
3943
3945
|
[LANG.en_US]: "Unfortunately, something went wrong.",
|
|
3944
|
-
[LANG.
|
|
3946
|
+
[LANG.en_GB]: "Unfortunately, something went wrong.",
|
|
3945
3947
|
[LANG.de_DE]: "Leider ist etwas schief gelaufen.",
|
|
3946
3948
|
[LANG.cs_CZ]: "Bohužel se něco pokazilo.",
|
|
3947
3949
|
[LANG.sk_SK]: "Žiaľ, niečo sa pokazilo.",
|
|
@@ -3974,7 +3976,7 @@ const dictionary = {
|
|
|
3974
3976
|
},
|
|
3975
3977
|
contactUs: {
|
|
3976
3978
|
[LANG.en_US]: "Please try again and if the problem persists, contact customer support to assist you in your purchase.",
|
|
3977
|
-
[LANG.
|
|
3979
|
+
[LANG.en_GB]: "Please try again and, if the problem persists, contact customer support to assist you in your purchase.",
|
|
3978
3980
|
[LANG.de_DE]: "Bitte versuchen Sie es erneut. Wenn das Problem weiterhin besteht, wenden Sie sich an den Kundendienst, um Ihnen bei Ihrem Einkauf zu helfen.",
|
|
3979
3981
|
[LANG.cs_CZ]: "Zkuste to prosím znovu a pokud problém přetrvává, kontaktujte zákaznickou podporu, která vám s nákupem pomůže.",
|
|
3980
3982
|
[LANG.sk_SK]: "Skúste to znovu a ak problém pretrváva, obráťte sa na oddelenie podpory pre zákazníkov, ktoré vám pomôže s nákupom.",
|
|
@@ -4009,7 +4011,7 @@ const dictionary = {
|
|
|
4009
4011
|
ctpExplanationModal: {
|
|
4010
4012
|
title: {
|
|
4011
4013
|
[LANG.en_US]: "How it works",
|
|
4012
|
-
[LANG.
|
|
4014
|
+
[LANG.en_GB]: "How it works",
|
|
4013
4015
|
[LANG.de_DE]: "So funktioniert's",
|
|
4014
4016
|
[LANG.cs_CZ]: "Jak to funguje",
|
|
4015
4017
|
[LANG.sk_SK]: "Ako to funguje",
|
|
@@ -4042,7 +4044,7 @@ const dictionary = {
|
|
|
4042
4044
|
},
|
|
4043
4045
|
bullet1: {
|
|
4044
4046
|
[LANG.en_US]: "Look for the symbol when shopping online",
|
|
4045
|
-
[LANG.
|
|
4047
|
+
[LANG.en_GB]: "Look for the symbol when shopping online",
|
|
4046
4048
|
[LANG.de_DE]: "Achten Sie beim Online-Einkauf auf das Symbol",
|
|
4047
4049
|
[LANG.cs_CZ]: "Při online nákupech hledejte tento symbol",
|
|
4048
4050
|
[LANG.sk_SK]: "Pri nákupe online hľadajte symbol",
|
|
@@ -4075,7 +4077,7 @@ const dictionary = {
|
|
|
4075
4077
|
},
|
|
4076
4078
|
bullet2: {
|
|
4077
4079
|
[LANG.en_US]: "Enter your linked email or mobile",
|
|
4078
|
-
[LANG.
|
|
4080
|
+
[LANG.en_GB]: "Enter your linked email or mobile",
|
|
4079
4081
|
[LANG.de_DE]: "Geben Sie Ihre verknüpfte E-Mail-Adresse oder Handynummer ein",
|
|
4080
4082
|
[LANG.cs_CZ]: "Zadejte svůj propojený e-mail nebo telefon",
|
|
4081
4083
|
[LANG.sk_SK]: "Zadajte svoj prepojený e-mail alebo číslo mobilného telefónu",
|
|
@@ -4108,7 +4110,7 @@ const dictionary = {
|
|
|
4108
4110
|
},
|
|
4109
4111
|
bullet3: {
|
|
4110
4112
|
[LANG.en_US]: "Enter the one-time passcode to verify it’s you",
|
|
4111
|
-
[LANG.
|
|
4113
|
+
[LANG.en_GB]: "Enter the one-time passcode to verify it’s you",
|
|
4112
4114
|
[LANG.de_DE]: "Geben Sie das Einmalkennwort ein, um Ihre Identität zu bestätigen",
|
|
4113
4115
|
[LANG.cs_CZ]: "Zadejte jednorázový kód pro ověření, že jste to vy",
|
|
4114
4116
|
[LANG.sk_SK]: "Zadajte jednorazový prístupový kód a overte svoju identitu",
|
|
@@ -4141,7 +4143,7 @@ const dictionary = {
|
|
|
4141
4143
|
},
|
|
4142
4144
|
bullet4: {
|
|
4143
4145
|
[LANG.en_US]: "Select the card you want to use",
|
|
4144
|
-
[LANG.
|
|
4146
|
+
[LANG.en_GB]: "Select the card you want to use",
|
|
4145
4147
|
[LANG.de_DE]: "Wählen Sie die Karte aus, die Sie verwenden möchten",
|
|
4146
4148
|
[LANG.cs_CZ]: "Vyberte kartu, kterou chcete použít",
|
|
4147
4149
|
[LANG.sk_SK]: "Vyberte kartu, ktorú chcete použiť",
|
|
@@ -4174,7 +4176,7 @@ const dictionary = {
|
|
|
4174
4176
|
},
|
|
4175
4177
|
bullet5: {
|
|
4176
4178
|
[LANG.en_US]: "That’s it",
|
|
4177
|
-
[LANG.
|
|
4179
|
+
[LANG.en_GB]: "That’s it",
|
|
4178
4180
|
[LANG.de_DE]: "Das war's",
|
|
4179
4181
|
[LANG.cs_CZ]: "A je to",
|
|
4180
4182
|
[LANG.sk_SK]: "To je všetko",
|
|
@@ -4207,7 +4209,7 @@ const dictionary = {
|
|
|
4207
4209
|
},
|
|
4208
4210
|
smallText: {
|
|
4209
4211
|
[LANG.en_US]: "Backed by the most trusted brands in the World",
|
|
4210
|
-
[LANG.
|
|
4212
|
+
[LANG.en_GB]: "Backed by the most trusted brands in the World",
|
|
4211
4213
|
[LANG.de_DE]: "Unterstützt von den renommiertesten Marken der Welt",
|
|
4212
4214
|
[LANG.cs_CZ]: "Podporováno nejdůvěryhodnějšími značkami na světě",
|
|
4213
4215
|
[LANG.sk_SK]: "Podporované najdôveryhodnejšími značkami na svete",
|
|
@@ -4242,7 +4244,7 @@ const dictionary = {
|
|
|
4242
4244
|
consumerNotFoundScreen: {
|
|
4243
4245
|
noSavedCards: {
|
|
4244
4246
|
[LANG.en_US]: "Click to Pay has told us you don't have any saved cards for [email]",
|
|
4245
|
-
[LANG.
|
|
4247
|
+
[LANG.en_GB]: "Click to Pay told us you don’t have any saved cards for [email]",
|
|
4246
4248
|
[LANG.de_DE]: "Click to Pay teilt uns mit, dass für [email] keine gespeicherten Karten vorhanden sind",
|
|
4247
4249
|
[LANG.cs_CZ]: "Click to Pay nám sdělil, že nemáte žádné uložené karty pro [email]",
|
|
4248
4250
|
[LANG.sk_SK]: "Služba Click to Pay nám oznámila, že nemáte žiadne uložené karty k e-mailovej adrese [email]",
|
|
@@ -4386,7 +4388,7 @@ function create_if_block_2$4(ctx) {
|
|
|
4386
4388
|
ctx[2]
|
|
4387
4389
|
),
|
|
4388
4390
|
disabled: !/*isSelectable*/
|
|
4389
|
-
ctx[
|
|
4391
|
+
ctx[7],
|
|
4390
4392
|
value: (
|
|
4391
4393
|
/*card*/
|
|
4392
4394
|
ctx[1].maskedCard.srcDigitalCardId
|
|
@@ -4394,7 +4396,7 @@ function create_if_block_2$4(ctx) {
|
|
|
4394
4396
|
name: "allCardsGroup",
|
|
4395
4397
|
label: (
|
|
4396
4398
|
/*creditCardName*/
|
|
4397
|
-
ctx[
|
|
4399
|
+
ctx[9]
|
|
4398
4400
|
),
|
|
4399
4401
|
hideLabel: true,
|
|
4400
4402
|
id: (
|
|
@@ -4418,17 +4420,17 @@ function create_if_block_2$4(ctx) {
|
|
|
4418
4420
|
radiobutton_changes.checked = /*checked*/
|
|
4419
4421
|
ctx2[2];
|
|
4420
4422
|
if (dirty & /*isSelectable*/
|
|
4421
|
-
|
|
4423
|
+
128)
|
|
4422
4424
|
radiobutton_changes.disabled = !/*isSelectable*/
|
|
4423
|
-
ctx2[
|
|
4425
|
+
ctx2[7];
|
|
4424
4426
|
if (dirty & /*card*/
|
|
4425
4427
|
2)
|
|
4426
4428
|
radiobutton_changes.value = /*card*/
|
|
4427
4429
|
ctx2[1].maskedCard.srcDigitalCardId;
|
|
4428
4430
|
if (dirty & /*creditCardName*/
|
|
4429
|
-
|
|
4431
|
+
512)
|
|
4430
4432
|
radiobutton_changes.label = /*creditCardName*/
|
|
4431
|
-
ctx2[
|
|
4433
|
+
ctx2[9];
|
|
4432
4434
|
if (dirty & /*card*/
|
|
4433
4435
|
2)
|
|
4434
4436
|
radiobutton_changes.id = /*card*/
|
|
@@ -4458,7 +4460,7 @@ function create_if_block_1$7(ctx) {
|
|
|
4458
4460
|
span = element("span");
|
|
4459
4461
|
t_1 = text(
|
|
4460
4462
|
/*creditCardNumber*/
|
|
4461
|
-
ctx[
|
|
4463
|
+
ctx[8]
|
|
4462
4464
|
);
|
|
4463
4465
|
attr(span, "class", "credit-card--masked-pan svelte-1q536af");
|
|
4464
4466
|
attr(span, "dir", LanguageDirection.LTR);
|
|
@@ -4469,11 +4471,11 @@ function create_if_block_1$7(ctx) {
|
|
|
4469
4471
|
},
|
|
4470
4472
|
p(ctx2, dirty) {
|
|
4471
4473
|
if (dirty & /*creditCardNumber*/
|
|
4472
|
-
|
|
4474
|
+
256)
|
|
4473
4475
|
set_data(
|
|
4474
4476
|
t_1,
|
|
4475
4477
|
/*creditCardNumber*/
|
|
4476
|
-
ctx2[
|
|
4478
|
+
ctx2[8]
|
|
4477
4479
|
);
|
|
4478
4480
|
},
|
|
4479
4481
|
d(detaching) {
|
|
@@ -4489,9 +4491,9 @@ function create_if_block$d(ctx) {
|
|
|
4489
4491
|
props: {
|
|
4490
4492
|
label: (
|
|
4491
4493
|
/*$t*/
|
|
4492
|
-
ctx[
|
|
4494
|
+
ctx[11](
|
|
4493
4495
|
/*statusLabel*/
|
|
4494
|
-
ctx[
|
|
4496
|
+
ctx[6]
|
|
4495
4497
|
)
|
|
4496
4498
|
)
|
|
4497
4499
|
}
|
|
@@ -4507,11 +4509,11 @@ function create_if_block$d(ctx) {
|
|
|
4507
4509
|
p(ctx2, dirty) {
|
|
4508
4510
|
const badge_changes = {};
|
|
4509
4511
|
if (dirty & /*$t, statusLabel*/
|
|
4510
|
-
|
|
4512
|
+
2112)
|
|
4511
4513
|
badge_changes.label = /*$t*/
|
|
4512
|
-
ctx2[
|
|
4514
|
+
ctx2[11](
|
|
4513
4515
|
/*statusLabel*/
|
|
4514
|
-
ctx2[
|
|
4516
|
+
ctx2[6]
|
|
4515
4517
|
);
|
|
4516
4518
|
badge.$set(badge_changes);
|
|
4517
4519
|
},
|
|
@@ -4550,10 +4552,10 @@ function create_fragment$o(ctx) {
|
|
|
4550
4552
|
ctx[3] && create_if_block_2$4(ctx);
|
|
4551
4553
|
let if_block1 = (
|
|
4552
4554
|
/*creditCardNumber*/
|
|
4553
|
-
ctx[
|
|
4555
|
+
ctx[8] && create_if_block_1$7(ctx)
|
|
4554
4556
|
);
|
|
4555
4557
|
let if_block2 = !/*isSelectable*/
|
|
4556
|
-
ctx[
|
|
4558
|
+
ctx[7] && create_if_block$d(ctx);
|
|
4557
4559
|
return {
|
|
4558
4560
|
c() {
|
|
4559
4561
|
div1 = element("div");
|
|
@@ -4566,7 +4568,7 @@ function create_fragment$o(ctx) {
|
|
|
4566
4568
|
span0 = element("span");
|
|
4567
4569
|
t2 = text(
|
|
4568
4570
|
/*creditCardName*/
|
|
4569
|
-
ctx[
|
|
4571
|
+
ctx[9]
|
|
4570
4572
|
);
|
|
4571
4573
|
t3 = space();
|
|
4572
4574
|
div0 = element("div");
|
|
@@ -4577,7 +4579,7 @@ function create_fragment$o(ctx) {
|
|
|
4577
4579
|
if_block2.c();
|
|
4578
4580
|
attr(img, "class", "credit-card--image svelte-1q536af");
|
|
4579
4581
|
if (!src_url_equal(img.src, img_src_value = /*creditCardImage*/
|
|
4580
|
-
ctx[
|
|
4582
|
+
ctx[10]))
|
|
4581
4583
|
attr(img, "src", img_src_value);
|
|
4582
4584
|
attr(
|
|
4583
4585
|
img,
|
|
@@ -4590,7 +4592,7 @@ function create_fragment$o(ctx) {
|
|
|
4590
4592
|
attr(div0, "class", "credit-card--pan-wrapper svelte-1q536af");
|
|
4591
4593
|
attr(span1, "class", "credit-card--container svelte-1q536af");
|
|
4592
4594
|
attr(div1, "class", div1_class_value = null_to_empty(`credit-card ${/*isSelectable*/
|
|
4593
|
-
ctx[
|
|
4595
|
+
ctx[7] ? "selectable" : ""} ${/*singleCard*/
|
|
4594
4596
|
ctx[3] ? "single-card" : ""} ${/*checked*/
|
|
4595
4597
|
ctx[2] ? "selected" : ""}`) + " svelte-1q536af");
|
|
4596
4598
|
attr(div1, "role", "none");
|
|
@@ -4601,6 +4603,7 @@ function create_fragment$o(ctx) {
|
|
|
4601
4603
|
if_block0.m(div1, null);
|
|
4602
4604
|
append(div1, t0);
|
|
4603
4605
|
append(div1, img);
|
|
4606
|
+
ctx[14](img);
|
|
4604
4607
|
append(div1, t1);
|
|
4605
4608
|
append(div1, span1);
|
|
4606
4609
|
append(span1, span0);
|
|
@@ -4614,12 +4617,20 @@ function create_fragment$o(ctx) {
|
|
|
4614
4617
|
if_block2.m(div0, null);
|
|
4615
4618
|
current = true;
|
|
4616
4619
|
if (!mounted) {
|
|
4617
|
-
dispose =
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4620
|
+
dispose = [
|
|
4621
|
+
listen(
|
|
4622
|
+
img,
|
|
4623
|
+
"error",
|
|
4624
|
+
/*onImageLoadingError*/
|
|
4625
|
+
ctx[12]
|
|
4626
|
+
),
|
|
4627
|
+
listen(
|
|
4628
|
+
div1,
|
|
4629
|
+
"click",
|
|
4630
|
+
/*click_handler*/
|
|
4631
|
+
ctx[15]
|
|
4632
|
+
)
|
|
4633
|
+
];
|
|
4623
4634
|
mounted = true;
|
|
4624
4635
|
}
|
|
4625
4636
|
},
|
|
@@ -4646,8 +4657,8 @@ function create_fragment$o(ctx) {
|
|
|
4646
4657
|
check_outros();
|
|
4647
4658
|
}
|
|
4648
4659
|
if (!current || dirty & /*creditCardImage*/
|
|
4649
|
-
|
|
4650
|
-
ctx2[
|
|
4660
|
+
1024 && !src_url_equal(img.src, img_src_value = /*creditCardImage*/
|
|
4661
|
+
ctx2[10])) {
|
|
4651
4662
|
attr(img, "src", img_src_value);
|
|
4652
4663
|
}
|
|
4653
4664
|
if (!current || dirty & /*creditCardBrand*/
|
|
@@ -4660,15 +4671,15 @@ function create_fragment$o(ctx) {
|
|
|
4660
4671
|
);
|
|
4661
4672
|
}
|
|
4662
4673
|
if (!current || dirty & /*creditCardName*/
|
|
4663
|
-
|
|
4674
|
+
512)
|
|
4664
4675
|
set_data(
|
|
4665
4676
|
t2,
|
|
4666
4677
|
/*creditCardName*/
|
|
4667
|
-
ctx2[
|
|
4678
|
+
ctx2[9]
|
|
4668
4679
|
);
|
|
4669
4680
|
if (
|
|
4670
4681
|
/*creditCardNumber*/
|
|
4671
|
-
ctx2[
|
|
4682
|
+
ctx2[8]
|
|
4672
4683
|
) {
|
|
4673
4684
|
if (if_block1) {
|
|
4674
4685
|
if_block1.p(ctx2, dirty);
|
|
@@ -4682,11 +4693,11 @@ function create_fragment$o(ctx) {
|
|
|
4682
4693
|
if_block1 = null;
|
|
4683
4694
|
}
|
|
4684
4695
|
if (!/*isSelectable*/
|
|
4685
|
-
ctx2[
|
|
4696
|
+
ctx2[7]) {
|
|
4686
4697
|
if (if_block2) {
|
|
4687
4698
|
if_block2.p(ctx2, dirty);
|
|
4688
4699
|
if (dirty & /*isSelectable*/
|
|
4689
|
-
|
|
4700
|
+
128) {
|
|
4690
4701
|
transition_in(if_block2, 1);
|
|
4691
4702
|
}
|
|
4692
4703
|
} else {
|
|
@@ -4703,8 +4714,8 @@ function create_fragment$o(ctx) {
|
|
|
4703
4714
|
check_outros();
|
|
4704
4715
|
}
|
|
4705
4716
|
if (!current || dirty & /*isSelectable, singleCard, checked*/
|
|
4706
|
-
|
|
4707
|
-
ctx2[
|
|
4717
|
+
140 && div1_class_value !== (div1_class_value = null_to_empty(`credit-card ${/*isSelectable*/
|
|
4718
|
+
ctx2[7] ? "selectable" : ""} ${/*singleCard*/
|
|
4708
4719
|
ctx2[3] ? "single-card" : ""} ${/*checked*/
|
|
4709
4720
|
ctx2[2] ? "selected" : ""}`) + " svelte-1q536af")) {
|
|
4710
4721
|
attr(div1, "class", div1_class_value);
|
|
@@ -4727,12 +4738,13 @@ function create_fragment$o(ctx) {
|
|
|
4727
4738
|
detach(div1);
|
|
4728
4739
|
if (if_block0)
|
|
4729
4740
|
if_block0.d();
|
|
4741
|
+
ctx[14](null);
|
|
4730
4742
|
if (if_block1)
|
|
4731
4743
|
if_block1.d();
|
|
4732
4744
|
if (if_block2)
|
|
4733
4745
|
if_block2.d();
|
|
4734
4746
|
mounted = false;
|
|
4735
|
-
dispose
|
|
4747
|
+
run_all(dispose);
|
|
4736
4748
|
}
|
|
4737
4749
|
};
|
|
4738
4750
|
}
|
|
@@ -4745,11 +4757,12 @@ function instance$o($$self, $$props, $$invalidate) {
|
|
|
4745
4757
|
let isSelectable;
|
|
4746
4758
|
let statusLabel;
|
|
4747
4759
|
let $t;
|
|
4748
|
-
component_subscribe($$self, t, ($$value) => $$invalidate(
|
|
4760
|
+
component_subscribe($$self, t, ($$value) => $$invalidate(11, $t = $$value));
|
|
4749
4761
|
let { onSelectCard } = $$props;
|
|
4750
4762
|
let { card } = $$props;
|
|
4751
4763
|
let { checked = false } = $$props;
|
|
4752
4764
|
let { singleCard = false } = $$props;
|
|
4765
|
+
let cardArtImage;
|
|
4753
4766
|
if (!card) {
|
|
4754
4767
|
throw Error("Cannot render credit card when card prop is missing.");
|
|
4755
4768
|
}
|
|
@@ -4759,6 +4772,19 @@ function instance$o($$self, $$props, $$invalidate) {
|
|
|
4759
4772
|
}
|
|
4760
4773
|
return artUri;
|
|
4761
4774
|
};
|
|
4775
|
+
const onImageLoadingError = () => {
|
|
4776
|
+
if (creditCardBrand === CreditCardBrand.MASTERCARD) {
|
|
4777
|
+
$$invalidate(5, cardArtImage.src = CardImgMC, cardArtImage);
|
|
4778
|
+
} else if (creditCardBrand === CreditCardBrand.VISA) {
|
|
4779
|
+
$$invalidate(5, cardArtImage.src = CardImgVisa, cardArtImage);
|
|
4780
|
+
}
|
|
4781
|
+
};
|
|
4782
|
+
function img_binding($$value) {
|
|
4783
|
+
binding_callbacks[$$value ? "unshift" : "push"](() => {
|
|
4784
|
+
cardArtImage = $$value;
|
|
4785
|
+
$$invalidate(5, cardArtImage);
|
|
4786
|
+
});
|
|
4787
|
+
}
|
|
4762
4788
|
const click_handler = () => isSelectable && onSelectCard(card);
|
|
4763
4789
|
$$self.$$set = ($$props2) => {
|
|
4764
4790
|
if ("onSelectCard" in $$props2)
|
|
@@ -4771,34 +4797,34 @@ function instance$o($$self, $$props, $$invalidate) {
|
|
|
4771
4797
|
$$invalidate(3, singleCard = $$props2.singleCard);
|
|
4772
4798
|
};
|
|
4773
4799
|
$$self.$$.update = () => {
|
|
4774
|
-
var
|
|
4800
|
+
var _a2, _b, _c, _d, _e;
|
|
4775
4801
|
if ($$self.$$.dirty & /*card*/
|
|
4776
4802
|
2) {
|
|
4777
4803
|
$$invalidate(4, creditCardBrand = card.creditCardBrand);
|
|
4778
4804
|
}
|
|
4779
4805
|
if ($$self.$$.dirty & /*card*/
|
|
4780
4806
|
2) {
|
|
4781
|
-
$$invalidate(
|
|
4807
|
+
$$invalidate(10, creditCardImage = getCreditCardImage((_a2 = card.maskedCard.digitalCardData) == null ? void 0 : _a2.artUri));
|
|
4782
4808
|
}
|
|
4783
4809
|
if ($$self.$$.dirty & /*card, creditCardBrand*/
|
|
4784
4810
|
18) {
|
|
4785
|
-
$$invalidate(
|
|
4811
|
+
$$invalidate(9, creditCardName = getCreditCardName((_c = (_b = card.maskedCard) == null ? void 0 : _b.digitalCardData) == null ? void 0 : _c.presentationName, (_e = (_d = card.maskedCard) == null ? void 0 : _d.digitalCardData) == null ? void 0 : _e.coBrandedName) ?? creditCardBrand);
|
|
4786
4812
|
}
|
|
4787
4813
|
if ($$self.$$.dirty & /*card*/
|
|
4788
4814
|
2) {
|
|
4789
|
-
$$invalidate(
|
|
4815
|
+
$$invalidate(8, creditCardNumber = getCreditCardNumber(card.maskedCard.panLastFour));
|
|
4790
4816
|
}
|
|
4791
4817
|
if ($$self.$$.dirty & /*card*/
|
|
4792
4818
|
2) {
|
|
4793
|
-
$$invalidate(
|
|
4819
|
+
$$invalidate(13, isExpired = isCreditCardExpired(card == null ? void 0 : card.maskedCard.panExpirationYear, card == null ? void 0 : card.maskedCard.panExpirationMonth));
|
|
4794
4820
|
}
|
|
4795
4821
|
if ($$self.$$.dirty & /*card, isExpired*/
|
|
4796
|
-
|
|
4797
|
-
$$invalidate(
|
|
4822
|
+
8194) {
|
|
4823
|
+
$$invalidate(7, isSelectable = card && !isExpired && card.status === "ACTIVE");
|
|
4798
4824
|
}
|
|
4799
4825
|
if ($$self.$$.dirty & /*isExpired, card*/
|
|
4800
|
-
|
|
4801
|
-
$$invalidate(
|
|
4826
|
+
8194) {
|
|
4827
|
+
$$invalidate(6, statusLabel = isExpired ? "label.expired" : `label.${card == null ? void 0 : card.status}`.toLowerCase());
|
|
4802
4828
|
}
|
|
4803
4829
|
};
|
|
4804
4830
|
return [
|
|
@@ -4807,13 +4833,16 @@ function instance$o($$self, $$props, $$invalidate) {
|
|
|
4807
4833
|
checked,
|
|
4808
4834
|
singleCard,
|
|
4809
4835
|
creditCardBrand,
|
|
4836
|
+
cardArtImage,
|
|
4810
4837
|
statusLabel,
|
|
4811
4838
|
isSelectable,
|
|
4812
4839
|
creditCardNumber,
|
|
4813
4840
|
creditCardName,
|
|
4814
4841
|
creditCardImage,
|
|
4815
4842
|
$t,
|
|
4843
|
+
onImageLoadingError,
|
|
4816
4844
|
isExpired,
|
|
4845
|
+
img_binding,
|
|
4817
4846
|
click_handler
|
|
4818
4847
|
];
|
|
4819
4848
|
}
|
|
@@ -4920,11 +4949,11 @@ function create_if_block$c(ctx) {
|
|
|
4920
4949
|
let p;
|
|
4921
4950
|
let t1_value = (
|
|
4922
4951
|
/*$t*/
|
|
4923
|
-
ctx[
|
|
4952
|
+
ctx[1](
|
|
4924
4953
|
/*translationBag*/
|
|
4925
|
-
ctx[
|
|
4954
|
+
ctx[0].message,
|
|
4926
4955
|
/*translationBag*/
|
|
4927
|
-
ctx[
|
|
4956
|
+
ctx[0].params
|
|
4928
4957
|
) + ""
|
|
4929
4958
|
);
|
|
4930
4959
|
let t1;
|
|
@@ -4954,13 +4983,13 @@ function create_if_block$c(ctx) {
|
|
|
4954
4983
|
current = true;
|
|
4955
4984
|
},
|
|
4956
4985
|
p(ctx2, dirty) {
|
|
4957
|
-
if ((!current || dirty & /*$t*/
|
|
4958
|
-
|
|
4959
|
-
ctx2[
|
|
4986
|
+
if ((!current || dirty & /*$t, translationBag*/
|
|
4987
|
+
3) && t1_value !== (t1_value = /*$t*/
|
|
4988
|
+
ctx2[1](
|
|
4960
4989
|
/*translationBag*/
|
|
4961
|
-
ctx2[
|
|
4990
|
+
ctx2[0].message,
|
|
4962
4991
|
/*translationBag*/
|
|
4963
|
-
ctx2[
|
|
4992
|
+
ctx2[0].params
|
|
4964
4993
|
) + ""))
|
|
4965
4994
|
set_data(t1, t1_value);
|
|
4966
4995
|
},
|
|
@@ -4986,7 +5015,7 @@ function create_fragment$n(ctx) {
|
|
|
4986
5015
|
let current;
|
|
4987
5016
|
let if_block = (
|
|
4988
5017
|
/*translationBag*/
|
|
4989
|
-
ctx[
|
|
5018
|
+
ctx[0] && create_if_block$c(ctx)
|
|
4990
5019
|
);
|
|
4991
5020
|
return {
|
|
4992
5021
|
c() {
|
|
@@ -5003,9 +5032,27 @@ function create_fragment$n(ctx) {
|
|
|
5003
5032
|
p(ctx2, [dirty]) {
|
|
5004
5033
|
if (
|
|
5005
5034
|
/*translationBag*/
|
|
5006
|
-
ctx2[
|
|
5007
|
-
)
|
|
5008
|
-
if_block
|
|
5035
|
+
ctx2[0]
|
|
5036
|
+
) {
|
|
5037
|
+
if (if_block) {
|
|
5038
|
+
if_block.p(ctx2, dirty);
|
|
5039
|
+
if (dirty & /*translationBag*/
|
|
5040
|
+
1) {
|
|
5041
|
+
transition_in(if_block, 1);
|
|
5042
|
+
}
|
|
5043
|
+
} else {
|
|
5044
|
+
if_block = create_if_block$c(ctx2);
|
|
5045
|
+
if_block.c();
|
|
5046
|
+
transition_in(if_block, 1);
|
|
5047
|
+
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
5048
|
+
}
|
|
5049
|
+
} else if (if_block) {
|
|
5050
|
+
group_outros();
|
|
5051
|
+
transition_out(if_block, 1, 1, () => {
|
|
5052
|
+
if_block = null;
|
|
5053
|
+
});
|
|
5054
|
+
check_outros();
|
|
5055
|
+
}
|
|
5009
5056
|
},
|
|
5010
5057
|
i(local) {
|
|
5011
5058
|
if (current)
|
|
@@ -5026,12 +5073,11 @@ function create_fragment$n(ctx) {
|
|
|
5026
5073
|
};
|
|
5027
5074
|
}
|
|
5028
5075
|
function instance$n($$self, $$props, $$invalidate) {
|
|
5076
|
+
let translationBag;
|
|
5029
5077
|
let $t;
|
|
5030
|
-
component_subscribe($$self, t, ($$value) => $$invalidate(
|
|
5078
|
+
component_subscribe($$self, t, ($$value) => $$invalidate(1, $t = $$value));
|
|
5031
5079
|
const dispatcher = createEventDispatcher();
|
|
5032
5080
|
let { errorBag } = $$props;
|
|
5033
|
-
let { persistent = false } = $$props;
|
|
5034
|
-
const translationBag = getTranslationFromErrorReason(errorBag ? errorBag.reason : "");
|
|
5035
5081
|
onMount(() => {
|
|
5036
5082
|
if (translationBag === void 0) {
|
|
5037
5083
|
dispatcher(FLOW_EVENT, { flowStep: FlowStep.ON_UNHANDLED_ERROR });
|
|
@@ -5040,30 +5086,27 @@ function instance$n($$self, $$props, $$invalidate) {
|
|
|
5040
5086
|
$$self.$$set = ($$props2) => {
|
|
5041
5087
|
if ("errorBag" in $$props2)
|
|
5042
5088
|
$$invalidate(2, errorBag = $$props2.errorBag);
|
|
5043
|
-
if ("persistent" in $$props2)
|
|
5044
|
-
$$invalidate(3, persistent = $$props2.persistent);
|
|
5045
5089
|
};
|
|
5046
5090
|
$$self.$$.update = () => {
|
|
5047
|
-
if ($$self.$$.dirty & /*errorBag
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
if (errorBag && !persistent) {
|
|
5051
|
-
setTimeout(
|
|
5052
|
-
() => {
|
|
5053
|
-
$$invalidate(2, errorBag = void 0);
|
|
5054
|
-
},
|
|
5055
|
-
messageTimeout
|
|
5056
|
-
);
|
|
5057
|
-
}
|
|
5058
|
-
}
|
|
5091
|
+
if ($$self.$$.dirty & /*errorBag*/
|
|
5092
|
+
4) {
|
|
5093
|
+
$$invalidate(0, translationBag = getTranslationFromErrorReason(errorBag ? errorBag.reason : ""));
|
|
5059
5094
|
}
|
|
5060
5095
|
};
|
|
5061
|
-
|
|
5096
|
+
{
|
|
5097
|
+
setTimeout(
|
|
5098
|
+
() => {
|
|
5099
|
+
$$invalidate(0, translationBag = void 0);
|
|
5100
|
+
},
|
|
5101
|
+
messageTimeout
|
|
5102
|
+
);
|
|
5103
|
+
}
|
|
5104
|
+
return [translationBag, $t, errorBag];
|
|
5062
5105
|
}
|
|
5063
5106
|
class ErrorMessage extends SvelteComponent {
|
|
5064
5107
|
constructor(options) {
|
|
5065
5108
|
super();
|
|
5066
|
-
init(this, options, instance$n, create_fragment$n, safe_not_equal, { errorBag: 2
|
|
5109
|
+
init(this, options, instance$n, create_fragment$n, safe_not_equal, { errorBag: 2 }, add_css$k);
|
|
5067
5110
|
}
|
|
5068
5111
|
}
|
|
5069
5112
|
function add_css$j(target) {
|
|
@@ -5552,15 +5595,15 @@ const createDcfWindowStore = () => {
|
|
|
5552
5595
|
update2((value) => ({ ...value, iframe }));
|
|
5553
5596
|
},
|
|
5554
5597
|
showDcf: () => update2((value) => {
|
|
5555
|
-
var
|
|
5556
|
-
if ((
|
|
5598
|
+
var _a2, _b;
|
|
5599
|
+
if ((_a2 = value == null ? void 0 : value.iframe) == null ? void 0 : _a2.ref) {
|
|
5557
5600
|
(_b = value.iframe.handlers) == null ? void 0 : _b.onDcfShow();
|
|
5558
5601
|
}
|
|
5559
5602
|
return { ...value, display: true };
|
|
5560
5603
|
}),
|
|
5561
5604
|
hideDcf: () => update2((value) => {
|
|
5562
|
-
var
|
|
5563
|
-
if ((
|
|
5605
|
+
var _a2, _b, _c, _d, _e, _f;
|
|
5606
|
+
if ((_a2 = value == null ? void 0 : value.iframe) == null ? void 0 : _a2.ref) {
|
|
5564
5607
|
(_b = value.iframe.handlers) == null ? void 0 : _b.onDcfHide();
|
|
5565
5608
|
}
|
|
5566
5609
|
(_f = (_e = (_d = (_c = value == null ? void 0 : value.iframe) == null ? void 0 : _c.ref) == null ? void 0 : _d.contentWindow) == null ? void 0 : _e.location) == null ? void 0 : _f.replace("about:blank");
|
|
@@ -5569,6 +5612,84 @@ const createDcfWindowStore = () => {
|
|
|
5569
5612
|
};
|
|
5570
5613
|
};
|
|
5571
5614
|
const dcfWindowStore = createDcfWindowStore();
|
|
5615
|
+
var VisaIdentityTypeEnum = /* @__PURE__ */ ((VisaIdentityTypeEnum2) => {
|
|
5616
|
+
VisaIdentityTypeEnum2["EMAIL"] = "EMAIL";
|
|
5617
|
+
VisaIdentityTypeEnum2["MOBILE_NUMBER"] = "MOBILE_NUMBER";
|
|
5618
|
+
VisaIdentityTypeEnum2["CUSTOM_IDENTIFIER"] = "CUSTOM_IDENTIFIER";
|
|
5619
|
+
VisaIdentityTypeEnum2["FUTURE"] = "FUTURE";
|
|
5620
|
+
return VisaIdentityTypeEnum2;
|
|
5621
|
+
})(VisaIdentityTypeEnum || {});
|
|
5622
|
+
var VisaComplianceTypeEnum = /* @__PURE__ */ ((VisaComplianceTypeEnum2) => {
|
|
5623
|
+
VisaComplianceTypeEnum2["TERMS_AND_CONDITIONS"] = "TERMS_AND_CONDITIONS";
|
|
5624
|
+
VisaComplianceTypeEnum2["PRIVACY_POLICY"] = "PRIVACY_POLICY";
|
|
5625
|
+
VisaComplianceTypeEnum2["REMEMBER_ME"] = "REMEMBER_ME";
|
|
5626
|
+
return VisaComplianceTypeEnum2;
|
|
5627
|
+
})(VisaComplianceTypeEnum || {});
|
|
5628
|
+
var VisaAuthenticationReasonEnum = /* @__PURE__ */ ((VisaAuthenticationReasonEnum2) => {
|
|
5629
|
+
VisaAuthenticationReasonEnum2["TRANSACTION_AUTHENTICATION"] = "TRANSACTION_AUTHENTICATION";
|
|
5630
|
+
VisaAuthenticationReasonEnum2["NOT_PREFERRED"] = "NOT_PREFERRED";
|
|
5631
|
+
return VisaAuthenticationReasonEnum2;
|
|
5632
|
+
})(VisaAuthenticationReasonEnum || {});
|
|
5633
|
+
var VisaAuthenticationMethodTypeEnum = /* @__PURE__ */ ((VisaAuthenticationMethodTypeEnum2) => {
|
|
5634
|
+
VisaAuthenticationMethodTypeEnum2["SMS_OTP"] = "SMS_OTP";
|
|
5635
|
+
VisaAuthenticationMethodTypeEnum2["EMAIL_OTP"] = "EMAIL_OTP";
|
|
5636
|
+
VisaAuthenticationMethodTypeEnum2["APP_AUTHENTICATON"] = "APP_AUTHENTICATON";
|
|
5637
|
+
VisaAuthenticationMethodTypeEnum2["MANAGED_AUTHENTICATION"] = "MANAGED_AUTHENTICATION";
|
|
5638
|
+
return VisaAuthenticationMethodTypeEnum2;
|
|
5639
|
+
})(VisaAuthenticationMethodTypeEnum || {});
|
|
5640
|
+
var VisaAuthenticationSubjectEnum = /* @__PURE__ */ ((VisaAuthenticationSubjectEnum2) => {
|
|
5641
|
+
VisaAuthenticationSubjectEnum2["CARDHOLDER"] = "CARDHOLDER";
|
|
5642
|
+
VisaAuthenticationSubjectEnum2["CONSUMER"] = "CONSUMER";
|
|
5643
|
+
VisaAuthenticationSubjectEnum2["CARD"] = "CARD";
|
|
5644
|
+
return VisaAuthenticationSubjectEnum2;
|
|
5645
|
+
})(VisaAuthenticationSubjectEnum || {});
|
|
5646
|
+
var VisaErrorReasonGetSrcProfileEnum = /* @__PURE__ */ ((VisaErrorReasonGetSrcProfileEnum2) => {
|
|
5647
|
+
VisaErrorReasonGetSrcProfileEnum2["AUTH_INVALID"] = "AUTH_INVALID";
|
|
5648
|
+
VisaErrorReasonGetSrcProfileEnum2["ACCT_INACCESSIBLE"] = "ACCT_INACCESSIBLE";
|
|
5649
|
+
VisaErrorReasonGetSrcProfileEnum2["NOT_FOUND"] = "NOT_FOUND";
|
|
5650
|
+
return VisaErrorReasonGetSrcProfileEnum2;
|
|
5651
|
+
})(VisaErrorReasonGetSrcProfileEnum || {});
|
|
5652
|
+
var VisaPerformanceMarkEnum = /* @__PURE__ */ ((VisaPerformanceMarkEnum2) => {
|
|
5653
|
+
VisaPerformanceMarkEnum2["INIT_START"] = "visa_init_start";
|
|
5654
|
+
VisaPerformanceMarkEnum2["INIT_END"] = "visa_init_end";
|
|
5655
|
+
VisaPerformanceMarkEnum2["IS_RECOGNISED_START"] = "visa_recognised_start";
|
|
5656
|
+
VisaPerformanceMarkEnum2["IS_RECOGNISED_END"] = "visa_recognised_end";
|
|
5657
|
+
VisaPerformanceMarkEnum2["GET_PROFILE_START"] = "visa_get_profile_start";
|
|
5658
|
+
VisaPerformanceMarkEnum2["GET_PROFILE_END"] = "visa_get_profile_end";
|
|
5659
|
+
VisaPerformanceMarkEnum2["CHECKOUT_START"] = "visa_checkout_start";
|
|
5660
|
+
VisaPerformanceMarkEnum2["CHECKOUT_END"] = "visa_checkout_end";
|
|
5661
|
+
VisaPerformanceMarkEnum2["IDENTITY_LOOKUP_START"] = "visa_identity_lookup_start";
|
|
5662
|
+
VisaPerformanceMarkEnum2["IDENTITY_LOOKUP_END"] = "visa_identity_lookup_end";
|
|
5663
|
+
VisaPerformanceMarkEnum2["INITIATE_IDENTITY_VALIDATION_START"] = "visa_initiate_identity_validation_start";
|
|
5664
|
+
VisaPerformanceMarkEnum2["INITIATE_IDENTITY_VALIDATION_END"] = "visa_initiate_identity_validation_end";
|
|
5665
|
+
VisaPerformanceMarkEnum2["COMPLETE_IDENTITY_VALIDATION_START"] = "visa_complete_identity_validation_start";
|
|
5666
|
+
VisaPerformanceMarkEnum2["COMPLETE_IDENTITY_VALIDATION_END"] = "visa_complete_identity_validation_end";
|
|
5667
|
+
VisaPerformanceMarkEnum2["UNBIND_API_INSTANCE_START"] = "visa_unbind_api_instance_start";
|
|
5668
|
+
VisaPerformanceMarkEnum2["UNBIND_API_INSTANCE_END"] = "visa_unbind_api_instance_end";
|
|
5669
|
+
return VisaPerformanceMarkEnum2;
|
|
5670
|
+
})(VisaPerformanceMarkEnum || {});
|
|
5671
|
+
var VisaSDKPerformanceDurationMarkEnum = /* @__PURE__ */ ((VisaSDKPerformanceDurationMarkEnum2) => {
|
|
5672
|
+
VisaSDKPerformanceDurationMarkEnum2["INIT"] = "init_visa_duration";
|
|
5673
|
+
VisaSDKPerformanceDurationMarkEnum2["IS_RECOGNIZED"] = "is_recognized_visa_duration";
|
|
5674
|
+
VisaSDKPerformanceDurationMarkEnum2["GET_SRC_PROFILE"] = "get_src_profile_visa_duration";
|
|
5675
|
+
VisaSDKPerformanceDurationMarkEnum2["IDENTITY_LOOKUP"] = "identity_lookup_visa_duration";
|
|
5676
|
+
VisaSDKPerformanceDurationMarkEnum2["INITIATE_IDENTITY_VALIDATION"] = "initiate_identity_validation_visa_duration";
|
|
5677
|
+
VisaSDKPerformanceDurationMarkEnum2["COMPLETE_IDENTITY_VALIDATION"] = "complete_identity_validation_visa_duration";
|
|
5678
|
+
VisaSDKPerformanceDurationMarkEnum2["CHECKOUT"] = "checkout_visa_duration";
|
|
5679
|
+
VisaSDKPerformanceDurationMarkEnum2["UNBIND_APP_INSTANCE"] = "unbind_app_instance_visa_duration";
|
|
5680
|
+
return VisaSDKPerformanceDurationMarkEnum2;
|
|
5681
|
+
})(VisaSDKPerformanceDurationMarkEnum || {});
|
|
5682
|
+
var VisaSDKPerformanceDeltaMarkEnum = /* @__PURE__ */ ((VisaSDKPerformanceDeltaMarkEnum2) => {
|
|
5683
|
+
VisaSDKPerformanceDeltaMarkEnum2["INIT"] = "init_visa_delta";
|
|
5684
|
+
VisaSDKPerformanceDeltaMarkEnum2["IS_RECOGNIZED"] = "is_recognized_visa_delta";
|
|
5685
|
+
VisaSDKPerformanceDeltaMarkEnum2["GET_SRC_PROFILE"] = "get_src_profile_visa_delta";
|
|
5686
|
+
VisaSDKPerformanceDeltaMarkEnum2["IDENTITY_LOOKUP"] = "identity_lookup_visa_delta";
|
|
5687
|
+
VisaSDKPerformanceDeltaMarkEnum2["INITIATE_IDENTITY_VALIDATION"] = "initiate_identity_validation_visa_delta";
|
|
5688
|
+
VisaSDKPerformanceDeltaMarkEnum2["COMPLETE_IDENTITY_VALIDATION"] = "complete_identity_validation_visa_delta";
|
|
5689
|
+
VisaSDKPerformanceDeltaMarkEnum2["CHECKOUT"] = "checkout_visa_delta";
|
|
5690
|
+
VisaSDKPerformanceDeltaMarkEnum2["UNBIND_APP_INSTANCE"] = "unbind_app_instance_visa_delta";
|
|
5691
|
+
return VisaSDKPerformanceDeltaMarkEnum2;
|
|
5692
|
+
})(VisaSDKPerformanceDeltaMarkEnum || {});
|
|
5572
5693
|
var MastercardCustomInputDataEnum = /* @__PURE__ */ ((MastercardCustomInputDataEnum2) => {
|
|
5573
5694
|
MastercardCustomInputDataEnum2["WITHIN_CHECKOUT"] = "WITHIN_CHECKOUT";
|
|
5574
5695
|
MastercardCustomInputDataEnum2["PAYMENT_SETTINGS"] = "PAYMENT_SETTINGS";
|
|
@@ -5626,869 +5747,582 @@ var MastercardSDKPerformanceDeltaMarkEnum = /* @__PURE__ */ ((MastercardSDKPerfo
|
|
|
5626
5747
|
MastercardSDKPerformanceDeltaMarkEnum2["UNBIND_APP_INSTANCE"] = "unbind_app_instance_mc_delta";
|
|
5627
5748
|
return MastercardSDKPerformanceDeltaMarkEnum2;
|
|
5628
5749
|
})(MastercardSDKPerformanceDeltaMarkEnum || {});
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5750
|
+
var ConsumerIdentityType = /* @__PURE__ */ ((ConsumerIdentityType2) => {
|
|
5751
|
+
ConsumerIdentityType2["EMAIL_ADDRESS"] = "EMAIL_ADDRESS";
|
|
5752
|
+
ConsumerIdentityType2["MOBILE_PHONE_NUMBER"] = "MOBILE_PHONE_NUMBER";
|
|
5753
|
+
ConsumerIdentityType2["CUSTOM_IDENTIFIER"] = "CUSTOM_IDENTIFIER";
|
|
5754
|
+
return ConsumerIdentityType2;
|
|
5755
|
+
})(ConsumerIdentityType || {});
|
|
5756
|
+
var ErrorReasonGetSrcProfile = /* @__PURE__ */ ((ErrorReasonGetSrcProfile2) => {
|
|
5757
|
+
ErrorReasonGetSrcProfile2["AUTH_INVALID"] = "AUTH_INVALID";
|
|
5758
|
+
ErrorReasonGetSrcProfile2["ACCT_INACCESSIBLE"] = "ACCT_INACCESSIBLE";
|
|
5759
|
+
ErrorReasonGetSrcProfile2["EMPTY_PROFILES"] = "EMPTY_PROFILES";
|
|
5760
|
+
return ErrorReasonGetSrcProfile2;
|
|
5761
|
+
})(ErrorReasonGetSrcProfile || {});
|
|
5762
|
+
var AmexPerformanceMarkEnum = /* @__PURE__ */ ((AmexPerformanceMarkEnum2) => {
|
|
5763
|
+
AmexPerformanceMarkEnum2["INIT_START"] = "amex_init_start";
|
|
5764
|
+
AmexPerformanceMarkEnum2["INIT_END"] = "amex_init_end";
|
|
5765
|
+
AmexPerformanceMarkEnum2["IS_RECOGNISED_START"] = "amex_recognised_start";
|
|
5766
|
+
AmexPerformanceMarkEnum2["IS_RECOGNISED_END"] = "amex_recognised_end";
|
|
5767
|
+
AmexPerformanceMarkEnum2["GET_PROFILE_START"] = "amex_get_profile_start";
|
|
5768
|
+
AmexPerformanceMarkEnum2["GET_PROFILE_END"] = "amex_get_profile_end";
|
|
5769
|
+
AmexPerformanceMarkEnum2["CHECKOUT_START"] = "amex_checkout_start";
|
|
5770
|
+
AmexPerformanceMarkEnum2["CHECKOUT_END"] = "amex_checkout_end";
|
|
5771
|
+
AmexPerformanceMarkEnum2["IDENTITY_LOOKUP_START"] = "amex_identity_lookup_start";
|
|
5772
|
+
AmexPerformanceMarkEnum2["IDENTITY_LOOKUP_END"] = "amex_identity_lookup_end";
|
|
5773
|
+
AmexPerformanceMarkEnum2["INITIATE_IDENTITY_VALIDATION_START"] = "amex_initiate_identity_validation_start";
|
|
5774
|
+
AmexPerformanceMarkEnum2["INITIATE_IDENTITY_VALIDATION_END"] = "amex_initiate_identity_validation_end";
|
|
5775
|
+
AmexPerformanceMarkEnum2["COMPLETE_IDENTITY_VALIDATION_START"] = "amex_complete_identity_validation_start";
|
|
5776
|
+
AmexPerformanceMarkEnum2["COMPLETE_IDENTITY_VALIDATION_END"] = "amex_complete_identity_validation_end";
|
|
5777
|
+
AmexPerformanceMarkEnum2["UNBIND_API_INSTANCE_START"] = "amex_unbind_api_instance_start";
|
|
5778
|
+
AmexPerformanceMarkEnum2["UNBIND_API_INSTANCE_END"] = "amex_unbind_api_instance_end";
|
|
5779
|
+
return AmexPerformanceMarkEnum2;
|
|
5780
|
+
})(AmexPerformanceMarkEnum || {});
|
|
5781
|
+
var AmexSDKPerformanceDurationMarkEnum = /* @__PURE__ */ ((AmexSDKPerformanceDurationMarkEnum2) => {
|
|
5782
|
+
AmexSDKPerformanceDurationMarkEnum2["INIT"] = "init_amex_duration";
|
|
5783
|
+
AmexSDKPerformanceDurationMarkEnum2["IS_RECOGNIZED"] = "is_recognized_amex_duration";
|
|
5784
|
+
AmexSDKPerformanceDurationMarkEnum2["GET_SRC_PROFILE"] = "get_src_profile_amex_duration";
|
|
5785
|
+
AmexSDKPerformanceDurationMarkEnum2["IDENTITY_LOOKUP"] = "identity_lookup_amex_duration";
|
|
5786
|
+
AmexSDKPerformanceDurationMarkEnum2["INITIATE_IDENTITY_VALIDATION"] = "initiate_identity_validation_amex_duration";
|
|
5787
|
+
AmexSDKPerformanceDurationMarkEnum2["COMPLETE_IDENTITY_VALIDATION"] = "complete_identity_validation_amex_duration";
|
|
5788
|
+
AmexSDKPerformanceDurationMarkEnum2["CHECKOUT"] = "checkout_amex_duration";
|
|
5789
|
+
AmexSDKPerformanceDurationMarkEnum2["UNBIND_APP_INSTANCE"] = "unbind_app_instance_amex_duration";
|
|
5790
|
+
return AmexSDKPerformanceDurationMarkEnum2;
|
|
5791
|
+
})(AmexSDKPerformanceDurationMarkEnum || {});
|
|
5792
|
+
var AmexSDKPerformanceDeltaMarkEnum = /* @__PURE__ */ ((AmexSDKPerformanceDeltaMarkEnum2) => {
|
|
5793
|
+
AmexSDKPerformanceDeltaMarkEnum2["INIT"] = "init_amex_delta";
|
|
5794
|
+
AmexSDKPerformanceDeltaMarkEnum2["IS_RECOGNIZED"] = "is_recognized_amex_delta";
|
|
5795
|
+
AmexSDKPerformanceDeltaMarkEnum2["GET_SRC_PROFILE"] = "get_src_profile_amex_delta";
|
|
5796
|
+
AmexSDKPerformanceDeltaMarkEnum2["IDENTITY_LOOKUP"] = "identity_lookup_amex_delta";
|
|
5797
|
+
AmexSDKPerformanceDeltaMarkEnum2["INITIATE_IDENTITY_VALIDATION"] = "initiate_identity_validation_amex_delta";
|
|
5798
|
+
AmexSDKPerformanceDeltaMarkEnum2["COMPLETE_IDENTITY_VALIDATION"] = "complete_identity_validation_amex_delta";
|
|
5799
|
+
AmexSDKPerformanceDeltaMarkEnum2["CHECKOUT"] = "checkout_amex_delta";
|
|
5800
|
+
AmexSDKPerformanceDeltaMarkEnum2["UNBIND_APP_INSTANCE"] = "unbind_app_instance_amex_delta";
|
|
5801
|
+
return AmexSDKPerformanceDeltaMarkEnum2;
|
|
5802
|
+
})(AmexSDKPerformanceDeltaMarkEnum || {});
|
|
5803
|
+
var ErrorReasonUnbindAppInstance = /* @__PURE__ */ ((ErrorReasonUnbindAppInstance2) => {
|
|
5804
|
+
ErrorReasonUnbindAppInstance2["NO_COOKIE_EXISTS"] = "NO_COOKIE_EXISTS";
|
|
5805
|
+
return ErrorReasonUnbindAppInstance2;
|
|
5806
|
+
})(ErrorReasonUnbindAppInstance || {});
|
|
5807
|
+
function performanceMeasure(cardBrand, sdkPerformanceMethod) {
|
|
5808
|
+
return function(target, propertyKey, descriptor) {
|
|
5809
|
+
const originalMethod = descriptor.value;
|
|
5810
|
+
const performanceMeasureMarks = resolvePerformanceMeasureMarks(
|
|
5811
|
+
cardBrand,
|
|
5812
|
+
sdkPerformanceMethod
|
|
5813
|
+
);
|
|
5814
|
+
descriptor.value = async function(...args) {
|
|
5815
|
+
performance.mark(performanceMeasureMarks.start);
|
|
5816
|
+
const result = await originalMethod.apply(this, args);
|
|
5817
|
+
updatePerformanceStore(cardBrand, sdkPerformanceMethod, result);
|
|
5818
|
+
performance.mark(performanceMeasureMarks.end);
|
|
5677
5819
|
performance.measure(
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5820
|
+
performanceMeasureMarks.performanceDurationMark,
|
|
5821
|
+
performanceMeasureMarks.start,
|
|
5822
|
+
performanceMeasureMarks.end
|
|
5681
5823
|
);
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
}
|
|
5824
|
+
if (performanceMeasureMarks.performanceDeltaMark) {
|
|
5825
|
+
performance.measure(
|
|
5826
|
+
performanceMeasureMarks.performanceDeltaMark,
|
|
5827
|
+
performanceMeasureMarks.initStart,
|
|
5828
|
+
performanceMeasureMarks.start
|
|
5829
|
+
);
|
|
5830
|
+
performanceStore.addPerformanceEntry(
|
|
5831
|
+
cardBrand,
|
|
5832
|
+
sdkPerformanceMethod,
|
|
5833
|
+
performanceMeasureMarks.performanceDurationMark,
|
|
5834
|
+
performanceMeasureMarks.performanceDeltaMark
|
|
5835
|
+
);
|
|
5836
|
+
} else {
|
|
5837
|
+
performanceStore.addPerformanceEntry(
|
|
5838
|
+
cardBrand,
|
|
5839
|
+
sdkPerformanceMethod,
|
|
5840
|
+
performanceMeasureMarks.performanceDurationMark
|
|
5841
|
+
);
|
|
5842
|
+
}
|
|
5701
5843
|
return result;
|
|
5702
|
-
}
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5844
|
+
};
|
|
5845
|
+
return descriptor;
|
|
5846
|
+
};
|
|
5847
|
+
}
|
|
5848
|
+
function updatePerformanceStore(cardBrand, sdkPerformanceMethod, result) {
|
|
5849
|
+
if (sdkPerformanceMethod === SDKPerformanceMethod.GET_SRC_PROFILE) {
|
|
5850
|
+
switch (cardBrand) {
|
|
5851
|
+
case CreditCardBrand.VISA:
|
|
5852
|
+
performanceStore.update((value) => {
|
|
5853
|
+
return { ...value, correlationId: { ...value.correlationId, visa: result.srcCorrelationId } };
|
|
5854
|
+
});
|
|
5855
|
+
break;
|
|
5856
|
+
case CreditCardBrand.MASTERCARD:
|
|
5857
|
+
performanceStore.update((value) => {
|
|
5858
|
+
return { ...value, correlationId: { ...value.correlationId, mc: result.srcCorrelationId } };
|
|
5859
|
+
});
|
|
5860
|
+
break;
|
|
5861
|
+
case CreditCardBrand.AMEX:
|
|
5862
|
+
performanceStore.update((value) => {
|
|
5863
|
+
return { ...value, correlationId: { ...value.correlationId, amex: result.srcCorrelationId } };
|
|
5864
|
+
});
|
|
5722
5865
|
}
|
|
5723
5866
|
}
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
throw e;
|
|
5734
|
-
} finally {
|
|
5735
|
-
performance.mark(MastercardPerformanceMarkEnum.IDENTITY_LOOKUP_END);
|
|
5736
|
-
performance.measure(
|
|
5737
|
-
MastercardSDKPerformanceDurationMarkEnum.IDENTITY_LOOKUP,
|
|
5738
|
-
MastercardPerformanceMarkEnum.IDENTITY_LOOKUP_START,
|
|
5739
|
-
MastercardPerformanceMarkEnum.IDENTITY_LOOKUP_END
|
|
5740
|
-
);
|
|
5741
|
-
performance.measure(
|
|
5742
|
-
MastercardSDKPerformanceDeltaMarkEnum.IDENTITY_LOOKUP,
|
|
5743
|
-
MastercardPerformanceMarkEnum.INIT_START,
|
|
5744
|
-
MastercardPerformanceMarkEnum.IDENTITY_LOOKUP_START
|
|
5745
|
-
);
|
|
5746
|
-
performanceStore.addPerformanceEntry(
|
|
5747
|
-
CreditCardBrand.MASTERCARD,
|
|
5748
|
-
SDKPerformanceMethod.IDENTITY_LOOKUP,
|
|
5749
|
-
MastercardSDKPerformanceDurationMarkEnum.IDENTITY_LOOKUP,
|
|
5750
|
-
MastercardSDKPerformanceDeltaMarkEnum.IDENTITY_LOOKUP
|
|
5751
|
-
);
|
|
5752
|
-
}
|
|
5867
|
+
}
|
|
5868
|
+
function resolvePerformanceMeasureMarks(cardBrand, sdkPerformanceMethod) {
|
|
5869
|
+
switch (cardBrand) {
|
|
5870
|
+
case CreditCardBrand.VISA:
|
|
5871
|
+
return resolveVisaPerformanceMeasureMarks(sdkPerformanceMethod);
|
|
5872
|
+
case CreditCardBrand.MASTERCARD:
|
|
5873
|
+
return resolveMasterCardPerformanceMeasureMarks(sdkPerformanceMethod);
|
|
5874
|
+
case CreditCardBrand.AMEX:
|
|
5875
|
+
return resolveAmexPerformanceMeasureMarks(sdkPerformanceMethod);
|
|
5753
5876
|
}
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5877
|
+
}
|
|
5878
|
+
function resolveVisaPerformanceMeasureMarks(sdkPerformanceMethod) {
|
|
5879
|
+
switch (sdkPerformanceMethod) {
|
|
5880
|
+
case SDKPerformanceMethod.INIT:
|
|
5881
|
+
return {
|
|
5882
|
+
start: VisaPerformanceMarkEnum.INIT_START,
|
|
5883
|
+
end: VisaPerformanceMarkEnum.INIT_END,
|
|
5884
|
+
initStart: VisaPerformanceMarkEnum.INIT_START,
|
|
5885
|
+
performanceDurationMark: VisaSDKPerformanceDurationMarkEnum.INIT
|
|
5886
|
+
};
|
|
5887
|
+
case SDKPerformanceMethod.IS_RECOGNIZED:
|
|
5888
|
+
return {
|
|
5889
|
+
start: VisaPerformanceMarkEnum.IS_RECOGNISED_START,
|
|
5890
|
+
end: VisaPerformanceMarkEnum.IS_RECOGNISED_END,
|
|
5891
|
+
initStart: VisaPerformanceMarkEnum.INIT_START,
|
|
5892
|
+
performanceDurationMark: VisaSDKPerformanceDurationMarkEnum.IS_RECOGNIZED,
|
|
5893
|
+
performanceDeltaMark: VisaSDKPerformanceDeltaMarkEnum.IS_RECOGNIZED
|
|
5894
|
+
};
|
|
5895
|
+
case SDKPerformanceMethod.GET_SRC_PROFILE:
|
|
5896
|
+
return {
|
|
5897
|
+
start: VisaPerformanceMarkEnum.GET_PROFILE_START,
|
|
5898
|
+
end: VisaPerformanceMarkEnum.GET_PROFILE_END,
|
|
5899
|
+
initStart: VisaPerformanceMarkEnum.INIT_START,
|
|
5900
|
+
performanceDurationMark: VisaSDKPerformanceDurationMarkEnum.GET_SRC_PROFILE,
|
|
5901
|
+
performanceDeltaMark: VisaSDKPerformanceDeltaMarkEnum.GET_SRC_PROFILE
|
|
5902
|
+
};
|
|
5903
|
+
case SDKPerformanceMethod.IDENTITY_LOOKUP:
|
|
5904
|
+
return {
|
|
5905
|
+
start: VisaPerformanceMarkEnum.IDENTITY_LOOKUP_START,
|
|
5906
|
+
end: VisaPerformanceMarkEnum.IDENTITY_LOOKUP_END,
|
|
5907
|
+
initStart: VisaPerformanceMarkEnum.INIT_START,
|
|
5908
|
+
performanceDurationMark: VisaSDKPerformanceDurationMarkEnum.IDENTITY_LOOKUP,
|
|
5909
|
+
performanceDeltaMark: VisaSDKPerformanceDeltaMarkEnum.IDENTITY_LOOKUP
|
|
5910
|
+
};
|
|
5911
|
+
case SDKPerformanceMethod.INITIATE_IDENTITY_VALIDATION:
|
|
5912
|
+
return {
|
|
5913
|
+
start: VisaPerformanceMarkEnum.INITIATE_IDENTITY_VALIDATION_START,
|
|
5914
|
+
end: VisaPerformanceMarkEnum.INITIATE_IDENTITY_VALIDATION_END,
|
|
5915
|
+
initStart: VisaPerformanceMarkEnum.INIT_START,
|
|
5916
|
+
performanceDurationMark: VisaSDKPerformanceDurationMarkEnum.INITIATE_IDENTITY_VALIDATION,
|
|
5917
|
+
performanceDeltaMark: VisaSDKPerformanceDeltaMarkEnum.INITIATE_IDENTITY_VALIDATION
|
|
5918
|
+
};
|
|
5919
|
+
case SDKPerformanceMethod.COMPLETE_IDENTITY_VALIDATION:
|
|
5920
|
+
return {
|
|
5921
|
+
start: VisaPerformanceMarkEnum.COMPLETE_IDENTITY_VALIDATION_START,
|
|
5922
|
+
end: VisaPerformanceMarkEnum.COMPLETE_IDENTITY_VALIDATION_END,
|
|
5923
|
+
initStart: VisaPerformanceMarkEnum.INIT_START,
|
|
5924
|
+
performanceDurationMark: VisaSDKPerformanceDurationMarkEnum.COMPLETE_IDENTITY_VALIDATION,
|
|
5925
|
+
performanceDeltaMark: VisaSDKPerformanceDeltaMarkEnum.COMPLETE_IDENTITY_VALIDATION
|
|
5926
|
+
};
|
|
5927
|
+
case SDKPerformanceMethod.CHECKOUT:
|
|
5928
|
+
return {
|
|
5929
|
+
start: VisaPerformanceMarkEnum.CHECKOUT_START,
|
|
5930
|
+
end: VisaPerformanceMarkEnum.CHECKOUT_END,
|
|
5931
|
+
initStart: VisaPerformanceMarkEnum.INIT_START,
|
|
5932
|
+
performanceDurationMark: VisaSDKPerformanceDurationMarkEnum.CHECKOUT,
|
|
5933
|
+
performanceDeltaMark: VisaSDKPerformanceDeltaMarkEnum.CHECKOUT
|
|
5934
|
+
};
|
|
5935
|
+
case SDKPerformanceMethod.UNBIND_APP_INSTANCE:
|
|
5936
|
+
return {
|
|
5937
|
+
start: VisaPerformanceMarkEnum.UNBIND_API_INSTANCE_START,
|
|
5938
|
+
end: VisaPerformanceMarkEnum.UNBIND_API_INSTANCE_END,
|
|
5939
|
+
initStart: VisaPerformanceMarkEnum.INIT_START,
|
|
5940
|
+
performanceDurationMark: VisaSDKPerformanceDurationMarkEnum.UNBIND_APP_INSTANCE,
|
|
5941
|
+
performanceDeltaMark: VisaSDKPerformanceDeltaMarkEnum.UNBIND_APP_INSTANCE
|
|
5942
|
+
};
|
|
5783
5943
|
}
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
MastercardPerformanceMarkEnum.
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
MastercardPerformanceMarkEnum.
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5944
|
+
}
|
|
5945
|
+
function resolveMasterCardPerformanceMeasureMarks(sdkPerformanceMethod) {
|
|
5946
|
+
switch (sdkPerformanceMethod) {
|
|
5947
|
+
case SDKPerformanceMethod.INIT:
|
|
5948
|
+
return {
|
|
5949
|
+
start: MastercardPerformanceMarkEnum.INIT_START,
|
|
5950
|
+
end: MastercardPerformanceMarkEnum.INIT_END,
|
|
5951
|
+
initStart: MastercardPerformanceMarkEnum.INIT_START,
|
|
5952
|
+
performanceDurationMark: MastercardSDKPerformanceDurationMarkEnum.INIT
|
|
5953
|
+
};
|
|
5954
|
+
case SDKPerformanceMethod.IS_RECOGNIZED:
|
|
5955
|
+
return {
|
|
5956
|
+
start: MastercardPerformanceMarkEnum.IS_RECOGNISED_START,
|
|
5957
|
+
end: MastercardPerformanceMarkEnum.IS_RECOGNISED_END,
|
|
5958
|
+
initStart: MastercardPerformanceMarkEnum.INIT_START,
|
|
5959
|
+
performanceDurationMark: MastercardSDKPerformanceDurationMarkEnum.IS_RECOGNIZED,
|
|
5960
|
+
performanceDeltaMark: MastercardSDKPerformanceDeltaMarkEnum.IS_RECOGNIZED
|
|
5961
|
+
};
|
|
5962
|
+
case SDKPerformanceMethod.GET_SRC_PROFILE:
|
|
5963
|
+
return {
|
|
5964
|
+
start: MastercardPerformanceMarkEnum.GET_PROFILE_START,
|
|
5965
|
+
end: MastercardPerformanceMarkEnum.GET_PROFILE_END,
|
|
5966
|
+
initStart: MastercardPerformanceMarkEnum.INIT_START,
|
|
5967
|
+
performanceDurationMark: MastercardSDKPerformanceDurationMarkEnum.GET_SRC_PROFILE,
|
|
5968
|
+
performanceDeltaMark: MastercardSDKPerformanceDeltaMarkEnum.GET_SRC_PROFILE
|
|
5969
|
+
};
|
|
5970
|
+
case SDKPerformanceMethod.IDENTITY_LOOKUP:
|
|
5971
|
+
return {
|
|
5972
|
+
start: MastercardPerformanceMarkEnum.IDENTITY_LOOKUP_START,
|
|
5973
|
+
end: MastercardPerformanceMarkEnum.IDENTITY_LOOKUP_END,
|
|
5974
|
+
initStart: MastercardPerformanceMarkEnum.INIT_START,
|
|
5975
|
+
performanceDurationMark: MastercardSDKPerformanceDurationMarkEnum.IDENTITY_LOOKUP,
|
|
5976
|
+
performanceDeltaMark: MastercardSDKPerformanceDeltaMarkEnum.IDENTITY_LOOKUP
|
|
5977
|
+
};
|
|
5978
|
+
case SDKPerformanceMethod.INITIATE_IDENTITY_VALIDATION:
|
|
5979
|
+
return {
|
|
5980
|
+
start: MastercardPerformanceMarkEnum.INITIATE_IDENTITY_VALIDATION_START,
|
|
5981
|
+
end: MastercardPerformanceMarkEnum.INITIATE_IDENTITY_VALIDATION_END,
|
|
5982
|
+
initStart: MastercardPerformanceMarkEnum.INIT_START,
|
|
5983
|
+
performanceDurationMark: MastercardSDKPerformanceDurationMarkEnum.INITIATE_IDENTITY_VALIDATION,
|
|
5984
|
+
performanceDeltaMark: MastercardSDKPerformanceDeltaMarkEnum.INITIATE_IDENTITY_VALIDATION
|
|
5985
|
+
};
|
|
5986
|
+
case SDKPerformanceMethod.COMPLETE_IDENTITY_VALIDATION:
|
|
5987
|
+
return {
|
|
5988
|
+
start: MastercardPerformanceMarkEnum.COMPLETE_IDENTITY_VALIDATION_START,
|
|
5989
|
+
end: MastercardPerformanceMarkEnum.COMPLETE_IDENTITY_VALIDATION_END,
|
|
5990
|
+
initStart: MastercardPerformanceMarkEnum.INIT_START,
|
|
5991
|
+
performanceDurationMark: MastercardSDKPerformanceDurationMarkEnum.COMPLETE_IDENTITY_VALIDATION,
|
|
5992
|
+
performanceDeltaMark: MastercardSDKPerformanceDeltaMarkEnum.COMPLETE_IDENTITY_VALIDATION
|
|
5993
|
+
};
|
|
5994
|
+
case SDKPerformanceMethod.CHECKOUT:
|
|
5995
|
+
return {
|
|
5996
|
+
start: MastercardPerformanceMarkEnum.CHECKOUT_START,
|
|
5997
|
+
end: MastercardPerformanceMarkEnum.CHECKOUT_END,
|
|
5998
|
+
initStart: MastercardPerformanceMarkEnum.INIT_START,
|
|
5999
|
+
performanceDurationMark: MastercardSDKPerformanceDurationMarkEnum.CHECKOUT,
|
|
6000
|
+
performanceDeltaMark: MastercardSDKPerformanceDeltaMarkEnum.CHECKOUT
|
|
6001
|
+
};
|
|
6002
|
+
case SDKPerformanceMethod.UNBIND_APP_INSTANCE:
|
|
6003
|
+
return {
|
|
6004
|
+
start: MastercardPerformanceMarkEnum.UNBIND_API_INSTANCE_START,
|
|
6005
|
+
end: MastercardPerformanceMarkEnum.UNBIND_API_INSTANCE_END,
|
|
6006
|
+
initStart: MastercardPerformanceMarkEnum.INIT_START,
|
|
6007
|
+
performanceDurationMark: MastercardSDKPerformanceDurationMarkEnum.UNBIND_APP_INSTANCE,
|
|
6008
|
+
performanceDeltaMark: MastercardSDKPerformanceDeltaMarkEnum.UNBIND_APP_INSTANCE
|
|
6009
|
+
};
|
|
5813
6010
|
}
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
|
|
5827
|
-
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
|
|
6011
|
+
}
|
|
6012
|
+
function resolveAmexPerformanceMeasureMarks(sdkPerformanceMethod) {
|
|
6013
|
+
switch (sdkPerformanceMethod) {
|
|
6014
|
+
case SDKPerformanceMethod.INIT:
|
|
6015
|
+
return {
|
|
6016
|
+
start: AmexPerformanceMarkEnum.INIT_START,
|
|
6017
|
+
end: AmexPerformanceMarkEnum.INIT_END,
|
|
6018
|
+
initStart: AmexPerformanceMarkEnum.INIT_START,
|
|
6019
|
+
performanceDurationMark: AmexSDKPerformanceDurationMarkEnum.INIT
|
|
6020
|
+
};
|
|
6021
|
+
case SDKPerformanceMethod.IS_RECOGNIZED:
|
|
6022
|
+
return {
|
|
6023
|
+
start: AmexPerformanceMarkEnum.IS_RECOGNISED_START,
|
|
6024
|
+
end: AmexPerformanceMarkEnum.IS_RECOGNISED_END,
|
|
6025
|
+
initStart: AmexPerformanceMarkEnum.INIT_START,
|
|
6026
|
+
performanceDurationMark: AmexSDKPerformanceDurationMarkEnum.IS_RECOGNIZED,
|
|
6027
|
+
performanceDeltaMark: AmexSDKPerformanceDeltaMarkEnum.IS_RECOGNIZED
|
|
6028
|
+
};
|
|
6029
|
+
case SDKPerformanceMethod.GET_SRC_PROFILE:
|
|
6030
|
+
return {
|
|
6031
|
+
start: AmexPerformanceMarkEnum.GET_PROFILE_START,
|
|
6032
|
+
end: AmexPerformanceMarkEnum.GET_PROFILE_END,
|
|
6033
|
+
initStart: AmexPerformanceMarkEnum.INIT_START,
|
|
6034
|
+
performanceDurationMark: AmexSDKPerformanceDurationMarkEnum.GET_SRC_PROFILE,
|
|
6035
|
+
performanceDeltaMark: AmexSDKPerformanceDeltaMarkEnum.GET_SRC_PROFILE
|
|
6036
|
+
};
|
|
6037
|
+
case SDKPerformanceMethod.IDENTITY_LOOKUP:
|
|
6038
|
+
return {
|
|
6039
|
+
start: AmexPerformanceMarkEnum.IDENTITY_LOOKUP_START,
|
|
6040
|
+
end: AmexPerformanceMarkEnum.IDENTITY_LOOKUP_END,
|
|
6041
|
+
initStart: AmexPerformanceMarkEnum.INIT_START,
|
|
6042
|
+
performanceDurationMark: AmexSDKPerformanceDurationMarkEnum.IDENTITY_LOOKUP,
|
|
6043
|
+
performanceDeltaMark: AmexSDKPerformanceDeltaMarkEnum.IDENTITY_LOOKUP
|
|
6044
|
+
};
|
|
6045
|
+
case SDKPerformanceMethod.INITIATE_IDENTITY_VALIDATION:
|
|
6046
|
+
return {
|
|
6047
|
+
start: AmexPerformanceMarkEnum.INITIATE_IDENTITY_VALIDATION_START,
|
|
6048
|
+
end: AmexPerformanceMarkEnum.INITIATE_IDENTITY_VALIDATION_END,
|
|
6049
|
+
initStart: AmexPerformanceMarkEnum.INIT_START,
|
|
6050
|
+
performanceDurationMark: AmexSDKPerformanceDurationMarkEnum.INITIATE_IDENTITY_VALIDATION,
|
|
6051
|
+
performanceDeltaMark: AmexSDKPerformanceDeltaMarkEnum.INITIATE_IDENTITY_VALIDATION
|
|
6052
|
+
};
|
|
6053
|
+
case SDKPerformanceMethod.COMPLETE_IDENTITY_VALIDATION:
|
|
6054
|
+
return {
|
|
6055
|
+
start: AmexPerformanceMarkEnum.COMPLETE_IDENTITY_VALIDATION_START,
|
|
6056
|
+
end: AmexPerformanceMarkEnum.COMPLETE_IDENTITY_VALIDATION_END,
|
|
6057
|
+
initStart: AmexPerformanceMarkEnum.INIT_START,
|
|
6058
|
+
performanceDurationMark: AmexSDKPerformanceDurationMarkEnum.COMPLETE_IDENTITY_VALIDATION,
|
|
6059
|
+
performanceDeltaMark: AmexSDKPerformanceDeltaMarkEnum.COMPLETE_IDENTITY_VALIDATION
|
|
6060
|
+
};
|
|
6061
|
+
case SDKPerformanceMethod.CHECKOUT:
|
|
6062
|
+
return {
|
|
6063
|
+
start: AmexPerformanceMarkEnum.CHECKOUT_START,
|
|
6064
|
+
end: AmexPerformanceMarkEnum.CHECKOUT_END,
|
|
6065
|
+
initStart: AmexPerformanceMarkEnum.INIT_START,
|
|
6066
|
+
performanceDurationMark: AmexSDKPerformanceDurationMarkEnum.CHECKOUT,
|
|
6067
|
+
performanceDeltaMark: AmexSDKPerformanceDeltaMarkEnum.CHECKOUT
|
|
6068
|
+
};
|
|
6069
|
+
case SDKPerformanceMethod.UNBIND_APP_INSTANCE:
|
|
6070
|
+
return {
|
|
6071
|
+
start: AmexPerformanceMarkEnum.UNBIND_API_INSTANCE_START,
|
|
6072
|
+
end: AmexPerformanceMarkEnum.UNBIND_API_INSTANCE_END,
|
|
6073
|
+
initStart: AmexPerformanceMarkEnum.INIT_START,
|
|
6074
|
+
performanceDurationMark: AmexSDKPerformanceDurationMarkEnum.UNBIND_APP_INSTANCE,
|
|
6075
|
+
performanceDeltaMark: AmexSDKPerformanceDeltaMarkEnum.UNBIND_APP_INSTANCE
|
|
6076
|
+
};
|
|
5848
6077
|
}
|
|
6078
|
+
}
|
|
6079
|
+
class VisaMapper {
|
|
5849
6080
|
/**
|
|
5850
|
-
*
|
|
5851
|
-
* Following are the two scenarios that unbind consumer’s profile from their device:
|
|
5852
|
-
* If the consumer clears the Remember me for faster checkouts? on the DCF screen, the action unbinds the consumer from the device.
|
|
5853
|
-
* DCF via the SRC SDK, will communicate to SRCI with unbindAppInstance set to true, and the idToken of the current profile.
|
|
5854
|
-
* Based on the response from DCF, the SRCI calls unbindAppInstance(<idToken>) for each SRC SDK.
|
|
5855
|
-
* If the consumer clicks Not You?, the action will exit the DCF screen and unbind the consumer from the device.
|
|
5856
|
-
* DCF via the SRC SDK, will communicate to SRCI a dcfActionCode of SWITCH_CONSUMER, along with unbindAppInstance set to true,
|
|
5857
|
-
* and the idToken of the current profile. Based on the response from DCF, the SRCI calls unbindAppInstance(<idToken>) for each SRC SDK.
|
|
5858
|
-
* https://developer.mastercard.com/src/documentation/integration/client_integration/web/sdk_ref/#unbind-appinstance
|
|
6081
|
+
* Maps Visa specific checkout response to Orchestrator checkout response.
|
|
5859
6082
|
*/
|
|
5860
|
-
static
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
performance.measure(
|
|
5869
|
-
MastercardSDKPerformanceDurationMarkEnum.UNBIND_APP_INSTANCE,
|
|
5870
|
-
MastercardPerformanceMarkEnum.UNBIND_API_INSTANCE_START,
|
|
5871
|
-
MastercardPerformanceMarkEnum.UNBIND_API_INSTANCE_END
|
|
5872
|
-
);
|
|
5873
|
-
performance.measure(
|
|
5874
|
-
MastercardSDKPerformanceDeltaMarkEnum.UNBIND_APP_INSTANCE,
|
|
5875
|
-
MastercardPerformanceMarkEnum.INIT_START,
|
|
5876
|
-
MastercardPerformanceMarkEnum.UNBIND_API_INSTANCE_START
|
|
5877
|
-
);
|
|
5878
|
-
performanceStore.addPerformanceEntry(
|
|
5879
|
-
CreditCardBrand.MASTERCARD,
|
|
5880
|
-
SDKPerformanceMethod.UNBIND_APP_INSTANCE,
|
|
5881
|
-
MastercardSDKPerformanceDurationMarkEnum.UNBIND_APP_INSTANCE,
|
|
5882
|
-
MastercardSDKPerformanceDeltaMarkEnum.UNBIND_APP_INSTANCE
|
|
5883
|
-
);
|
|
5884
|
-
}
|
|
6083
|
+
static toCheckoutResponse(visaCheckoutResponse) {
|
|
6084
|
+
return {
|
|
6085
|
+
userAction: visaCheckoutResponse.dcfActionCode,
|
|
6086
|
+
checkoutResponseSignature: visaCheckoutResponse == null ? void 0 : visaCheckoutResponse.checkoutResponse,
|
|
6087
|
+
srcCorrelationId: void 0,
|
|
6088
|
+
creditCardBrand: CreditCardBrand.VISA,
|
|
6089
|
+
performance: void 0
|
|
6090
|
+
};
|
|
5885
6091
|
}
|
|
5886
6092
|
}
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
})(VisaComplianceTypeEnum || {});
|
|
5900
|
-
var VisaAuthenticationReasonEnum = /* @__PURE__ */ ((VisaAuthenticationReasonEnum2) => {
|
|
5901
|
-
VisaAuthenticationReasonEnum2["TRANSACTION_AUTHENTICATION"] = "TRANSACTION_AUTHENTICATION";
|
|
5902
|
-
VisaAuthenticationReasonEnum2["NOT_PREFERRED"] = "NOT_PREFERRED";
|
|
5903
|
-
return VisaAuthenticationReasonEnum2;
|
|
5904
|
-
})(VisaAuthenticationReasonEnum || {});
|
|
5905
|
-
var VisaAuthenticationMethodTypeEnum = /* @__PURE__ */ ((VisaAuthenticationMethodTypeEnum2) => {
|
|
5906
|
-
VisaAuthenticationMethodTypeEnum2["SMS_OTP"] = "SMS_OTP";
|
|
5907
|
-
VisaAuthenticationMethodTypeEnum2["EMAIL_OTP"] = "EMAIL_OTP";
|
|
5908
|
-
VisaAuthenticationMethodTypeEnum2["APP_AUTHENTICATON"] = "APP_AUTHENTICATON";
|
|
5909
|
-
VisaAuthenticationMethodTypeEnum2["MANAGED_AUTHENTICATION"] = "MANAGED_AUTHENTICATION";
|
|
5910
|
-
return VisaAuthenticationMethodTypeEnum2;
|
|
5911
|
-
})(VisaAuthenticationMethodTypeEnum || {});
|
|
5912
|
-
var VisaAuthenticationSubjectEnum = /* @__PURE__ */ ((VisaAuthenticationSubjectEnum2) => {
|
|
5913
|
-
VisaAuthenticationSubjectEnum2["CARDHOLDER"] = "CARDHOLDER";
|
|
5914
|
-
VisaAuthenticationSubjectEnum2["CONSUMER"] = "CONSUMER";
|
|
5915
|
-
VisaAuthenticationSubjectEnum2["CARD"] = "CARD";
|
|
5916
|
-
return VisaAuthenticationSubjectEnum2;
|
|
5917
|
-
})(VisaAuthenticationSubjectEnum || {});
|
|
5918
|
-
var VisaErrorReasonGetSrcProfileEnum = /* @__PURE__ */ ((VisaErrorReasonGetSrcProfileEnum2) => {
|
|
5919
|
-
VisaErrorReasonGetSrcProfileEnum2["AUTH_INVALID"] = "AUTH_INVALID";
|
|
5920
|
-
VisaErrorReasonGetSrcProfileEnum2["ACCT_INACCESSIBLE"] = "ACCT_INACCESSIBLE";
|
|
5921
|
-
VisaErrorReasonGetSrcProfileEnum2["NOT_FOUND"] = "NOT_FOUND";
|
|
5922
|
-
return VisaErrorReasonGetSrcProfileEnum2;
|
|
5923
|
-
})(VisaErrorReasonGetSrcProfileEnum || {});
|
|
5924
|
-
var VisaPerformanceMarkEnum = /* @__PURE__ */ ((VisaPerformanceMarkEnum2) => {
|
|
5925
|
-
VisaPerformanceMarkEnum2["INIT_START"] = "visa_init_start";
|
|
5926
|
-
VisaPerformanceMarkEnum2["INIT_END"] = "visa_init_end";
|
|
5927
|
-
VisaPerformanceMarkEnum2["IS_RECOGNISED_START"] = "visa_recognised_start";
|
|
5928
|
-
VisaPerformanceMarkEnum2["IS_RECOGNISED_END"] = "visa_recognised_end";
|
|
5929
|
-
VisaPerformanceMarkEnum2["GET_PROFILE_START"] = "visa_get_profile_start";
|
|
5930
|
-
VisaPerformanceMarkEnum2["GET_PROFILE_END"] = "visa_get_profile_end";
|
|
5931
|
-
VisaPerformanceMarkEnum2["CHECKOUT_START"] = "visa_checkout_start";
|
|
5932
|
-
VisaPerformanceMarkEnum2["CHECKOUT_END"] = "visa_checkout_end";
|
|
5933
|
-
VisaPerformanceMarkEnum2["IDENTITY_LOOKUP_START"] = "visa_identity_lookup_start";
|
|
5934
|
-
VisaPerformanceMarkEnum2["IDENTITY_LOOKUP_END"] = "visa_identity_lookup_end";
|
|
5935
|
-
VisaPerformanceMarkEnum2["INITIATE_IDENTITY_VALIDATION_START"] = "visa_initiate_identity_validation_start";
|
|
5936
|
-
VisaPerformanceMarkEnum2["INITIATE_IDENTITY_VALIDATION_END"] = "visa_initiate_identity_validation_end";
|
|
5937
|
-
VisaPerformanceMarkEnum2["COMPLETE_IDENTITY_VALIDATION_START"] = "visa_complete_identity_validation_start";
|
|
5938
|
-
VisaPerformanceMarkEnum2["COMPLETE_IDENTITY_VALIDATION_END"] = "visa_complete_identity_validation_end";
|
|
5939
|
-
VisaPerformanceMarkEnum2["UNBIND_API_INSTANCE_START"] = "visa_unbind_api_instance_start";
|
|
5940
|
-
VisaPerformanceMarkEnum2["UNBIND_API_INSTANCE_END"] = "visa_unbind_api_instance_end";
|
|
5941
|
-
return VisaPerformanceMarkEnum2;
|
|
5942
|
-
})(VisaPerformanceMarkEnum || {});
|
|
5943
|
-
var VisaSDKPerformanceDurationMarkEnum = /* @__PURE__ */ ((VisaSDKPerformanceDurationMarkEnum2) => {
|
|
5944
|
-
VisaSDKPerformanceDurationMarkEnum2["INIT"] = "init_visa_duration";
|
|
5945
|
-
VisaSDKPerformanceDurationMarkEnum2["IS_RECOGNIZED"] = "is_recognized_visa_duration";
|
|
5946
|
-
VisaSDKPerformanceDurationMarkEnum2["GET_SRC_PROFILE"] = "get_src_profile_visa_duration";
|
|
5947
|
-
VisaSDKPerformanceDurationMarkEnum2["IDENTITY_LOOKUP"] = "identity_lookup_visa_duration";
|
|
5948
|
-
VisaSDKPerformanceDurationMarkEnum2["INITIATE_IDENTITY_VALIDATION"] = "initiate_identity_validation_visa_duration";
|
|
5949
|
-
VisaSDKPerformanceDurationMarkEnum2["COMPLETE_IDENTITY_VALIDATION"] = "complete_identity_validation_visa_duration";
|
|
5950
|
-
VisaSDKPerformanceDurationMarkEnum2["CHECKOUT"] = "checkout_visa_duration";
|
|
5951
|
-
VisaSDKPerformanceDurationMarkEnum2["UNBIND_APP_INSTANCE"] = "unbind_app_instance_visa_duration";
|
|
5952
|
-
return VisaSDKPerformanceDurationMarkEnum2;
|
|
5953
|
-
})(VisaSDKPerformanceDurationMarkEnum || {});
|
|
5954
|
-
var VisaSDKPerformanceDeltaMarkEnum = /* @__PURE__ */ ((VisaSDKPerformanceDeltaMarkEnum2) => {
|
|
5955
|
-
VisaSDKPerformanceDeltaMarkEnum2["INIT"] = "init_visa_delta";
|
|
5956
|
-
VisaSDKPerformanceDeltaMarkEnum2["IS_RECOGNIZED"] = "is_recognized_visa_delta";
|
|
5957
|
-
VisaSDKPerformanceDeltaMarkEnum2["GET_SRC_PROFILE"] = "get_src_profile_visa_delta";
|
|
5958
|
-
VisaSDKPerformanceDeltaMarkEnum2["IDENTITY_LOOKUP"] = "identity_lookup_visa_delta";
|
|
5959
|
-
VisaSDKPerformanceDeltaMarkEnum2["INITIATE_IDENTITY_VALIDATION"] = "initiate_identity_validation_visa_delta";
|
|
5960
|
-
VisaSDKPerformanceDeltaMarkEnum2["COMPLETE_IDENTITY_VALIDATION"] = "complete_identity_validation_visa_delta";
|
|
5961
|
-
VisaSDKPerformanceDeltaMarkEnum2["CHECKOUT"] = "checkout_visa_delta";
|
|
5962
|
-
VisaSDKPerformanceDeltaMarkEnum2["UNBIND_APP_INSTANCE"] = "unbind_app_instance_visa_delta";
|
|
5963
|
-
return VisaSDKPerformanceDeltaMarkEnum2;
|
|
5964
|
-
})(VisaSDKPerformanceDeltaMarkEnum || {});
|
|
5965
|
-
let visaSrci;
|
|
5966
|
-
const _VisaService = class {
|
|
5967
|
-
static async init(params, visaEncryptionKey, visaNModulus) {
|
|
5968
|
-
if (window.vAdapters.VisaSRCI === void 0) {
|
|
5969
|
-
throw Error("Visa SDK is not loaded.");
|
|
5970
|
-
}
|
|
5971
|
-
try {
|
|
5972
|
-
performance.mark(VisaPerformanceMarkEnum.INIT_START);
|
|
5973
|
-
visaSrci = new window.vAdapters.VisaSRCI();
|
|
5974
|
-
_VisaService.visaEncryptionKey = visaEncryptionKey;
|
|
5975
|
-
_VisaService.visaNModulus = visaNModulus;
|
|
5976
|
-
await visaSrci.init(params);
|
|
5977
|
-
} catch (e) {
|
|
5978
|
-
throw e;
|
|
5979
|
-
} finally {
|
|
5980
|
-
performance.mark(VisaPerformanceMarkEnum.INIT_END);
|
|
5981
|
-
performance.measure(
|
|
5982
|
-
VisaSDKPerformanceDurationMarkEnum.INIT,
|
|
5983
|
-
VisaPerformanceMarkEnum.INIT_START,
|
|
5984
|
-
VisaPerformanceMarkEnum.INIT_END
|
|
5985
|
-
);
|
|
5986
|
-
performanceStore.addPerformanceEntry(
|
|
5987
|
-
CreditCardBrand.VISA,
|
|
5988
|
-
SDKPerformanceMethod.INIT,
|
|
5989
|
-
VisaSDKPerformanceDurationMarkEnum.INIT
|
|
5990
|
-
);
|
|
5991
|
-
}
|
|
6093
|
+
/**
|
|
6094
|
+
* Populates the card object with required and optional profileDetails data.
|
|
6095
|
+
*/
|
|
6096
|
+
__publicField(VisaMapper, "toCardObject", (card, profileDetails) => {
|
|
6097
|
+
const visaCard = {
|
|
6098
|
+
primaryAccountNumber: card.primaryAccountNumber,
|
|
6099
|
+
panExpirationMonth: card.panExpirationMonth,
|
|
6100
|
+
panExpirationYear: (/* @__PURE__ */ new Date()).getFullYear().toString().substring(0, 2) + card.panExpirationYear,
|
|
6101
|
+
cardSecurityCode: card.cardSecurityCode
|
|
6102
|
+
};
|
|
6103
|
+
if (!profileDetails) {
|
|
6104
|
+
return visaCard;
|
|
5992
6105
|
}
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
performance.mark(VisaPerformanceMarkEnum.IS_RECOGNISED_START);
|
|
5996
|
-
return await visaSrci.isRecognized();
|
|
5997
|
-
} catch (e) {
|
|
5998
|
-
throw e;
|
|
5999
|
-
} finally {
|
|
6000
|
-
performance.mark(VisaPerformanceMarkEnum.IS_RECOGNISED_END);
|
|
6001
|
-
performance.measure(
|
|
6002
|
-
VisaSDKPerformanceDurationMarkEnum.IS_RECOGNIZED,
|
|
6003
|
-
VisaPerformanceMarkEnum.IS_RECOGNISED_START,
|
|
6004
|
-
VisaPerformanceMarkEnum.IS_RECOGNISED_END
|
|
6005
|
-
);
|
|
6006
|
-
performance.measure(
|
|
6007
|
-
VisaSDKPerformanceDeltaMarkEnum.IS_RECOGNIZED,
|
|
6008
|
-
VisaPerformanceMarkEnum.INIT_START,
|
|
6009
|
-
VisaPerformanceMarkEnum.IS_RECOGNISED_START
|
|
6010
|
-
);
|
|
6011
|
-
performanceStore.addPerformanceEntry(
|
|
6012
|
-
CreditCardBrand.VISA,
|
|
6013
|
-
SDKPerformanceMethod.IS_RECOGNIZED,
|
|
6014
|
-
VisaSDKPerformanceDurationMarkEnum.IS_RECOGNIZED,
|
|
6015
|
-
VisaSDKPerformanceDeltaMarkEnum.IS_RECOGNIZED
|
|
6016
|
-
);
|
|
6017
|
-
}
|
|
6106
|
+
if (profileDetails.firstName) {
|
|
6107
|
+
visaCard.cardholderFirstName = profileDetails.firstName;
|
|
6018
6108
|
}
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
performance.mark(VisaPerformanceMarkEnum.GET_PROFILE_START);
|
|
6022
|
-
const result = await visaSrci.getSrcProfile(params);
|
|
6023
|
-
performanceStore.update((value) => {
|
|
6024
|
-
return { ...value, correlationId: { ...value.correlationId, visa: result.srcCorrelationId } };
|
|
6025
|
-
});
|
|
6026
|
-
return result;
|
|
6027
|
-
} catch (e) {
|
|
6028
|
-
throw e;
|
|
6029
|
-
} finally {
|
|
6030
|
-
performance.mark(VisaPerformanceMarkEnum.GET_PROFILE_END);
|
|
6031
|
-
performance.measure(
|
|
6032
|
-
VisaSDKPerformanceDurationMarkEnum.GET_SRC_PROFILE,
|
|
6033
|
-
VisaPerformanceMarkEnum.GET_PROFILE_START,
|
|
6034
|
-
VisaPerformanceMarkEnum.GET_PROFILE_END
|
|
6035
|
-
);
|
|
6036
|
-
performance.measure(
|
|
6037
|
-
VisaSDKPerformanceDeltaMarkEnum.GET_SRC_PROFILE,
|
|
6038
|
-
VisaPerformanceMarkEnum.INIT_START,
|
|
6039
|
-
VisaPerformanceMarkEnum.GET_PROFILE_START
|
|
6040
|
-
);
|
|
6041
|
-
performanceStore.addPerformanceEntry(
|
|
6042
|
-
CreditCardBrand.VISA,
|
|
6043
|
-
SDKPerformanceMethod.GET_SRC_PROFILE,
|
|
6044
|
-
VisaSDKPerformanceDurationMarkEnum.GET_SRC_PROFILE,
|
|
6045
|
-
VisaSDKPerformanceDeltaMarkEnum.GET_SRC_PROFILE
|
|
6046
|
-
);
|
|
6047
|
-
}
|
|
6109
|
+
if (profileDetails.lastName) {
|
|
6110
|
+
visaCard.cardholderLastName = profileDetails.lastName;
|
|
6048
6111
|
}
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
performance.mark(VisaPerformanceMarkEnum.IDENTITY_LOOKUP_START);
|
|
6052
|
-
return await visaSrci.identityLookup(params);
|
|
6053
|
-
} catch (e) {
|
|
6054
|
-
throw e;
|
|
6055
|
-
} finally {
|
|
6056
|
-
performance.mark(VisaPerformanceMarkEnum.IDENTITY_LOOKUP_END);
|
|
6057
|
-
performance.measure(
|
|
6058
|
-
VisaSDKPerformanceDurationMarkEnum.IDENTITY_LOOKUP,
|
|
6059
|
-
VisaPerformanceMarkEnum.IDENTITY_LOOKUP_START,
|
|
6060
|
-
VisaPerformanceMarkEnum.IDENTITY_LOOKUP_END
|
|
6061
|
-
);
|
|
6062
|
-
performance.measure(
|
|
6063
|
-
VisaSDKPerformanceDeltaMarkEnum.IDENTITY_LOOKUP,
|
|
6064
|
-
VisaPerformanceMarkEnum.INIT_START,
|
|
6065
|
-
VisaPerformanceMarkEnum.IDENTITY_LOOKUP_START
|
|
6066
|
-
);
|
|
6067
|
-
performanceStore.addPerformanceEntry(
|
|
6068
|
-
CreditCardBrand.VISA,
|
|
6069
|
-
SDKPerformanceMethod.IDENTITY_LOOKUP,
|
|
6070
|
-
VisaSDKPerformanceDurationMarkEnum.IDENTITY_LOOKUP,
|
|
6071
|
-
VisaSDKPerformanceDeltaMarkEnum.IDENTITY_LOOKUP
|
|
6072
|
-
);
|
|
6073
|
-
}
|
|
6112
|
+
if (profileDetails.fullName) {
|
|
6113
|
+
visaCard.cardholderFullName = profileDetails.fullName;
|
|
6074
6114
|
}
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
performance.mark(VisaPerformanceMarkEnum.INITIATE_IDENTITY_VALIDATION_START);
|
|
6078
|
-
return await visaSrci.initiateIdentityValidation();
|
|
6079
|
-
} catch (e) {
|
|
6080
|
-
throw e;
|
|
6081
|
-
} finally {
|
|
6082
|
-
performance.mark(VisaPerformanceMarkEnum.INITIATE_IDENTITY_VALIDATION_END);
|
|
6083
|
-
performance.measure(
|
|
6084
|
-
VisaSDKPerformanceDurationMarkEnum.INITIATE_IDENTITY_VALIDATION,
|
|
6085
|
-
VisaPerformanceMarkEnum.INITIATE_IDENTITY_VALIDATION_START,
|
|
6086
|
-
VisaPerformanceMarkEnum.INITIATE_IDENTITY_VALIDATION_END
|
|
6087
|
-
);
|
|
6088
|
-
performance.measure(
|
|
6089
|
-
VisaSDKPerformanceDeltaMarkEnum.INITIATE_IDENTITY_VALIDATION,
|
|
6090
|
-
VisaPerformanceMarkEnum.INIT_START,
|
|
6091
|
-
VisaPerformanceMarkEnum.INITIATE_IDENTITY_VALIDATION_START
|
|
6092
|
-
);
|
|
6093
|
-
performanceStore.addPerformanceEntry(
|
|
6094
|
-
CreditCardBrand.VISA,
|
|
6095
|
-
SDKPerformanceMethod.INITIATE_IDENTITY_VALIDATION,
|
|
6096
|
-
VisaSDKPerformanceDurationMarkEnum.INITIATE_IDENTITY_VALIDATION,
|
|
6097
|
-
VisaSDKPerformanceDeltaMarkEnum.INITIATE_IDENTITY_VALIDATION
|
|
6098
|
-
);
|
|
6099
|
-
}
|
|
6115
|
+
if (profileDetails.billingAddress) {
|
|
6116
|
+
visaCard.billingAddress = profileDetails.billingAddress;
|
|
6100
6117
|
}
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
VisaPerformanceMarkEnum.COMPLETE_IDENTITY_VALIDATION_START,
|
|
6112
|
-
VisaPerformanceMarkEnum.COMPLETE_IDENTITY_VALIDATION_END
|
|
6113
|
-
);
|
|
6114
|
-
performance.measure(
|
|
6115
|
-
VisaSDKPerformanceDeltaMarkEnum.COMPLETE_IDENTITY_VALIDATION,
|
|
6116
|
-
VisaPerformanceMarkEnum.INIT_START,
|
|
6117
|
-
VisaPerformanceMarkEnum.COMPLETE_IDENTITY_VALIDATION_START
|
|
6118
|
-
);
|
|
6119
|
-
performanceStore.addPerformanceEntry(
|
|
6120
|
-
CreditCardBrand.VISA,
|
|
6121
|
-
SDKPerformanceMethod.COMPLETE_IDENTITY_VALIDATION,
|
|
6122
|
-
VisaSDKPerformanceDurationMarkEnum.COMPLETE_IDENTITY_VALIDATION,
|
|
6123
|
-
VisaSDKPerformanceDeltaMarkEnum.COMPLETE_IDENTITY_VALIDATION
|
|
6124
|
-
);
|
|
6125
|
-
}
|
|
6118
|
+
return visaCard;
|
|
6119
|
+
});
|
|
6120
|
+
/**
|
|
6121
|
+
* Transforms the profileDetails object to the consumer object by Visa.
|
|
6122
|
+
*/
|
|
6123
|
+
__publicField(VisaMapper, "toConsumer", (profileDetails) => {
|
|
6124
|
+
var _a2, _b;
|
|
6125
|
+
const visaConsumer = {};
|
|
6126
|
+
if (profileDetails.fullName) {
|
|
6127
|
+
visaConsumer.fullName = profileDetails.fullName;
|
|
6126
6128
|
}
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
performance.mark(VisaPerformanceMarkEnum.CHECKOUT_START);
|
|
6130
|
-
return await visaSrci.checkout(params);
|
|
6131
|
-
} catch (e) {
|
|
6132
|
-
throw e;
|
|
6133
|
-
} finally {
|
|
6134
|
-
performance.mark(VisaPerformanceMarkEnum.CHECKOUT_END);
|
|
6135
|
-
performance.measure(
|
|
6136
|
-
VisaSDKPerformanceDurationMarkEnum.CHECKOUT,
|
|
6137
|
-
VisaPerformanceMarkEnum.CHECKOUT_START,
|
|
6138
|
-
VisaPerformanceMarkEnum.CHECKOUT_END
|
|
6139
|
-
);
|
|
6140
|
-
performance.measure(
|
|
6141
|
-
VisaSDKPerformanceDeltaMarkEnum.CHECKOUT,
|
|
6142
|
-
VisaPerformanceMarkEnum.INIT_START,
|
|
6143
|
-
VisaPerformanceMarkEnum.CHECKOUT_START
|
|
6144
|
-
);
|
|
6145
|
-
performanceStore.addPerformanceEntry(
|
|
6146
|
-
CreditCardBrand.VISA,
|
|
6147
|
-
SDKPerformanceMethod.CHECKOUT,
|
|
6148
|
-
VisaSDKPerformanceDurationMarkEnum.CHECKOUT,
|
|
6149
|
-
VisaSDKPerformanceDeltaMarkEnum.CHECKOUT
|
|
6150
|
-
);
|
|
6151
|
-
}
|
|
6129
|
+
if (profileDetails.firstName) {
|
|
6130
|
+
visaConsumer.firstName = profileDetails.firstName;
|
|
6152
6131
|
}
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
performance.mark(VisaPerformanceMarkEnum.UNBIND_API_INSTANCE_START);
|
|
6156
|
-
return await visaSrci.unbindAppInstance(params);
|
|
6157
|
-
} catch (e) {
|
|
6158
|
-
throw e;
|
|
6159
|
-
} finally {
|
|
6160
|
-
performance.mark(VisaPerformanceMarkEnum.UNBIND_API_INSTANCE_END);
|
|
6161
|
-
performance.measure(
|
|
6162
|
-
VisaSDKPerformanceDurationMarkEnum.UNBIND_APP_INSTANCE,
|
|
6163
|
-
VisaPerformanceMarkEnum.UNBIND_API_INSTANCE_START,
|
|
6164
|
-
VisaPerformanceMarkEnum.UNBIND_API_INSTANCE_END
|
|
6165
|
-
);
|
|
6166
|
-
performance.measure(
|
|
6167
|
-
VisaSDKPerformanceDeltaMarkEnum.UNBIND_APP_INSTANCE,
|
|
6168
|
-
VisaPerformanceMarkEnum.INIT_START,
|
|
6169
|
-
VisaPerformanceMarkEnum.UNBIND_API_INSTANCE_START
|
|
6170
|
-
);
|
|
6171
|
-
performanceStore.addPerformanceEntry(
|
|
6172
|
-
CreditCardBrand.VISA,
|
|
6173
|
-
SDKPerformanceMethod.UNBIND_APP_INSTANCE,
|
|
6174
|
-
VisaSDKPerformanceDurationMarkEnum.UNBIND_APP_INSTANCE,
|
|
6175
|
-
VisaSDKPerformanceDeltaMarkEnum.UNBIND_APP_INSTANCE
|
|
6176
|
-
);
|
|
6177
|
-
}
|
|
6132
|
+
if (profileDetails.lastName) {
|
|
6133
|
+
visaConsumer.lastName = profileDetails.lastName;
|
|
6178
6134
|
}
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
ConsumerIdentityType2["EMAIL_ADDRESS"] = "EMAIL_ADDRESS";
|
|
6185
|
-
ConsumerIdentityType2["MOBILE_PHONE_NUMBER"] = "MOBILE_PHONE_NUMBER";
|
|
6186
|
-
ConsumerIdentityType2["CUSTOM_IDENTIFIER"] = "CUSTOM_IDENTIFIER";
|
|
6187
|
-
return ConsumerIdentityType2;
|
|
6188
|
-
})(ConsumerIdentityType || {});
|
|
6189
|
-
var ErrorReasonGetSrcProfile = /* @__PURE__ */ ((ErrorReasonGetSrcProfile2) => {
|
|
6190
|
-
ErrorReasonGetSrcProfile2["AUTH_INVALID"] = "AUTH_INVALID";
|
|
6191
|
-
ErrorReasonGetSrcProfile2["ACCT_INACCESSIBLE"] = "ACCT_INACCESSIBLE";
|
|
6192
|
-
ErrorReasonGetSrcProfile2["EMPTY_PROFILES"] = "EMPTY_PROFILES";
|
|
6193
|
-
return ErrorReasonGetSrcProfile2;
|
|
6194
|
-
})(ErrorReasonGetSrcProfile || {});
|
|
6195
|
-
var PerformanceMark = /* @__PURE__ */ ((PerformanceMark2) => {
|
|
6196
|
-
PerformanceMark2["INIT_START"] = "amex_init_start";
|
|
6197
|
-
PerformanceMark2["INIT_END"] = "amex_init_end";
|
|
6198
|
-
PerformanceMark2["IS_RECOGNISED_START"] = "amex_recognised_start";
|
|
6199
|
-
PerformanceMark2["IS_RECOGNISED_END"] = "amex_recognised_end";
|
|
6200
|
-
PerformanceMark2["GET_PROFILE_START"] = "amex_get_profile_start";
|
|
6201
|
-
PerformanceMark2["GET_PROFILE_END"] = "amex_get_profile_end";
|
|
6202
|
-
PerformanceMark2["CHECKOUT_START"] = "amex_checkout_start";
|
|
6203
|
-
PerformanceMark2["CHECKOUT_END"] = "amex_checkout_end";
|
|
6204
|
-
PerformanceMark2["IDENTITY_LOOKUP_START"] = "amex_identity_lookup_start";
|
|
6205
|
-
PerformanceMark2["IDENTITY_LOOKUP_END"] = "amex_identity_lookup_end";
|
|
6206
|
-
PerformanceMark2["INITIATE_IDENTITY_VALIDATION_START"] = "amex_initiate_identity_validation_start";
|
|
6207
|
-
PerformanceMark2["INITIATE_IDENTITY_VALIDATION_END"] = "amex_initiate_identity_validation_end";
|
|
6208
|
-
PerformanceMark2["COMPLETE_IDENTITY_VALIDATION_START"] = "amex_complete_identity_validation_start";
|
|
6209
|
-
PerformanceMark2["COMPLETE_IDENTITY_VALIDATION_END"] = "amex_complete_identity_validation_end";
|
|
6210
|
-
PerformanceMark2["UNBIND_API_INSTANCE_START"] = "amex_unbind_api_instance_start";
|
|
6211
|
-
PerformanceMark2["UNBIND_API_INSTANCE_END"] = "amex_unbind_api_instance_end";
|
|
6212
|
-
return PerformanceMark2;
|
|
6213
|
-
})(PerformanceMark || {});
|
|
6214
|
-
var SDKPerformanceDurationMark = /* @__PURE__ */ ((SDKPerformanceDurationMark2) => {
|
|
6215
|
-
SDKPerformanceDurationMark2["INIT"] = "init_amex_duration";
|
|
6216
|
-
SDKPerformanceDurationMark2["IS_RECOGNIZED"] = "is_recognized_amex_duration";
|
|
6217
|
-
SDKPerformanceDurationMark2["GET_SRC_PROFILE"] = "get_src_profile_amex_duration";
|
|
6218
|
-
SDKPerformanceDurationMark2["IDENTITY_LOOKUP"] = "identity_lookup_amex_duration";
|
|
6219
|
-
SDKPerformanceDurationMark2["INITIATE_IDENTITY_VALIDATION"] = "initiate_identity_validation_amex_duration";
|
|
6220
|
-
SDKPerformanceDurationMark2["COMPLETE_IDENTITY_VALIDATION"] = "complete_identity_validation_amex_duration";
|
|
6221
|
-
SDKPerformanceDurationMark2["CHECKOUT"] = "checkout_amex_duration";
|
|
6222
|
-
SDKPerformanceDurationMark2["UNBIND_APP_INSTANCE"] = "unbind_app_instance_amex_duration";
|
|
6223
|
-
return SDKPerformanceDurationMark2;
|
|
6224
|
-
})(SDKPerformanceDurationMark || {});
|
|
6225
|
-
var SDKPerformanceDeltaMark = /* @__PURE__ */ ((SDKPerformanceDeltaMark2) => {
|
|
6226
|
-
SDKPerformanceDeltaMark2["INIT"] = "init_amex_delta";
|
|
6227
|
-
SDKPerformanceDeltaMark2["IS_RECOGNIZED"] = "is_recognized_amex_delta";
|
|
6228
|
-
SDKPerformanceDeltaMark2["GET_SRC_PROFILE"] = "get_src_profile_amex_delta";
|
|
6229
|
-
SDKPerformanceDeltaMark2["IDENTITY_LOOKUP"] = "identity_lookup_amex_delta";
|
|
6230
|
-
SDKPerformanceDeltaMark2["INITIATE_IDENTITY_VALIDATION"] = "initiate_identity_validation_amex_delta";
|
|
6231
|
-
SDKPerformanceDeltaMark2["COMPLETE_IDENTITY_VALIDATION"] = "complete_identity_validation_amex_delta";
|
|
6232
|
-
SDKPerformanceDeltaMark2["CHECKOUT"] = "checkout_amex_delta";
|
|
6233
|
-
SDKPerformanceDeltaMark2["UNBIND_APP_INSTANCE"] = "unbind_app_instance_amex_delta";
|
|
6234
|
-
return SDKPerformanceDeltaMark2;
|
|
6235
|
-
})(SDKPerformanceDeltaMark || {});
|
|
6236
|
-
var ErrorReasonUnbindAppInstance = /* @__PURE__ */ ((ErrorReasonUnbindAppInstance2) => {
|
|
6237
|
-
ErrorReasonUnbindAppInstance2["NO_COOKIE_EXISTS"] = "NO_COOKIE_EXISTS";
|
|
6238
|
-
return ErrorReasonUnbindAppInstance2;
|
|
6239
|
-
})(ErrorReasonUnbindAppInstance || {});
|
|
6240
|
-
let AmexSrci;
|
|
6241
|
-
class AmexService {
|
|
6242
|
-
static async init(params) {
|
|
6243
|
-
if (window.AmexSS === void 0) {
|
|
6244
|
-
throw Error("Amex SDK is not loaded.");
|
|
6245
|
-
}
|
|
6246
|
-
AmexSrci = window.AmexSS.getInstance();
|
|
6247
|
-
try {
|
|
6248
|
-
performance.mark(PerformanceMark.INIT_START);
|
|
6249
|
-
return await AmexSrci.init(params);
|
|
6250
|
-
} catch (e) {
|
|
6251
|
-
throw e;
|
|
6252
|
-
} finally {
|
|
6253
|
-
performance.mark(PerformanceMark.INIT_END);
|
|
6254
|
-
performance.measure(
|
|
6255
|
-
SDKPerformanceDurationMark.INIT,
|
|
6256
|
-
PerformanceMark.INIT_START,
|
|
6257
|
-
PerformanceMark.INIT_END
|
|
6258
|
-
);
|
|
6259
|
-
performanceStore.addPerformanceEntry(
|
|
6260
|
-
CreditCardBrand.AMEX,
|
|
6261
|
-
SDKPerformanceMethod.INIT,
|
|
6262
|
-
SDKPerformanceDurationMark.INIT
|
|
6263
|
-
);
|
|
6264
|
-
}
|
|
6135
|
+
if (((_a2 = profileDetails.mobileNumber) == null ? void 0 : _a2.phoneNumber) && ((_b = profileDetails.mobileNumber) == null ? void 0 : _b.countryCode)) {
|
|
6136
|
+
visaConsumer.mobileNumber = {
|
|
6137
|
+
countryCode: profileDetails.mobileNumber.countryCode,
|
|
6138
|
+
phoneNumber: profileDetails.mobileNumber.phoneNumber
|
|
6139
|
+
};
|
|
6265
6140
|
}
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
}
|
|
6273
|
-
performance.mark(PerformanceMark.IS_RECOGNISED_END);
|
|
6274
|
-
performance.measure(
|
|
6275
|
-
SDKPerformanceDurationMark.IS_RECOGNIZED,
|
|
6276
|
-
PerformanceMark.IS_RECOGNISED_START,
|
|
6277
|
-
PerformanceMark.IS_RECOGNISED_END
|
|
6278
|
-
);
|
|
6279
|
-
performance.measure(
|
|
6280
|
-
SDKPerformanceDeltaMark.IS_RECOGNIZED,
|
|
6281
|
-
PerformanceMark.INIT_START,
|
|
6282
|
-
PerformanceMark.IS_RECOGNISED_START
|
|
6283
|
-
);
|
|
6284
|
-
performanceStore.addPerformanceEntry(
|
|
6285
|
-
CreditCardBrand.AMEX,
|
|
6286
|
-
SDKPerformanceMethod.IS_RECOGNIZED,
|
|
6287
|
-
SDKPerformanceDurationMark.IS_RECOGNIZED,
|
|
6288
|
-
SDKPerformanceDeltaMark.IS_RECOGNIZED
|
|
6289
|
-
);
|
|
6290
|
-
}
|
|
6141
|
+
if (profileDetails.email) {
|
|
6142
|
+
visaConsumer.emailAddress = profileDetails.email;
|
|
6143
|
+
visaConsumer.consumerIdentity = {
|
|
6144
|
+
identityProvider: "SRC",
|
|
6145
|
+
identityValue: profileDetails.email,
|
|
6146
|
+
identityType: "EMAIL_ADDRESS"
|
|
6147
|
+
};
|
|
6291
6148
|
}
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
const result = await AmexSrci.getSrcProfile(params.idTokens);
|
|
6296
|
-
performanceStore.update((value) => {
|
|
6297
|
-
return { ...value, correlationId: { ...value.correlationId, amex: result.srcCorrelationId } };
|
|
6298
|
-
});
|
|
6299
|
-
return result;
|
|
6300
|
-
} catch (e) {
|
|
6301
|
-
throw e;
|
|
6302
|
-
} finally {
|
|
6303
|
-
performance.mark(PerformanceMark.GET_PROFILE_END);
|
|
6304
|
-
performance.measure(
|
|
6305
|
-
SDKPerformanceDurationMark.GET_SRC_PROFILE,
|
|
6306
|
-
PerformanceMark.GET_PROFILE_START,
|
|
6307
|
-
PerformanceMark.GET_PROFILE_END
|
|
6308
|
-
);
|
|
6309
|
-
performance.measure(
|
|
6310
|
-
SDKPerformanceDeltaMark.GET_SRC_PROFILE,
|
|
6311
|
-
PerformanceMark.INIT_START,
|
|
6312
|
-
PerformanceMark.GET_PROFILE_START
|
|
6313
|
-
);
|
|
6314
|
-
performanceStore.addPerformanceEntry(
|
|
6315
|
-
CreditCardBrand.AMEX,
|
|
6316
|
-
SDKPerformanceMethod.GET_SRC_PROFILE,
|
|
6317
|
-
SDKPerformanceDurationMark.GET_SRC_PROFILE,
|
|
6318
|
-
SDKPerformanceDeltaMark.GET_SRC_PROFILE
|
|
6319
|
-
);
|
|
6320
|
-
}
|
|
6149
|
+
if (profileDetails.country) {
|
|
6150
|
+
visaConsumer.countryCode = profileDetails.country;
|
|
6151
|
+
visaConsumer.languageCode = profileDetails.languageCode;
|
|
6321
6152
|
}
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
performance
|
|
6336
|
-
|
|
6337
|
-
PerformanceMark.INIT_START,
|
|
6338
|
-
PerformanceMark.IDENTITY_LOOKUP_START
|
|
6339
|
-
);
|
|
6340
|
-
performanceStore.addPerformanceEntry(
|
|
6341
|
-
CreditCardBrand.AMEX,
|
|
6342
|
-
SDKPerformanceMethod.IDENTITY_LOOKUP,
|
|
6343
|
-
SDKPerformanceDurationMark.IDENTITY_LOOKUP,
|
|
6344
|
-
SDKPerformanceDeltaMark.IDENTITY_LOOKUP
|
|
6345
|
-
);
|
|
6346
|
-
}
|
|
6153
|
+
return visaConsumer;
|
|
6154
|
+
});
|
|
6155
|
+
class MastercardMapper {
|
|
6156
|
+
/**
|
|
6157
|
+
* Maps Mastercard specific checkout response to Orchestrator checkout response.
|
|
6158
|
+
*/
|
|
6159
|
+
static toCheckoutResponse(mastercardCheckoutResponse) {
|
|
6160
|
+
var _a2;
|
|
6161
|
+
return {
|
|
6162
|
+
userAction: mastercardCheckoutResponse.dcfActionCode,
|
|
6163
|
+
srcCorrelationId: (_a2 = mastercardCheckoutResponse == null ? void 0 : mastercardCheckoutResponse.checkoutResponse) == null ? void 0 : _a2.srcCorrelationId,
|
|
6164
|
+
checkoutResponseSignature: mastercardCheckoutResponse == null ? void 0 : mastercardCheckoutResponse.checkoutResponseSignature,
|
|
6165
|
+
creditCardBrand: CreditCardBrand.MASTERCARD,
|
|
6166
|
+
performance: void 0
|
|
6167
|
+
};
|
|
6347
6168
|
}
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6169
|
+
}
|
|
6170
|
+
/**
|
|
6171
|
+
* Populates the card object with required and optional profileDetails data.
|
|
6172
|
+
*/
|
|
6173
|
+
__publicField(MastercardMapper, "toCardObject", (card, profileDetails) => {
|
|
6174
|
+
const mastercardCard = {
|
|
6175
|
+
primaryAccountNumber: card.primaryAccountNumber,
|
|
6176
|
+
panExpirationMonth: card.panExpirationMonth,
|
|
6177
|
+
panExpirationYear: card.panExpirationYear,
|
|
6178
|
+
cardSecurityCode: card.cardSecurityCode
|
|
6179
|
+
};
|
|
6180
|
+
if (!profileDetails) {
|
|
6181
|
+
return mastercardCard;
|
|
6182
|
+
}
|
|
6183
|
+
if (profileDetails.fullName) {
|
|
6184
|
+
mastercardCard.cardholderFullName = profileDetails.fullName;
|
|
6185
|
+
}
|
|
6186
|
+
if (profileDetails.billingAddress) {
|
|
6187
|
+
mastercardCard.billingAddress = profileDetails.billingAddress;
|
|
6188
|
+
}
|
|
6189
|
+
return mastercardCard;
|
|
6190
|
+
});
|
|
6191
|
+
/**
|
|
6192
|
+
* Transforms the profileDetails object to the consumer object by Mastercard.
|
|
6193
|
+
*/
|
|
6194
|
+
__publicField(MastercardMapper, "toConsumer", (profileDetails) => {
|
|
6195
|
+
var _a2, _b;
|
|
6196
|
+
const mastercardConsumer = {};
|
|
6197
|
+
if (profileDetails.firstName) {
|
|
6198
|
+
mastercardConsumer.firstName = profileDetails.firstName;
|
|
6199
|
+
}
|
|
6200
|
+
if (profileDetails.lastName) {
|
|
6201
|
+
mastercardConsumer.lastName = profileDetails.lastName;
|
|
6202
|
+
}
|
|
6203
|
+
if (profileDetails.email) {
|
|
6204
|
+
mastercardConsumer.emailAddress = profileDetails.email;
|
|
6205
|
+
}
|
|
6206
|
+
if (((_a2 = profileDetails.mobileNumber) == null ? void 0 : _a2.phoneNumber) && ((_b = profileDetails.mobileNumber) == null ? void 0 : _b.countryCode)) {
|
|
6207
|
+
mastercardConsumer.mobileNumber = {
|
|
6208
|
+
countryCode: profileDetails.mobileNumber.countryCode,
|
|
6209
|
+
phoneNumber: profileDetails.mobileNumber.phoneNumber
|
|
6210
|
+
};
|
|
6211
|
+
}
|
|
6212
|
+
return mastercardConsumer;
|
|
6213
|
+
});
|
|
6214
|
+
class AmexMapper {
|
|
6215
|
+
/**
|
|
6216
|
+
* Maps Mastercard specific checkout response to Orchestrator checkout response.
|
|
6217
|
+
*/
|
|
6218
|
+
static toCheckoutResponse(amexCheckoutResponse) {
|
|
6219
|
+
return {
|
|
6220
|
+
userAction: amexCheckoutResponse.dcfActionCode,
|
|
6221
|
+
checkoutResponseSignature: amexCheckoutResponse == null ? void 0 : amexCheckoutResponse.checkoutResponse,
|
|
6222
|
+
srcCorrelationId: void 0,
|
|
6223
|
+
creditCardBrand: CreditCardBrand.AMEX,
|
|
6224
|
+
performance: void 0
|
|
6225
|
+
};
|
|
6226
|
+
}
|
|
6227
|
+
}
|
|
6228
|
+
/**
|
|
6229
|
+
* Populates the card object with required and optional profileDetails data.
|
|
6230
|
+
*/
|
|
6231
|
+
__publicField(AmexMapper, "toCardObject", (card, profileDetails) => {
|
|
6232
|
+
const amexCard = {
|
|
6233
|
+
primaryAccountNumber: card.primaryAccountNumber,
|
|
6234
|
+
panExpirationMonth: card.panExpirationMonth,
|
|
6235
|
+
panExpirationYear: card.panExpirationYear,
|
|
6236
|
+
cardSecurityCode: card.cardSecurityCode
|
|
6237
|
+
};
|
|
6238
|
+
if (!profileDetails) {
|
|
6239
|
+
return amexCard;
|
|
6373
6240
|
}
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
performance.mark(PerformanceMark.COMPLETE_IDENTITY_VALIDATION_START);
|
|
6377
|
-
return await AmexSrci.completeIdentityValidation(params);
|
|
6378
|
-
} catch (e) {
|
|
6379
|
-
throw e;
|
|
6380
|
-
} finally {
|
|
6381
|
-
performance.mark(PerformanceMark.COMPLETE_IDENTITY_VALIDATION_END);
|
|
6382
|
-
performance.measure(
|
|
6383
|
-
SDKPerformanceDurationMark.COMPLETE_IDENTITY_VALIDATION,
|
|
6384
|
-
PerformanceMark.COMPLETE_IDENTITY_VALIDATION_START,
|
|
6385
|
-
PerformanceMark.COMPLETE_IDENTITY_VALIDATION_END
|
|
6386
|
-
);
|
|
6387
|
-
performance.measure(
|
|
6388
|
-
SDKPerformanceDeltaMark.COMPLETE_IDENTITY_VALIDATION,
|
|
6389
|
-
PerformanceMark.INIT_START,
|
|
6390
|
-
PerformanceMark.COMPLETE_IDENTITY_VALIDATION_START
|
|
6391
|
-
);
|
|
6392
|
-
performanceStore.addPerformanceEntry(
|
|
6393
|
-
CreditCardBrand.AMEX,
|
|
6394
|
-
SDKPerformanceMethod.COMPLETE_IDENTITY_VALIDATION,
|
|
6395
|
-
SDKPerformanceDurationMark.COMPLETE_IDENTITY_VALIDATION,
|
|
6396
|
-
SDKPerformanceDeltaMark.COMPLETE_IDENTITY_VALIDATION
|
|
6397
|
-
);
|
|
6398
|
-
}
|
|
6241
|
+
if (profileDetails.firstName) {
|
|
6242
|
+
amexCard.cardholderFirstName = profileDetails.firstName;
|
|
6399
6243
|
}
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
performance.mark(PerformanceMark.CHECKOUT_START);
|
|
6403
|
-
return await AmexSrci.checkout(params);
|
|
6404
|
-
} catch (e) {
|
|
6405
|
-
throw e;
|
|
6406
|
-
} finally {
|
|
6407
|
-
performance.mark(PerformanceMark.CHECKOUT_END);
|
|
6408
|
-
performance.measure(
|
|
6409
|
-
SDKPerformanceDurationMark.CHECKOUT,
|
|
6410
|
-
PerformanceMark.CHECKOUT_START,
|
|
6411
|
-
PerformanceMark.CHECKOUT_END
|
|
6412
|
-
);
|
|
6413
|
-
performance.measure(
|
|
6414
|
-
SDKPerformanceDeltaMark.CHECKOUT,
|
|
6415
|
-
PerformanceMark.INIT_START,
|
|
6416
|
-
PerformanceMark.CHECKOUT_START
|
|
6417
|
-
);
|
|
6418
|
-
performanceStore.addPerformanceEntry(
|
|
6419
|
-
CreditCardBrand.AMEX,
|
|
6420
|
-
SDKPerformanceMethod.CHECKOUT,
|
|
6421
|
-
SDKPerformanceDurationMark.CHECKOUT,
|
|
6422
|
-
SDKPerformanceDeltaMark.CHECKOUT
|
|
6423
|
-
);
|
|
6424
|
-
}
|
|
6244
|
+
if (profileDetails.lastName) {
|
|
6245
|
+
amexCard.cardholderLastName = profileDetails.lastName;
|
|
6425
6246
|
}
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
performance.mark(PerformanceMark.UNBIND_API_INSTANCE_START);
|
|
6429
|
-
return await AmexSrci.unbindAppInstance(params);
|
|
6430
|
-
} catch (e) {
|
|
6431
|
-
throw e;
|
|
6432
|
-
} finally {
|
|
6433
|
-
performance.mark(PerformanceMark.UNBIND_API_INSTANCE_END);
|
|
6434
|
-
performance.measure(
|
|
6435
|
-
SDKPerformanceDurationMark.UNBIND_APP_INSTANCE,
|
|
6436
|
-
PerformanceMark.UNBIND_API_INSTANCE_START,
|
|
6437
|
-
PerformanceMark.UNBIND_API_INSTANCE_END
|
|
6438
|
-
);
|
|
6439
|
-
performance.measure(
|
|
6440
|
-
SDKPerformanceDeltaMark.UNBIND_APP_INSTANCE,
|
|
6441
|
-
PerformanceMark.INIT_START,
|
|
6442
|
-
PerformanceMark.UNBIND_API_INSTANCE_START
|
|
6443
|
-
);
|
|
6444
|
-
performanceStore.addPerformanceEntry(
|
|
6445
|
-
CreditCardBrand.AMEX,
|
|
6446
|
-
SDKPerformanceMethod.UNBIND_APP_INSTANCE,
|
|
6447
|
-
SDKPerformanceDurationMark.UNBIND_APP_INSTANCE,
|
|
6448
|
-
SDKPerformanceDeltaMark.UNBIND_APP_INSTANCE
|
|
6449
|
-
);
|
|
6450
|
-
}
|
|
6247
|
+
if (profileDetails.fullName) {
|
|
6248
|
+
amexCard.cardholderFullName = profileDetails.fullName;
|
|
6451
6249
|
}
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6250
|
+
if (profileDetails.billingAddress) {
|
|
6251
|
+
amexCard.billingAddress = profileDetails.billingAddress;
|
|
6252
|
+
}
|
|
6253
|
+
return amexCard;
|
|
6254
|
+
});
|
|
6255
|
+
const sandboxToEnvironment = (sandbox) => sandbox === Sandbox.TRUE ? Environment.SANDBOX : Environment.PRODUCTION;
|
|
6256
|
+
const processEnvToEnvironment = (processEnv) => processEnv === "production" ? Environment.PRODUCTION : Environment.SANDBOX;
|
|
6257
|
+
const getDefaultEnvironment = (sandbox) => sandbox !== void 0 ? sandboxToEnvironment(sandbox) : processEnvToEnvironment("production");
|
|
6258
|
+
const isApplicationInSandbox = (activeEnvironment) => activeEnvironment === Environment.SANDBOX;
|
|
6259
|
+
const environmentKey = {};
|
|
6260
|
+
const MastercardSdkUrls = {
|
|
6261
|
+
encryptionUrl(activeEnvironmentState) {
|
|
6262
|
+
return isApplicationInSandbox(activeEnvironmentState) ? "https://sandbox.src.mastercard.com/keys" : "https://src.mastercard.com/keys";
|
|
6263
|
+
},
|
|
6264
|
+
scriptUrl(activeEnvironmentState) {
|
|
6265
|
+
return isApplicationInSandbox(activeEnvironmentState) ? "https://sandbox.src.mastercard.com/sdk/srcsdk.mastercard.js" : "https://src.mastercard.com/sdk/srcsdk.mastercard.js";
|
|
6461
6266
|
}
|
|
6462
|
-
return getRandomValues(rnds8);
|
|
6463
|
-
}
|
|
6464
|
-
const byteToHex = [];
|
|
6465
|
-
for (let i = 0; i < 256; ++i) {
|
|
6466
|
-
byteToHex.push((i + 256).toString(16).slice(1));
|
|
6467
|
-
}
|
|
6468
|
-
function unsafeStringify(arr, offset = 0) {
|
|
6469
|
-
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
6470
|
-
}
|
|
6471
|
-
const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
6472
|
-
const native = {
|
|
6473
|
-
randomUUID
|
|
6474
6267
|
};
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
return
|
|
6268
|
+
const VisaSdkUrls = {
|
|
6269
|
+
scriptUrl(activeEnvironmentState) {
|
|
6270
|
+
return isApplicationInSandbox(activeEnvironmentState) ? "https://sandbox-assets.secure.checkout.visa.com/checkout-widget/resources/js/src-i-adapter/visaSdk.js?v2" : "https://assets.secure.checkout.visa.com/checkout-widget/resources/js/src-i-adapter/visaSdk.js";
|
|
6478
6271
|
}
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
buf[offset + i] = rnds[i];
|
|
6487
|
-
}
|
|
6488
|
-
return buf;
|
|
6272
|
+
};
|
|
6273
|
+
const AmexSdkUrls = {
|
|
6274
|
+
encryptionUrl(activeEnvironmentState) {
|
|
6275
|
+
return isApplicationInSandbox(activeEnvironmentState) ? "https://openid-qa.americanexpress.com/keys" : "https://openid.americanexpress.com/keys";
|
|
6276
|
+
},
|
|
6277
|
+
scriptUrl(activeEnvironmentState) {
|
|
6278
|
+
return isApplicationInSandbox(activeEnvironmentState) ? "https://qwww.aexp-static.com/akamai/remotecommerce/scripts/amexSDK-1.0.0.js" : "https://www.aexp-static.com/cdaas/remotecommerce/scripts/amexSDK-1.0.0.js";
|
|
6489
6279
|
}
|
|
6490
|
-
|
|
6280
|
+
};
|
|
6281
|
+
class SDKLoader {
|
|
6491
6282
|
}
|
|
6283
|
+
__publicField(SDKLoader, "loadMastercardSDK", (activeEnvironmentState) => {
|
|
6284
|
+
return new Promise((resolve, reject) => {
|
|
6285
|
+
const mastercardScript = document.createElement("script");
|
|
6286
|
+
mastercardScript.async = true;
|
|
6287
|
+
mastercardScript.src = MastercardSdkUrls.scriptUrl(activeEnvironmentState);
|
|
6288
|
+
mastercardScript.type = "text/javascript";
|
|
6289
|
+
document.body.appendChild(mastercardScript);
|
|
6290
|
+
mastercardScript.onload = () => resolve();
|
|
6291
|
+
mastercardScript.onerror = () => reject("Failed loading Mastercard SDK");
|
|
6292
|
+
});
|
|
6293
|
+
});
|
|
6294
|
+
__publicField(SDKLoader, "loadVisaSDK", (activeEnvironmentState) => {
|
|
6295
|
+
return new Promise((resolve, reject) => {
|
|
6296
|
+
const visaScript = document.createElement("script");
|
|
6297
|
+
visaScript.async = true;
|
|
6298
|
+
visaScript.src = VisaSdkUrls.scriptUrl(activeEnvironmentState);
|
|
6299
|
+
visaScript.type = "text/javascript";
|
|
6300
|
+
document.body.appendChild(visaScript);
|
|
6301
|
+
visaScript.onload = () => resolve();
|
|
6302
|
+
visaScript.onerror = () => reject({ error: { reason: "Failed loading Visa SDK" } });
|
|
6303
|
+
});
|
|
6304
|
+
});
|
|
6305
|
+
__publicField(SDKLoader, "loadAmexSDK", (activeEnvironmentState) => {
|
|
6306
|
+
return new Promise((resolve, reject) => {
|
|
6307
|
+
const amexScript = document.createElement("script");
|
|
6308
|
+
amexScript.async = true;
|
|
6309
|
+
amexScript.src = AmexSdkUrls.scriptUrl(activeEnvironmentState);
|
|
6310
|
+
amexScript.type = "text/javascript";
|
|
6311
|
+
document.body.appendChild(amexScript);
|
|
6312
|
+
amexScript.onload = () => resolve();
|
|
6313
|
+
amexScript.onerror = () => reject("Failed loading Amex SDK");
|
|
6314
|
+
});
|
|
6315
|
+
});
|
|
6316
|
+
const createSchemeConfigStore = () => {
|
|
6317
|
+
const { subscribe: subscribe2, set, update: update2 } = writable({ config: void 0 });
|
|
6318
|
+
return {
|
|
6319
|
+
subscribe: subscribe2,
|
|
6320
|
+
set,
|
|
6321
|
+
update: update2,
|
|
6322
|
+
storeSchemeConfiguration: (config) => update2(() => ({ config }))
|
|
6323
|
+
};
|
|
6324
|
+
};
|
|
6325
|
+
const schemeConfigStore = createSchemeConfigStore();
|
|
6492
6326
|
const crypto$1 = crypto;
|
|
6493
6327
|
const isCryptoKey = (key) => key instanceof CryptoKey;
|
|
6494
6328
|
const digest = async (algorithm, data) => {
|
|
@@ -6576,7 +6410,7 @@ const decode = (input) => {
|
|
|
6576
6410
|
encoded = encoded.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
|
|
6577
6411
|
try {
|
|
6578
6412
|
return decodeBase64(encoded);
|
|
6579
|
-
} catch (
|
|
6413
|
+
} catch (_a2) {
|
|
6580
6414
|
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
6581
6415
|
}
|
|
6582
6416
|
};
|
|
@@ -6585,11 +6419,11 @@ class JOSEError extends Error {
|
|
|
6585
6419
|
return "ERR_JOSE_GENERIC";
|
|
6586
6420
|
}
|
|
6587
6421
|
constructor(message2) {
|
|
6588
|
-
var
|
|
6422
|
+
var _a2;
|
|
6589
6423
|
super(message2);
|
|
6590
6424
|
this.code = "ERR_JOSE_GENERIC";
|
|
6591
6425
|
this.name = this.constructor.name;
|
|
6592
|
-
(
|
|
6426
|
+
(_a2 = Error.captureStackTrace) === null || _a2 === void 0 ? void 0 : _a2.call(Error, this, this.constructor);
|
|
6593
6427
|
}
|
|
6594
6428
|
}
|
|
6595
6429
|
class JOSENotSupported extends JOSEError {
|
|
@@ -7069,14 +6903,14 @@ function subtleMapping(jwk) {
|
|
|
7069
6903
|
return { algorithm, keyUsages };
|
|
7070
6904
|
}
|
|
7071
6905
|
const parse = async (jwk) => {
|
|
7072
|
-
var
|
|
6906
|
+
var _a2, _b;
|
|
7073
6907
|
if (!jwk.alg) {
|
|
7074
6908
|
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
7075
6909
|
}
|
|
7076
6910
|
const { algorithm, keyUsages } = subtleMapping(jwk);
|
|
7077
6911
|
const rest = [
|
|
7078
6912
|
algorithm,
|
|
7079
|
-
(
|
|
6913
|
+
(_a2 = jwk.ext) !== null && _a2 !== void 0 ? _a2 : false,
|
|
7080
6914
|
(_b = jwk.key_ops) !== null && _b !== void 0 ? _b : keyUsages
|
|
7081
6915
|
];
|
|
7082
6916
|
if (algorithm.name === "PBKDF2") {
|
|
@@ -7089,7 +6923,7 @@ const parse = async (jwk) => {
|
|
|
7089
6923
|
};
|
|
7090
6924
|
const asKeyObject = parse;
|
|
7091
6925
|
async function importJWK(jwk, alg, octAsKeyObject) {
|
|
7092
|
-
var
|
|
6926
|
+
var _a2;
|
|
7093
6927
|
if (!isObject(jwk)) {
|
|
7094
6928
|
throw new TypeError("JWK must be an object");
|
|
7095
6929
|
}
|
|
@@ -7101,7 +6935,7 @@ async function importJWK(jwk, alg, octAsKeyObject) {
|
|
|
7101
6935
|
}
|
|
7102
6936
|
octAsKeyObject !== null && octAsKeyObject !== void 0 ? octAsKeyObject : octAsKeyObject = jwk.ext !== true;
|
|
7103
6937
|
if (octAsKeyObject) {
|
|
7104
|
-
return asKeyObject({ ...jwk, alg, ext: (
|
|
6938
|
+
return asKeyObject({ ...jwk, alg, ext: (_a2 = jwk.ext) !== null && _a2 !== void 0 ? _a2 : false });
|
|
7105
6939
|
}
|
|
7106
6940
|
return decode(jwk.k);
|
|
7107
6941
|
case "RSA":
|
|
@@ -7560,76 +7394,241 @@ __publicField(VisaEncryptionService, "encryptCard", async (card, visaEncryptionK
|
|
|
7560
7394
|
const errorPaymentEvent = new CustomEvent(FLOW_EVENT_PAYMENT_ERROR, { detail: e });
|
|
7561
7395
|
get_store_value(webComponentRefStore).webComponentRef.dispatchEvent(errorPaymentEvent);
|
|
7562
7396
|
}
|
|
7563
|
-
});
|
|
7564
|
-
const
|
|
7565
|
-
const
|
|
7566
|
-
const
|
|
7567
|
-
|
|
7568
|
-
|
|
7569
|
-
|
|
7570
|
-
|
|
7571
|
-
const
|
|
7572
|
-
|
|
7573
|
-
|
|
7574
|
-
return
|
|
7575
|
-
}
|
|
7576
|
-
|
|
7577
|
-
|
|
7397
|
+
});
|
|
7398
|
+
const maskEmail = (email2) => {
|
|
7399
|
+
const firstPart = email2.split("@")[0];
|
|
7400
|
+
const secondPart = email2.split("@")[1];
|
|
7401
|
+
const firstCharacter = firstPart.at(0);
|
|
7402
|
+
const lastCharacter = firstPart.length > 1 ? firstPart.at(firstPart.length - 1) : "";
|
|
7403
|
+
return firstCharacter + "****" + lastCharacter + "@" + secondPart;
|
|
7404
|
+
};
|
|
7405
|
+
const getMaskedEmailFromProfile = (orchestratorGetSrcProfileResponse) => {
|
|
7406
|
+
var _a2, _b, _c;
|
|
7407
|
+
if (!orchestratorGetSrcProfileResponse || orchestratorGetSrcProfileResponse.length === 0) {
|
|
7408
|
+
return void 0;
|
|
7409
|
+
}
|
|
7410
|
+
const firstProfile = orchestratorGetSrcProfileResponse[0];
|
|
7411
|
+
if (firstProfile.creditCardBrand === CreditCardBrand.MASTERCARD) {
|
|
7412
|
+
const mastercardProfiles = firstProfile.profiles;
|
|
7413
|
+
if (mastercardProfiles.length === 0 || mastercardProfiles[0].maskedConsumer === void 0) {
|
|
7414
|
+
return void 0;
|
|
7415
|
+
}
|
|
7416
|
+
return mastercardProfiles[0].maskedConsumer.maskedEmailAddress;
|
|
7417
|
+
}
|
|
7418
|
+
if (firstProfile.creditCardBrand === CreditCardBrand.VISA) {
|
|
7419
|
+
const visaProfiles = firstProfile.profiles;
|
|
7420
|
+
if (visaProfiles.length === 0) {
|
|
7421
|
+
return void 0;
|
|
7422
|
+
}
|
|
7423
|
+
return visaProfiles[0].maskedConsumer.emailAddress;
|
|
7424
|
+
}
|
|
7425
|
+
if (firstProfile.creditCardBrand === CreditCardBrand.AMEX) {
|
|
7426
|
+
const amexProfiles = firstProfile.profiles;
|
|
7427
|
+
if (amexProfiles.length === 0) {
|
|
7428
|
+
return void 0;
|
|
7429
|
+
}
|
|
7430
|
+
return (_c = (_b = (_a2 = amexProfiles[0]) == null ? void 0 : _a2.maskedConsumer) == null ? void 0 : _b.maskedConsumerIdentity) == null ? void 0 : _c.maskedIdentityValue;
|
|
7431
|
+
}
|
|
7432
|
+
throw Error("Unknown SRC vendor, not able to get email from profile.");
|
|
7433
|
+
};
|
|
7434
|
+
const createOrchestratorStore = () => {
|
|
7435
|
+
const { subscribe: subscribe2, set, update: update2 } = writable(void 0);
|
|
7436
|
+
return {
|
|
7437
|
+
subscribe: subscribe2,
|
|
7438
|
+
update: update2,
|
|
7439
|
+
set,
|
|
7440
|
+
storeWhichBrandRecognizedUser: (userIsRecognizedIn) => {
|
|
7441
|
+
update2((value) => {
|
|
7442
|
+
return {
|
|
7443
|
+
...value,
|
|
7444
|
+
userIsRecognizedIn
|
|
7445
|
+
};
|
|
7446
|
+
});
|
|
7447
|
+
},
|
|
7448
|
+
storeUserEmail: (email2) => {
|
|
7449
|
+
update2((value) => {
|
|
7450
|
+
return {
|
|
7451
|
+
...value,
|
|
7452
|
+
email: email2,
|
|
7453
|
+
recognizedUserMaskedEmail: maskEmail(email2)
|
|
7454
|
+
};
|
|
7455
|
+
});
|
|
7456
|
+
},
|
|
7457
|
+
storeUserRecognition: (isRecognizedResponse) => {
|
|
7458
|
+
update2((value) => {
|
|
7459
|
+
return {
|
|
7460
|
+
...value,
|
|
7461
|
+
userIsRecognizedIn: isRecognizedResponse.userIsRecognizedIn,
|
|
7462
|
+
idToken: isRecognizedResponse.idTokens
|
|
7463
|
+
};
|
|
7464
|
+
});
|
|
7465
|
+
},
|
|
7466
|
+
storeSrcProfile: (srcProfileResponse) => {
|
|
7467
|
+
update2((value) => {
|
|
7468
|
+
return {
|
|
7469
|
+
...value,
|
|
7470
|
+
srcCorrelationIds: getSrcCorrelationIdsForSchemes(srcProfileResponse),
|
|
7471
|
+
profilesByVendor: srcProfileResponse,
|
|
7472
|
+
recognizedUserMaskedEmail: getMaskedEmailFromProfile(srcProfileResponse)
|
|
7473
|
+
};
|
|
7474
|
+
});
|
|
7475
|
+
},
|
|
7476
|
+
forgetUser: () => {
|
|
7477
|
+
update2(() => {
|
|
7478
|
+
return {
|
|
7479
|
+
profilesByVendor: void 0,
|
|
7480
|
+
idToken: void 0,
|
|
7481
|
+
srcCorrelationId: void 0,
|
|
7482
|
+
identityValidationMaskedChannel: void 0,
|
|
7483
|
+
userIsRecognizedIn: void 0,
|
|
7484
|
+
recognizedUserMaskedEmail: void 0,
|
|
7485
|
+
email: void 0
|
|
7486
|
+
};
|
|
7487
|
+
});
|
|
7488
|
+
}
|
|
7489
|
+
};
|
|
7490
|
+
};
|
|
7491
|
+
const orchestratorStore = createOrchestratorStore();
|
|
7492
|
+
const getSrcCorrelationIdsForSchemes = (srcProfileResponse) => {
|
|
7493
|
+
return new Map([
|
|
7494
|
+
...srcProfileResponse.map((profile) => [
|
|
7495
|
+
profile.creditCardBrand,
|
|
7496
|
+
profile.srcCorrelationId
|
|
7497
|
+
])
|
|
7498
|
+
]);
|
|
7499
|
+
};
|
|
7500
|
+
var __defProp$2 = Object.defineProperty;
|
|
7501
|
+
var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
|
|
7502
|
+
var __decorateClass$2 = (decorators, target, key, kind) => {
|
|
7503
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;
|
|
7504
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7505
|
+
if (decorator = decorators[i])
|
|
7506
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7507
|
+
if (kind && result)
|
|
7508
|
+
__defProp$2(target, key, result);
|
|
7509
|
+
return result;
|
|
7510
|
+
};
|
|
7511
|
+
let visaSrci;
|
|
7512
|
+
const _VisaService = (_a = class {
|
|
7513
|
+
static async init(params, visaEncryptionKey, visaNModulus) {
|
|
7514
|
+
if (window.vAdapters.VisaSRCI === void 0) {
|
|
7515
|
+
throw Error("Visa SDK is not loaded.");
|
|
7516
|
+
}
|
|
7517
|
+
visaSrci = new window.vAdapters.VisaSRCI();
|
|
7518
|
+
_VisaService.visaEncryptionKey = visaEncryptionKey;
|
|
7519
|
+
_VisaService.visaNModulus = visaNModulus;
|
|
7520
|
+
await visaSrci.init(params);
|
|
7521
|
+
}
|
|
7522
|
+
static async isRecognized() {
|
|
7523
|
+
return await visaSrci.isRecognized();
|
|
7578
7524
|
}
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
scriptUrl(activeEnvironmentState) {
|
|
7582
|
-
return isApplicationInSandbox(activeEnvironmentState) ? "https://sandbox-assets.secure.checkout.visa.com/checkout-widget/resources/js/src-i-adapter/visaSdk.js?v2" : "https://assets.secure.checkout.visa.com/checkout-widget/resources/js/src-i-adapter/visaSdk.js";
|
|
7525
|
+
static async getSrcProfile(params) {
|
|
7526
|
+
return await visaSrci.getSrcProfile(params);
|
|
7583
7527
|
}
|
|
7584
|
-
|
|
7585
|
-
|
|
7586
|
-
encryptionUrl(activeEnvironmentState) {
|
|
7587
|
-
return isApplicationInSandbox(activeEnvironmentState) ? "https://openid-qa.americanexpress.com/keys" : "https://openid.americanexpress.com/keys";
|
|
7588
|
-
},
|
|
7589
|
-
scriptUrl(activeEnvironmentState) {
|
|
7590
|
-
return isApplicationInSandbox(activeEnvironmentState) ? "https://qwww.aexp-static.com/akamai/remotecommerce/scripts/amexSDK-1.0.0.js" : "https://www.aexp-static.com/cdaas/remotecommerce/scripts/amexSDK-1.0.0.js";
|
|
7528
|
+
static async identityLookup(params) {
|
|
7529
|
+
return await visaSrci.identityLookup(params);
|
|
7591
7530
|
}
|
|
7592
|
-
|
|
7593
|
-
|
|
7594
|
-
};
|
|
7595
|
-
let MastercardEncryptionService = _MastercardEncryptionService;
|
|
7596
|
-
/**
|
|
7597
|
-
* Encrypts a given card form the user using the Mastercard encryption.
|
|
7598
|
-
*
|
|
7599
|
-
* @param card The provided credit card from the user.
|
|
7600
|
-
* @param activeEnvironmentState The active current environment
|
|
7601
|
-
*/
|
|
7602
|
-
__publicField(MastercardEncryptionService, "encryptCard", async (card, activeEnvironmentState) => {
|
|
7603
|
-
const encoder2 = new TextEncoder();
|
|
7604
|
-
const panKey = await _MastercardEncryptionService.getFpanKey(activeEnvironmentState);
|
|
7605
|
-
const rsaPublicKey = await importJWK(panKey);
|
|
7606
|
-
return await new CompactEncrypt(encoder2.encode(JSON.stringify(card))).setProtectedHeader({
|
|
7607
|
-
alg: "RSA-OAEP-256",
|
|
7608
|
-
enc: "A128GCM",
|
|
7609
|
-
kid: panKey.kid
|
|
7610
|
-
}).encrypt(rsaPublicKey);
|
|
7611
|
-
});
|
|
7612
|
-
/**
|
|
7613
|
-
* Extracts the FPAN key from the Mastercard jwk response.
|
|
7614
|
-
*
|
|
7615
|
-
* @throws When the fpan key is not found from the Mastercard jwk response.
|
|
7616
|
-
*/
|
|
7617
|
-
__publicField(MastercardEncryptionService, "getFpanKey", async (activeEnvironmentState) => {
|
|
7618
|
-
const mastercardJwk = await _MastercardEncryptionService.getJwk(activeEnvironmentState);
|
|
7619
|
-
const fpanIdentifierSuffix = `${activeEnvironmentState === Environment.SANDBOX ? "sandbox" : "prod"}-fpan-encryption-src-mastercard-int`;
|
|
7620
|
-
const fpanJwk = mastercardJwk.keys.find((jwk) => jwk.kid.endsWith(fpanIdentifierSuffix));
|
|
7621
|
-
if (fpanJwk === void 0) {
|
|
7622
|
-
throw Error("Mastercard Service was unable to retrieve the FPAN key from Mastercard SDK.");
|
|
7531
|
+
static async initiateIdentityValidation() {
|
|
7532
|
+
return await visaSrci.initiateIdentityValidation();
|
|
7623
7533
|
}
|
|
7624
|
-
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
|
|
7628
|
-
|
|
7629
|
-
|
|
7630
|
-
|
|
7631
|
-
|
|
7632
|
-
|
|
7534
|
+
static async completeIdentityValidation(params) {
|
|
7535
|
+
return await visaSrci.completeIdentityValidation(params);
|
|
7536
|
+
}
|
|
7537
|
+
static async prepareCheckoutParams(params, transactionId) {
|
|
7538
|
+
const consumer = params.profileDetails ? VisaMapper.toConsumer(params.profileDetails) : void 0;
|
|
7539
|
+
const dpaTransactionOptions = prepareVisaDpaTransactionOptions(
|
|
7540
|
+
params.dpaTransactionOptions
|
|
7541
|
+
);
|
|
7542
|
+
const complianceSettings = prepareVisaComplianceSettings(
|
|
7543
|
+
params.skipVerificationNextTime,
|
|
7544
|
+
!!params.card,
|
|
7545
|
+
params.complianceResourceURLs
|
|
7546
|
+
);
|
|
7547
|
+
const visaInitConfig = get_store_value(schemeConfigStore).config.visa;
|
|
7548
|
+
const authenticationContext = {
|
|
7549
|
+
authenticationReasons: [
|
|
7550
|
+
visaInitConfig.threeDSOptions.authenticationReason ? visaInitConfig.threeDSOptions.authenticationReason : VisaAuthenticationReasonEnum.TRANSACTION_AUTHENTICATION
|
|
7551
|
+
],
|
|
7552
|
+
srciDpaId: visaInitConfig.srciDpaId,
|
|
7553
|
+
acquirerMerchantId: visaInitConfig.threeDSOptions.acquirerMerchantId,
|
|
7554
|
+
acquirerBIN: visaInitConfig.threeDSOptions.acquirerBIN,
|
|
7555
|
+
merchantName: visaInitConfig.threeDSOptions.merchantName
|
|
7556
|
+
};
|
|
7557
|
+
const authenticationMethod = {
|
|
7558
|
+
authenticationMethodType: VisaAuthenticationMethodTypeEnum.MANAGED_AUTHENTICATION,
|
|
7559
|
+
authenticationSubject: VisaAuthenticationSubjectEnum.CARDHOLDER,
|
|
7560
|
+
methodAttributes: {
|
|
7561
|
+
challengeIndicator: visaInitConfig.threeDSOptions.challengeIndicator
|
|
7562
|
+
}
|
|
7563
|
+
};
|
|
7564
|
+
let checkoutParams = {
|
|
7565
|
+
srciTransactionId: transactionId,
|
|
7566
|
+
consumer,
|
|
7567
|
+
dpaTransactionOptions,
|
|
7568
|
+
complianceSettings,
|
|
7569
|
+
authenticationContext,
|
|
7570
|
+
authenticationMethod
|
|
7571
|
+
};
|
|
7572
|
+
if (params.card) {
|
|
7573
|
+
const cardFilledWithProfileDetails = VisaMapper.toCardObject(params.card, params.profileDetails);
|
|
7574
|
+
const encryptedCard = await VisaEncryptionService.encryptCard(
|
|
7575
|
+
cardFilledWithProfileDetails,
|
|
7576
|
+
_VisaService.visaEncryptionKey,
|
|
7577
|
+
_VisaService.visaNModulus
|
|
7578
|
+
);
|
|
7579
|
+
const orchestratorState = get_store_value(orchestratorStore);
|
|
7580
|
+
if (orchestratorState && !!orchestratorState.idToken && !!orchestratorState.srcCorrelationIds) {
|
|
7581
|
+
checkoutParams = {
|
|
7582
|
+
...checkoutParams,
|
|
7583
|
+
idToken: orchestratorState.idToken.length > 0 ? orchestratorState.idToken[0] : void 0,
|
|
7584
|
+
srcCorrelationId: orchestratorState.srcCorrelationIds.get(CreditCardBrand.VISA)
|
|
7585
|
+
};
|
|
7586
|
+
}
|
|
7587
|
+
checkoutParams = {
|
|
7588
|
+
...checkoutParams,
|
|
7589
|
+
encryptedCard
|
|
7590
|
+
};
|
|
7591
|
+
}
|
|
7592
|
+
if (params.srcDigitalCardId) {
|
|
7593
|
+
checkoutParams = {
|
|
7594
|
+
...checkoutParams,
|
|
7595
|
+
srcDigitalCardId: params.srcDigitalCardId
|
|
7596
|
+
};
|
|
7597
|
+
}
|
|
7598
|
+
return checkoutParams;
|
|
7599
|
+
}
|
|
7600
|
+
static async checkout(params) {
|
|
7601
|
+
return await visaSrci.checkout(params);
|
|
7602
|
+
}
|
|
7603
|
+
static async unbindAppInstance(params) {
|
|
7604
|
+
return await visaSrci.unbindAppInstance(params);
|
|
7605
|
+
}
|
|
7606
|
+
}, __publicField(_a, "visaEncryptionKey", ""), __publicField(_a, "visaNModulus", ""), _a);
|
|
7607
|
+
let VisaService = _VisaService;
|
|
7608
|
+
__decorateClass$2([
|
|
7609
|
+
performanceMeasure(CreditCardBrand.VISA, SDKPerformanceMethod.INIT)
|
|
7610
|
+
], VisaService, "init", 1);
|
|
7611
|
+
__decorateClass$2([
|
|
7612
|
+
performanceMeasure(CreditCardBrand.VISA, SDKPerformanceMethod.IS_RECOGNIZED)
|
|
7613
|
+
], VisaService, "isRecognized", 1);
|
|
7614
|
+
__decorateClass$2([
|
|
7615
|
+
performanceMeasure(CreditCardBrand.VISA, SDKPerformanceMethod.GET_SRC_PROFILE)
|
|
7616
|
+
], VisaService, "getSrcProfile", 1);
|
|
7617
|
+
__decorateClass$2([
|
|
7618
|
+
performanceMeasure(CreditCardBrand.VISA, SDKPerformanceMethod.IDENTITY_LOOKUP)
|
|
7619
|
+
], VisaService, "identityLookup", 1);
|
|
7620
|
+
__decorateClass$2([
|
|
7621
|
+
performanceMeasure(CreditCardBrand.VISA, SDKPerformanceMethod.INITIATE_IDENTITY_VALIDATION)
|
|
7622
|
+
], VisaService, "initiateIdentityValidation", 1);
|
|
7623
|
+
__decorateClass$2([
|
|
7624
|
+
performanceMeasure(CreditCardBrand.VISA, SDKPerformanceMethod.COMPLETE_IDENTITY_VALIDATION)
|
|
7625
|
+
], VisaService, "completeIdentityValidation", 1);
|
|
7626
|
+
__decorateClass$2([
|
|
7627
|
+
performanceMeasure(CreditCardBrand.VISA, SDKPerformanceMethod.CHECKOUT)
|
|
7628
|
+
], VisaService, "checkout", 1);
|
|
7629
|
+
__decorateClass$2([
|
|
7630
|
+
performanceMeasure(CreditCardBrand.VISA, SDKPerformanceMethod.UNBIND_APP_INSTANCE)
|
|
7631
|
+
], VisaService, "unbindAppInstance", 1);
|
|
7633
7632
|
const _AmexEncryptionService = class {
|
|
7634
7633
|
};
|
|
7635
7634
|
let AmexEncryptionService = _AmexEncryptionService;
|
|
@@ -7670,205 +7669,95 @@ __publicField(AmexEncryptionService, "getJwk", async (activeEnvironmentState) =>
|
|
|
7670
7669
|
const jwkResponse = await fetch(AmexSdkUrls.encryptionUrl(activeEnvironmentState));
|
|
7671
7670
|
return await jwkResponse.json();
|
|
7672
7671
|
});
|
|
7673
|
-
|
|
7674
|
-
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
|
|
7679
|
-
|
|
7680
|
-
|
|
7672
|
+
var __defProp$1 = Object.defineProperty;
|
|
7673
|
+
var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
|
|
7674
|
+
var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
7675
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
|
|
7676
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7677
|
+
if (decorator = decorators[i])
|
|
7678
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7679
|
+
if (kind && result)
|
|
7680
|
+
__defProp$1(target, key, result);
|
|
7681
|
+
return result;
|
|
7681
7682
|
};
|
|
7682
|
-
|
|
7683
|
-
|
|
7684
|
-
|
|
7685
|
-
|
|
7686
|
-
|
|
7687
|
-
|
|
7688
|
-
|
|
7689
|
-
|
|
7690
|
-
}
|
|
7691
|
-
/**
|
|
7692
|
-
* Populates the card object with required and optional profileDetails data.
|
|
7693
|
-
*/
|
|
7694
|
-
__publicField(VisaMapper, "toCardObject", (card, profileDetails) => {
|
|
7695
|
-
const visaCard = {
|
|
7696
|
-
primaryAccountNumber: card.primaryAccountNumber,
|
|
7697
|
-
panExpirationMonth: card.panExpirationMonth,
|
|
7698
|
-
panExpirationYear: (/* @__PURE__ */ new Date()).getFullYear().toString().substring(0, 2) + card.panExpirationYear,
|
|
7699
|
-
cardSecurityCode: card.cardSecurityCode
|
|
7700
|
-
};
|
|
7701
|
-
if (!profileDetails) {
|
|
7702
|
-
return visaCard;
|
|
7703
|
-
}
|
|
7704
|
-
if (profileDetails.firstName) {
|
|
7705
|
-
visaCard.cardholderFirstName = profileDetails.firstName;
|
|
7706
|
-
}
|
|
7707
|
-
if (profileDetails.lastName) {
|
|
7708
|
-
visaCard.cardholderLastName = profileDetails.lastName;
|
|
7709
|
-
}
|
|
7710
|
-
if (profileDetails.fullName) {
|
|
7711
|
-
visaCard.cardholderFullName = profileDetails.fullName;
|
|
7712
|
-
}
|
|
7713
|
-
if (profileDetails.billingAddress) {
|
|
7714
|
-
visaCard.billingAddress = profileDetails.billingAddress;
|
|
7715
|
-
}
|
|
7716
|
-
return visaCard;
|
|
7717
|
-
});
|
|
7718
|
-
/**
|
|
7719
|
-
* Transforms the profileDetails object to the consumer object by Visa.
|
|
7720
|
-
*/
|
|
7721
|
-
__publicField(VisaMapper, "toConsumer", (profileDetails) => {
|
|
7722
|
-
var _a, _b;
|
|
7723
|
-
const visaConsumer = {};
|
|
7724
|
-
if (profileDetails.fullName) {
|
|
7725
|
-
visaConsumer.fullName = profileDetails.fullName;
|
|
7726
|
-
}
|
|
7727
|
-
if (profileDetails.firstName) {
|
|
7728
|
-
visaConsumer.firstName = profileDetails.firstName;
|
|
7729
|
-
}
|
|
7730
|
-
if (profileDetails.lastName) {
|
|
7731
|
-
visaConsumer.lastName = profileDetails.lastName;
|
|
7732
|
-
}
|
|
7733
|
-
if (((_a = profileDetails.mobileNumber) == null ? void 0 : _a.phoneNumber) && ((_b = profileDetails.mobileNumber) == null ? void 0 : _b.countryCode)) {
|
|
7734
|
-
visaConsumer.mobileNumber = {
|
|
7735
|
-
countryCode: profileDetails.mobileNumber.countryCode,
|
|
7736
|
-
phoneNumber: profileDetails.mobileNumber.phoneNumber
|
|
7737
|
-
};
|
|
7738
|
-
}
|
|
7739
|
-
if (profileDetails.email) {
|
|
7740
|
-
visaConsumer.emailAddress = profileDetails.email;
|
|
7741
|
-
visaConsumer.consumerIdentity = {
|
|
7742
|
-
identityProvider: "SRC",
|
|
7743
|
-
identityValue: profileDetails.email,
|
|
7744
|
-
identityType: "EMAIL_ADDRESS"
|
|
7745
|
-
};
|
|
7746
|
-
}
|
|
7747
|
-
if (profileDetails.country) {
|
|
7748
|
-
visaConsumer.countryCode = profileDetails.country;
|
|
7749
|
-
visaConsumer.languageCode = profileDetails.languageCode;
|
|
7750
|
-
}
|
|
7751
|
-
return visaConsumer;
|
|
7752
|
-
});
|
|
7753
|
-
class MastercardMapper {
|
|
7754
|
-
}
|
|
7755
|
-
/**
|
|
7756
|
-
* Populates the card object with required and optional profileDetails data.
|
|
7757
|
-
*/
|
|
7758
|
-
__publicField(MastercardMapper, "toCardObject", (card, profileDetails) => {
|
|
7759
|
-
const mastercardCard = {
|
|
7760
|
-
primaryAccountNumber: card.primaryAccountNumber,
|
|
7761
|
-
panExpirationMonth: card.panExpirationMonth,
|
|
7762
|
-
panExpirationYear: card.panExpirationYear,
|
|
7763
|
-
cardSecurityCode: card.cardSecurityCode
|
|
7764
|
-
};
|
|
7765
|
-
if (!profileDetails) {
|
|
7766
|
-
return mastercardCard;
|
|
7767
|
-
}
|
|
7768
|
-
if (profileDetails.fullName) {
|
|
7769
|
-
mastercardCard.cardholderFullName = profileDetails.fullName;
|
|
7770
|
-
}
|
|
7771
|
-
if (profileDetails.billingAddress) {
|
|
7772
|
-
mastercardCard.billingAddress = profileDetails.billingAddress;
|
|
7773
|
-
}
|
|
7774
|
-
return mastercardCard;
|
|
7775
|
-
});
|
|
7776
|
-
/**
|
|
7777
|
-
* Transforms the profileDetails object to the consumer object by Mastercard.
|
|
7778
|
-
*/
|
|
7779
|
-
__publicField(MastercardMapper, "toConsumer", (profileDetails) => {
|
|
7780
|
-
var _a, _b;
|
|
7781
|
-
const mastercardConsumer = {};
|
|
7782
|
-
if (profileDetails.firstName) {
|
|
7783
|
-
mastercardConsumer.firstName = profileDetails.firstName;
|
|
7784
|
-
}
|
|
7785
|
-
if (profileDetails.lastName) {
|
|
7786
|
-
mastercardConsumer.lastName = profileDetails.lastName;
|
|
7787
|
-
}
|
|
7788
|
-
if (profileDetails.email) {
|
|
7789
|
-
mastercardConsumer.emailAddress = profileDetails.email;
|
|
7683
|
+
let AmexSrci;
|
|
7684
|
+
class AmexService {
|
|
7685
|
+
static async init(params) {
|
|
7686
|
+
if (window.AmexSS === void 0) {
|
|
7687
|
+
throw Error("Amex SDK is not loaded.");
|
|
7688
|
+
}
|
|
7689
|
+
AmexSrci = window.AmexSS.getInstance();
|
|
7690
|
+
return await AmexSrci.init(params);
|
|
7790
7691
|
}
|
|
7791
|
-
|
|
7792
|
-
|
|
7793
|
-
countryCode: profileDetails.mobileNumber.countryCode,
|
|
7794
|
-
phoneNumber: profileDetails.mobileNumber.phoneNumber
|
|
7795
|
-
};
|
|
7692
|
+
static async isRecognized() {
|
|
7693
|
+
return await AmexSrci.isRecognized();
|
|
7796
7694
|
}
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
class AmexMapper {
|
|
7800
|
-
}
|
|
7801
|
-
/**
|
|
7802
|
-
* Populates the card object with required and optional profileDetails data.
|
|
7803
|
-
*/
|
|
7804
|
-
__publicField(AmexMapper, "toCardObject", (card, profileDetails) => {
|
|
7805
|
-
const amexCard = {
|
|
7806
|
-
primaryAccountNumber: card.primaryAccountNumber,
|
|
7807
|
-
panExpirationMonth: card.panExpirationMonth,
|
|
7808
|
-
panExpirationYear: card.panExpirationYear,
|
|
7809
|
-
cardSecurityCode: card.cardSecurityCode
|
|
7810
|
-
};
|
|
7811
|
-
if (!profileDetails) {
|
|
7812
|
-
return amexCard;
|
|
7695
|
+
static async getSrcProfile(params) {
|
|
7696
|
+
return await AmexSrci.getSrcProfile(params.idTokens);
|
|
7813
7697
|
}
|
|
7814
|
-
|
|
7815
|
-
|
|
7698
|
+
static async identityLookup(params) {
|
|
7699
|
+
return await AmexSrci.identityLookup(params);
|
|
7816
7700
|
}
|
|
7817
|
-
|
|
7818
|
-
|
|
7701
|
+
static async initiateIdentityValidation() {
|
|
7702
|
+
return await AmexSrci.initiateIdentityValidation();
|
|
7819
7703
|
}
|
|
7820
|
-
|
|
7821
|
-
|
|
7704
|
+
static async completeIdentityValidation(params) {
|
|
7705
|
+
return await AmexSrci.completeIdentityValidation(params);
|
|
7822
7706
|
}
|
|
7823
|
-
|
|
7824
|
-
|
|
7707
|
+
static async prepareCheckoutParams(params, activeEnvironmentState) {
|
|
7708
|
+
let checkoutParams = {
|
|
7709
|
+
windowRef: params.iframeRef
|
|
7710
|
+
};
|
|
7711
|
+
if (params.card) {
|
|
7712
|
+
const cardFilledWithProfileDetails = AmexMapper.toCardObject(params.card, params.profileDetails);
|
|
7713
|
+
const encryptedCard = await AmexEncryptionService.encryptCard(
|
|
7714
|
+
cardFilledWithProfileDetails,
|
|
7715
|
+
activeEnvironmentState
|
|
7716
|
+
);
|
|
7717
|
+
checkoutParams = {
|
|
7718
|
+
...checkoutParams,
|
|
7719
|
+
encryptedCard
|
|
7720
|
+
};
|
|
7721
|
+
}
|
|
7722
|
+
if (params.srcDigitalCardId) {
|
|
7723
|
+
checkoutParams = {
|
|
7724
|
+
...checkoutParams,
|
|
7725
|
+
srcDigitalCardId: params.srcDigitalCardId
|
|
7726
|
+
};
|
|
7727
|
+
}
|
|
7728
|
+
return checkoutParams;
|
|
7825
7729
|
}
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
let initMethodCounter = 0;
|
|
7829
|
-
const validateInitMethodCalls = () => {
|
|
7830
|
-
initMethodCounter++;
|
|
7831
|
-
if (initMethodCounter > 1) {
|
|
7832
|
-
console.error(
|
|
7833
|
-
"The SRC component was initialized more than once. This can lead to unexpected behaviour. The config property should be assigned only once."
|
|
7834
|
-
);
|
|
7730
|
+
static async checkout(params) {
|
|
7731
|
+
return await AmexSrci.checkout(params);
|
|
7835
7732
|
}
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
}
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
amexScript.async = true;
|
|
7865
|
-
amexScript.src = AmexSdkUrls.scriptUrl(activeEnvironmentState);
|
|
7866
|
-
amexScript.type = "text/javascript";
|
|
7867
|
-
document.body.appendChild(amexScript);
|
|
7868
|
-
amexScript.onload = () => resolve();
|
|
7869
|
-
amexScript.onerror = () => reject("Failed loading Amex SDK");
|
|
7870
|
-
});
|
|
7871
|
-
});
|
|
7733
|
+
static async unbindAppInstance(params) {
|
|
7734
|
+
return await AmexSrci.unbindAppInstance(params);
|
|
7735
|
+
}
|
|
7736
|
+
}
|
|
7737
|
+
__decorateClass$1([
|
|
7738
|
+
performanceMeasure(CreditCardBrand.AMEX, SDKPerformanceMethod.INIT)
|
|
7739
|
+
], AmexService, "init", 1);
|
|
7740
|
+
__decorateClass$1([
|
|
7741
|
+
performanceMeasure(CreditCardBrand.AMEX, SDKPerformanceMethod.IS_RECOGNIZED)
|
|
7742
|
+
], AmexService, "isRecognized", 1);
|
|
7743
|
+
__decorateClass$1([
|
|
7744
|
+
performanceMeasure(CreditCardBrand.AMEX, SDKPerformanceMethod.GET_SRC_PROFILE)
|
|
7745
|
+
], AmexService, "getSrcProfile", 1);
|
|
7746
|
+
__decorateClass$1([
|
|
7747
|
+
performanceMeasure(CreditCardBrand.AMEX, SDKPerformanceMethod.IDENTITY_LOOKUP)
|
|
7748
|
+
], AmexService, "identityLookup", 1);
|
|
7749
|
+
__decorateClass$1([
|
|
7750
|
+
performanceMeasure(CreditCardBrand.AMEX, SDKPerformanceMethod.INITIATE_IDENTITY_VALIDATION)
|
|
7751
|
+
], AmexService, "initiateIdentityValidation", 1);
|
|
7752
|
+
__decorateClass$1([
|
|
7753
|
+
performanceMeasure(CreditCardBrand.AMEX, SDKPerformanceMethod.COMPLETE_IDENTITY_VALIDATION)
|
|
7754
|
+
], AmexService, "completeIdentityValidation", 1);
|
|
7755
|
+
__decorateClass$1([
|
|
7756
|
+
performanceMeasure(CreditCardBrand.AMEX, SDKPerformanceMethod.CHECKOUT)
|
|
7757
|
+
], AmexService, "checkout", 1);
|
|
7758
|
+
__decorateClass$1([
|
|
7759
|
+
performanceMeasure(CreditCardBrand.AMEX, SDKPerformanceMethod.UNBIND_APP_INSTANCE)
|
|
7760
|
+
], AmexService, "unbindAppInstance", 1);
|
|
7872
7761
|
class OrchestratorCardBrandError extends Error {
|
|
7873
7762
|
constructor(source, message2, reason, details, status) {
|
|
7874
7763
|
super(message2);
|
|
@@ -8188,14 +8077,14 @@ const validateEnablePerformanceMeasurement = (enablePerformanceMeasurement) => {
|
|
|
8188
8077
|
return enablePerformanceMeasurement;
|
|
8189
8078
|
};
|
|
8190
8079
|
const validateIframe = (iframe) => {
|
|
8191
|
-
var
|
|
8080
|
+
var _a2, _b, _c, _d;
|
|
8192
8081
|
if (!iframe) {
|
|
8193
8082
|
return;
|
|
8194
8083
|
}
|
|
8195
8084
|
if (!(iframe == null ? void 0 : iframe.ref)) {
|
|
8196
8085
|
throw Error("Iframe configuration must have an iframe ref.");
|
|
8197
8086
|
}
|
|
8198
|
-
if (((
|
|
8087
|
+
if (((_a2 = iframe == null ? void 0 : iframe.handlers) == null ? void 0 : _a2.onDcfShow) === null || ((_b = iframe == null ? void 0 : iframe.handlers) == null ? void 0 : _b.onDcfHide) === null) {
|
|
8199
8088
|
throw Error('iframe parameter "handlers" must contain all required functions.');
|
|
8200
8089
|
}
|
|
8201
8090
|
if (typeof ((_c = iframe == null ? void 0 : iframe.handlers) == null ? void 0 : _c.onDcfShow) !== "function" || typeof ((_d = iframe == null ? void 0 : iframe.handlers) == null ? void 0 : _d.onDcfHide) !== "function") {
|
|
@@ -8260,12 +8149,12 @@ const isAnyOfTheSupportedCSSColorFormats = (value) => {
|
|
|
8260
8149
|
return hexRegex.test(value) || hslRegex.test(value) || hslaRegex.test(value) || rgbRegex.test(value) || rgbaRegex.test(value);
|
|
8261
8150
|
};
|
|
8262
8151
|
const validateSdkProps = (config) => {
|
|
8263
|
-
var
|
|
8152
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D;
|
|
8264
8153
|
if (!config) {
|
|
8265
8154
|
return;
|
|
8266
8155
|
}
|
|
8267
8156
|
const isMastercardEnabledFlag = isMastercardEnabled(
|
|
8268
|
-
(
|
|
8157
|
+
(_a2 = config == null ? void 0 : config.mastercard) == null ? void 0 : _a2.srcInitiatorId,
|
|
8269
8158
|
(_b = config == null ? void 0 : config.mastercard) == null ? void 0 : _b.srciDpaId
|
|
8270
8159
|
);
|
|
8271
8160
|
const isVisaEnabledFlag = isVisaEnabled(
|
|
@@ -8431,9 +8320,9 @@ const createActiveCreditCardBrandsStore = () => {
|
|
|
8431
8320
|
},
|
|
8432
8321
|
setActiveCreditCardBrands: (activeCreditCardBrands) => update2((state) => ({ ...state, activeCreditCardBrands })),
|
|
8433
8322
|
initActiveCreditCardBrandsStore: (parsedConfig) => {
|
|
8434
|
-
var
|
|
8323
|
+
var _a2, _b, _c, _d, _e, _f, _g;
|
|
8435
8324
|
const isMastercardEnabledFlag = isMastercardEnabled(
|
|
8436
|
-
(
|
|
8325
|
+
(_a2 = parsedConfig == null ? void 0 : parsedConfig.mastercard) == null ? void 0 : _a2.srcInitiatorId,
|
|
8437
8326
|
(_b = parsedConfig == null ? void 0 : parsedConfig.mastercard) == null ? void 0 : _b.srciDpaId
|
|
8438
8327
|
);
|
|
8439
8328
|
const isVisaEnabledFlag = isVisaEnabled(
|
|
@@ -8463,6 +8352,13 @@ const createActiveCreditCardBrandsStore = () => {
|
|
|
8463
8352
|
};
|
|
8464
8353
|
};
|
|
8465
8354
|
const activeCreditCardBrandsStore = createActiveCreditCardBrandsStore();
|
|
8355
|
+
class OrchestratorError extends Error {
|
|
8356
|
+
constructor(reason, message2) {
|
|
8357
|
+
super(message2);
|
|
8358
|
+
this.reason = reason;
|
|
8359
|
+
this.message = message2;
|
|
8360
|
+
}
|
|
8361
|
+
}
|
|
8466
8362
|
const prepareMastercardSdk = async (config, activeEnvironmentState, transactionId) => {
|
|
8467
8363
|
try {
|
|
8468
8364
|
await SDKLoader.loadMastercardSDK(activeEnvironmentState);
|
|
@@ -8520,9 +8416,9 @@ const createIsRecognizedPromise = (cardBrandSpecificIsRecognizedMethod, creditCa
|
|
|
8520
8416
|
);
|
|
8521
8417
|
};
|
|
8522
8418
|
const prepareMastercardDpaTransactionOptions = (dpaTransactionOptions) => {
|
|
8523
|
-
var
|
|
8419
|
+
var _a2;
|
|
8524
8420
|
let mastercardDpaTransactionOptions = dpaTransactionOptions ? dpaTransactionOptions : get_store_value(dpaTransactionOptionsStore).dpaTransactionOptions.mastercardDpaTransactionOptions;
|
|
8525
|
-
if (!mastercardDpaTransactionOptions.transactionAmount && ((
|
|
8421
|
+
if (!mastercardDpaTransactionOptions.transactionAmount && ((_a2 = get_store_value(merchantConfigStore)) == null ? void 0 : _a2.transactionAmount)) {
|
|
8526
8422
|
mastercardDpaTransactionOptions = {
|
|
8527
8423
|
...mastercardDpaTransactionOptions,
|
|
8528
8424
|
transactionAmount: {
|
|
@@ -8611,8 +8507,8 @@ const createGetSrcProfilePromise = (cardBrandSpecificGetSrcProfileMethod, params
|
|
|
8611
8507
|
);
|
|
8612
8508
|
};
|
|
8613
8509
|
const shouldSendSrcProfileRequestTo = (cardBrand, params) => {
|
|
8614
|
-
var
|
|
8615
|
-
return params.exclusiveCardBrandsToRequest === void 0 || !!params.exclusiveCardBrandsToRequest && ((
|
|
8510
|
+
var _a2;
|
|
8511
|
+
return params.exclusiveCardBrandsToRequest === void 0 || !!params.exclusiveCardBrandsToRequest && ((_a2 = params.exclusiveCardBrandsToRequest) == null ? void 0 : _a2.includes(cardBrand));
|
|
8616
8512
|
};
|
|
8617
8513
|
const createIdentityLookupPromise = (cardBrandSpecificIdentityLookupMethod, params, creditCardBrand) => {
|
|
8618
8514
|
return new Promise(
|
|
@@ -8646,9 +8542,9 @@ const initRejectedPromiseAction = (source) => {
|
|
|
8646
8542
|
}
|
|
8647
8543
|
};
|
|
8648
8544
|
const isRecognisedFulfilledPromiseAction = (response, promiseResponses) => {
|
|
8649
|
-
var
|
|
8545
|
+
var _a2, _b;
|
|
8650
8546
|
const isRecognizedResponse = promiseResponses.length > 0 ? promiseResponses[0] : { idTokens: [], userIsRecognizedIn: [] };
|
|
8651
|
-
if ((
|
|
8547
|
+
if ((_a2 = response.cardBrandSpecificResponse) == null ? void 0 : _a2.recognized) {
|
|
8652
8548
|
const idTokens = ((_b = response.cardBrandSpecificResponse) == null ? void 0 : _b.idTokens) || [];
|
|
8653
8549
|
isRecognizedResponse.idTokens.push(...idTokens);
|
|
8654
8550
|
isRecognizedResponse.userIsRecognizedIn.push(response.creditCardBrand);
|
|
@@ -8662,9 +8558,9 @@ const getSrcProfileFulfilledPromiseAction = (response, promiseResponses) => {
|
|
|
8662
8558
|
}
|
|
8663
8559
|
};
|
|
8664
8560
|
const identityLookupPromiseAction = (response, promiseResponses) => {
|
|
8665
|
-
var
|
|
8561
|
+
var _a2;
|
|
8666
8562
|
const identityLookupResponse = promiseResponses.length > 0 ? promiseResponses[0] : { consumerPresent: false, userIsRecognizedIn: [] };
|
|
8667
|
-
if ((
|
|
8563
|
+
if ((_a2 = response.cardBrandSpecificResponse) == null ? void 0 : _a2.consumerPresent) {
|
|
8668
8564
|
identityLookupResponse.consumerPresent = true;
|
|
8669
8565
|
identityLookupResponse.userIsRecognizedIn.push(response.creditCardBrand);
|
|
8670
8566
|
}
|
|
@@ -8719,122 +8615,209 @@ const isVisaCardBrand = (cardBrand) => {
|
|
|
8719
8615
|
const isAmexCardBrand = (cardBrand) => {
|
|
8720
8616
|
return cardBrand === CreditCardBrand.AMEX;
|
|
8721
8617
|
};
|
|
8722
|
-
const
|
|
8723
|
-
const firstPart = email2.split("@")[0];
|
|
8724
|
-
const secondPart = email2.split("@")[1];
|
|
8725
|
-
const firstCharacter = firstPart.at(0);
|
|
8726
|
-
const lastCharacter = firstPart.length > 1 ? firstPart.at(firstPart.length - 1) : "";
|
|
8727
|
-
return firstCharacter + "****" + lastCharacter + "@" + secondPart;
|
|
8618
|
+
const _MastercardEncryptionService = class {
|
|
8728
8619
|
};
|
|
8729
|
-
|
|
8730
|
-
|
|
8731
|
-
|
|
8732
|
-
|
|
8620
|
+
let MastercardEncryptionService = _MastercardEncryptionService;
|
|
8621
|
+
/**
|
|
8622
|
+
* Encrypts a given card form the user using the Mastercard encryption.
|
|
8623
|
+
*
|
|
8624
|
+
* @param card The provided credit card from the user.
|
|
8625
|
+
* @param activeEnvironmentState The active current environment
|
|
8626
|
+
*/
|
|
8627
|
+
__publicField(MastercardEncryptionService, "encryptCard", async (card, activeEnvironmentState) => {
|
|
8628
|
+
const encoder2 = new TextEncoder();
|
|
8629
|
+
const panKey = await _MastercardEncryptionService.getFpanKey(activeEnvironmentState);
|
|
8630
|
+
const rsaPublicKey = await importJWK(panKey);
|
|
8631
|
+
return await new CompactEncrypt(encoder2.encode(JSON.stringify(card))).setProtectedHeader({
|
|
8632
|
+
alg: "RSA-OAEP-256",
|
|
8633
|
+
enc: "A128GCM",
|
|
8634
|
+
kid: panKey.kid
|
|
8635
|
+
}).encrypt(rsaPublicKey);
|
|
8636
|
+
});
|
|
8637
|
+
/**
|
|
8638
|
+
* Extracts the FPAN key from the Mastercard jwk response.
|
|
8639
|
+
*
|
|
8640
|
+
* @throws When the fpan key is not found from the Mastercard jwk response.
|
|
8641
|
+
*/
|
|
8642
|
+
__publicField(MastercardEncryptionService, "getFpanKey", async (activeEnvironmentState) => {
|
|
8643
|
+
const mastercardJwk = await _MastercardEncryptionService.getJwk(activeEnvironmentState);
|
|
8644
|
+
const fpanIdentifierSuffix = `${activeEnvironmentState === Environment.SANDBOX ? "sandbox" : "prod"}-fpan-encryption-src-mastercard-int`;
|
|
8645
|
+
const fpanJwk = mastercardJwk.keys.find((jwk) => jwk.kid.endsWith(fpanIdentifierSuffix));
|
|
8646
|
+
if (fpanJwk === void 0) {
|
|
8647
|
+
throw Error("Mastercard Service was unable to retrieve the FPAN key from Mastercard SDK.");
|
|
8733
8648
|
}
|
|
8734
|
-
|
|
8735
|
-
|
|
8736
|
-
|
|
8737
|
-
|
|
8738
|
-
|
|
8649
|
+
return fpanJwk;
|
|
8650
|
+
});
|
|
8651
|
+
/**
|
|
8652
|
+
* Gets the MC jwk(s).
|
|
8653
|
+
*/
|
|
8654
|
+
__publicField(MastercardEncryptionService, "getJwk", async (activeEnvironmentState) => {
|
|
8655
|
+
const jwkResponse = await fetch(MastercardSdkUrls.encryptionUrl(activeEnvironmentState));
|
|
8656
|
+
return await jwkResponse.json();
|
|
8657
|
+
});
|
|
8658
|
+
var __defProp2 = Object.defineProperty;
|
|
8659
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8660
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
8661
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
8662
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8663
|
+
if (decorator = decorators[i])
|
|
8664
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8665
|
+
if (kind && result)
|
|
8666
|
+
__defProp2(target, key, result);
|
|
8667
|
+
return result;
|
|
8668
|
+
};
|
|
8669
|
+
class MastercardService {
|
|
8670
|
+
static async init(params) {
|
|
8671
|
+
if (window.SRCSDK_MASTERCARD === void 0) {
|
|
8672
|
+
throw new Error("Mastercard SDK is not loaded.");
|
|
8739
8673
|
}
|
|
8740
|
-
return
|
|
8674
|
+
return await window.SRCSDK_MASTERCARD.init(params);
|
|
8741
8675
|
}
|
|
8742
|
-
|
|
8743
|
-
|
|
8744
|
-
if (visaProfiles.length === 0) {
|
|
8745
|
-
return void 0;
|
|
8746
|
-
}
|
|
8747
|
-
return visaProfiles[0].maskedConsumer.emailAddress;
|
|
8676
|
+
static async isRecognized() {
|
|
8677
|
+
return await window.SRCSDK_MASTERCARD.isRecognized();
|
|
8748
8678
|
}
|
|
8749
|
-
|
|
8750
|
-
|
|
8751
|
-
if (amexProfiles.length === 0) {
|
|
8752
|
-
return void 0;
|
|
8753
|
-
}
|
|
8754
|
-
return (_c = (_b = (_a = amexProfiles[0]) == null ? void 0 : _a.maskedConsumer) == null ? void 0 : _b.maskedConsumerIdentity) == null ? void 0 : _c.maskedIdentityValue;
|
|
8679
|
+
static async getSrcProfile(params) {
|
|
8680
|
+
return await window.SRCSDK_MASTERCARD.getSrcProfile(params);
|
|
8755
8681
|
}
|
|
8756
|
-
|
|
8757
|
-
|
|
8758
|
-
|
|
8759
|
-
|
|
8760
|
-
|
|
8761
|
-
|
|
8762
|
-
|
|
8763
|
-
|
|
8764
|
-
|
|
8765
|
-
|
|
8766
|
-
|
|
8767
|
-
|
|
8768
|
-
|
|
8769
|
-
|
|
8770
|
-
|
|
8771
|
-
|
|
8772
|
-
|
|
8773
|
-
|
|
8774
|
-
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
}
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
|
|
8784
|
-
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
|
|
8788
|
-
|
|
8789
|
-
|
|
8790
|
-
|
|
8791
|
-
|
|
8792
|
-
return {
|
|
8793
|
-
...value,
|
|
8794
|
-
srcCorrelationIds: getSrcCorrelationIdsForSchemes(srcProfileResponse),
|
|
8795
|
-
profilesByVendor: srcProfileResponse,
|
|
8796
|
-
recognizedUserMaskedEmail: getMaskedEmailFromProfile(srcProfileResponse)
|
|
8797
|
-
};
|
|
8798
|
-
});
|
|
8799
|
-
},
|
|
8800
|
-
forgetUser: () => {
|
|
8801
|
-
update2(() => {
|
|
8802
|
-
return {
|
|
8803
|
-
profilesByVendor: void 0,
|
|
8804
|
-
idToken: void 0,
|
|
8805
|
-
srcCorrelationId: void 0,
|
|
8806
|
-
identityValidationMaskedChannel: void 0,
|
|
8807
|
-
userIsRecognizedIn: void 0,
|
|
8808
|
-
recognizedUserMaskedEmail: void 0,
|
|
8809
|
-
email: void 0
|
|
8682
|
+
static async identityLookup(params) {
|
|
8683
|
+
return await window.SRCSDK_MASTERCARD.identityLookup(params);
|
|
8684
|
+
}
|
|
8685
|
+
static async initiateIdentityValidation(params) {
|
|
8686
|
+
return await window.SRCSDK_MASTERCARD.initiateIdentityValidation(params);
|
|
8687
|
+
}
|
|
8688
|
+
static async completeIdentityValidation(params) {
|
|
8689
|
+
return await window.SRCSDK_MASTERCARD.completeIdentityValidation(params);
|
|
8690
|
+
}
|
|
8691
|
+
static async prepareCheckoutParams(params, activeEnvironmentState) {
|
|
8692
|
+
var _a2;
|
|
8693
|
+
const consumer = params.profileDetails ? MastercardMapper.toConsumer(params.profileDetails) : void 0;
|
|
8694
|
+
const dpaTransactionOptions = prepareMastercardDpaTransactionOptions(
|
|
8695
|
+
params.dpaTransactionOptions
|
|
8696
|
+
);
|
|
8697
|
+
const complianceSettings = prepareMastercardComplianceSettings(
|
|
8698
|
+
params.skipVerificationNextTime,
|
|
8699
|
+
!!params.card
|
|
8700
|
+
);
|
|
8701
|
+
let checkoutParams = {
|
|
8702
|
+
windowRef: (_a2 = params.iframeRef) == null ? void 0 : _a2.contentWindow,
|
|
8703
|
+
consumer,
|
|
8704
|
+
dpaTransactionOptions,
|
|
8705
|
+
complianceSettings
|
|
8706
|
+
};
|
|
8707
|
+
if (params.card) {
|
|
8708
|
+
const cardFilledWithProfileDetails = MastercardMapper.toCardObject(params.card, params.profileDetails);
|
|
8709
|
+
const encryptedCard = await MastercardEncryptionService.encryptCard(
|
|
8710
|
+
cardFilledWithProfileDetails,
|
|
8711
|
+
activeEnvironmentState
|
|
8712
|
+
);
|
|
8713
|
+
const orchestratorState = get_store_value(orchestratorStore);
|
|
8714
|
+
if (orchestratorState && !!orchestratorState.idToken) {
|
|
8715
|
+
checkoutParams = {
|
|
8716
|
+
...checkoutParams,
|
|
8717
|
+
idToken: orchestratorState.idToken.length > 0 ? orchestratorState.idToken[0] : void 0
|
|
8810
8718
|
};
|
|
8811
|
-
}
|
|
8719
|
+
}
|
|
8720
|
+
checkoutParams = {
|
|
8721
|
+
...checkoutParams,
|
|
8722
|
+
encryptedCard
|
|
8723
|
+
};
|
|
8812
8724
|
}
|
|
8813
|
-
|
|
8725
|
+
if (params.srcDigitalCardId) {
|
|
8726
|
+
checkoutParams = {
|
|
8727
|
+
...checkoutParams,
|
|
8728
|
+
srcDigitalCardId: params.srcDigitalCardId
|
|
8729
|
+
};
|
|
8730
|
+
}
|
|
8731
|
+
return checkoutParams;
|
|
8732
|
+
}
|
|
8733
|
+
static async checkout(params) {
|
|
8734
|
+
return await window.SRCSDK_MASTERCARD.checkout(params);
|
|
8735
|
+
}
|
|
8736
|
+
static async unbindAppInstance(params) {
|
|
8737
|
+
return await window.SRCSDK_MASTERCARD.unbindAppInstance(params);
|
|
8738
|
+
}
|
|
8739
|
+
}
|
|
8740
|
+
__decorateClass([
|
|
8741
|
+
performanceMeasure(CreditCardBrand.MASTERCARD, SDKPerformanceMethod.INIT)
|
|
8742
|
+
], MastercardService, "init", 1);
|
|
8743
|
+
__decorateClass([
|
|
8744
|
+
performanceMeasure(CreditCardBrand.MASTERCARD, SDKPerformanceMethod.IS_RECOGNIZED)
|
|
8745
|
+
], MastercardService, "isRecognized", 1);
|
|
8746
|
+
__decorateClass([
|
|
8747
|
+
performanceMeasure(CreditCardBrand.MASTERCARD, SDKPerformanceMethod.GET_SRC_PROFILE)
|
|
8748
|
+
], MastercardService, "getSrcProfile", 1);
|
|
8749
|
+
__decorateClass([
|
|
8750
|
+
performanceMeasure(CreditCardBrand.MASTERCARD, SDKPerformanceMethod.IDENTITY_LOOKUP)
|
|
8751
|
+
], MastercardService, "identityLookup", 1);
|
|
8752
|
+
__decorateClass([
|
|
8753
|
+
performanceMeasure(CreditCardBrand.MASTERCARD, SDKPerformanceMethod.INITIATE_IDENTITY_VALIDATION)
|
|
8754
|
+
], MastercardService, "initiateIdentityValidation", 1);
|
|
8755
|
+
__decorateClass([
|
|
8756
|
+
performanceMeasure(CreditCardBrand.MASTERCARD, SDKPerformanceMethod.COMPLETE_IDENTITY_VALIDATION)
|
|
8757
|
+
], MastercardService, "completeIdentityValidation", 1);
|
|
8758
|
+
__decorateClass([
|
|
8759
|
+
performanceMeasure(CreditCardBrand.MASTERCARD, SDKPerformanceMethod.CHECKOUT)
|
|
8760
|
+
], MastercardService, "checkout", 1);
|
|
8761
|
+
__decorateClass([
|
|
8762
|
+
performanceMeasure(CreditCardBrand.MASTERCARD, SDKPerformanceMethod.UNBIND_APP_INSTANCE)
|
|
8763
|
+
], MastercardService, "unbindAppInstance", 1);
|
|
8764
|
+
let getRandomValues;
|
|
8765
|
+
const rnds8 = new Uint8Array(16);
|
|
8766
|
+
function rng() {
|
|
8767
|
+
if (!getRandomValues) {
|
|
8768
|
+
getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
8769
|
+
if (!getRandomValues) {
|
|
8770
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
8771
|
+
}
|
|
8772
|
+
}
|
|
8773
|
+
return getRandomValues(rnds8);
|
|
8774
|
+
}
|
|
8775
|
+
const byteToHex = [];
|
|
8776
|
+
for (let i = 0; i < 256; ++i) {
|
|
8777
|
+
byteToHex.push((i + 256).toString(16).slice(1));
|
|
8778
|
+
}
|
|
8779
|
+
function unsafeStringify(arr, offset = 0) {
|
|
8780
|
+
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
8781
|
+
}
|
|
8782
|
+
const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
8783
|
+
const native = {
|
|
8784
|
+
randomUUID
|
|
8814
8785
|
};
|
|
8815
|
-
|
|
8816
|
-
|
|
8817
|
-
|
|
8818
|
-
|
|
8786
|
+
function v4(options, buf, offset) {
|
|
8787
|
+
if (native.randomUUID && !buf && !options) {
|
|
8788
|
+
return native.randomUUID();
|
|
8789
|
+
}
|
|
8790
|
+
options = options || {};
|
|
8791
|
+
const rnds = options.random || (options.rng || rng)();
|
|
8792
|
+
rnds[6] = rnds[6] & 15 | 64;
|
|
8793
|
+
rnds[8] = rnds[8] & 63 | 128;
|
|
8794
|
+
if (buf) {
|
|
8795
|
+
offset = offset || 0;
|
|
8796
|
+
for (let i = 0; i < 16; ++i) {
|
|
8797
|
+
buf[offset + i] = rnds[i];
|
|
8798
|
+
}
|
|
8799
|
+
return buf;
|
|
8800
|
+
}
|
|
8801
|
+
return unsafeStringify(rnds);
|
|
8802
|
+
}
|
|
8803
|
+
const maskedPhoneNumberToString = (maskedPhoneNumber) => {
|
|
8804
|
+
return `+(${maskedPhoneNumber.countryCode}) ${maskedPhoneNumber.phoneNumber}`;
|
|
8819
8805
|
};
|
|
8820
|
-
const
|
|
8821
|
-
|
|
8822
|
-
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
])
|
|
8826
|
-
]);
|
|
8806
|
+
const toMaskedValidationChannel = (ambiguousMaskedValidationChannel) => {
|
|
8807
|
+
if (typeof ambiguousMaskedValidationChannel === "object") {
|
|
8808
|
+
return maskedPhoneNumberToString(ambiguousMaskedValidationChannel);
|
|
8809
|
+
}
|
|
8810
|
+
return ambiguousMaskedValidationChannel;
|
|
8827
8811
|
};
|
|
8828
|
-
|
|
8829
|
-
|
|
8830
|
-
|
|
8831
|
-
|
|
8832
|
-
|
|
8833
|
-
|
|
8834
|
-
|
|
8835
|
-
}
|
|
8812
|
+
let initMethodCounter = 0;
|
|
8813
|
+
const validateInitMethodCalls = () => {
|
|
8814
|
+
initMethodCounter++;
|
|
8815
|
+
if (initMethodCounter > 1) {
|
|
8816
|
+
console.error(
|
|
8817
|
+
"The SRC component was initialized more than once. This can lead to unexpected behaviour. The config property should be assigned only once."
|
|
8818
|
+
);
|
|
8819
|
+
}
|
|
8836
8820
|
};
|
|
8837
|
-
const schemeConfigStore = createSchemeConfigStore();
|
|
8838
8821
|
const _Orchestrator = class {
|
|
8839
8822
|
};
|
|
8840
8823
|
let Orchestrator = _Orchestrator;
|
|
@@ -8912,48 +8895,10 @@ __publicField(Orchestrator, "identityLookup", async (params) => {
|
|
|
8912
8895
|
return result[0];
|
|
8913
8896
|
});
|
|
8914
8897
|
__publicField(Orchestrator, "checkout", async (params) => {
|
|
8915
|
-
var _a, _b;
|
|
8916
8898
|
const creditCardBrand = params.creditCardBrand;
|
|
8917
8899
|
if (isMastercardCardBrand(creditCardBrand)) {
|
|
8918
|
-
let mastercardCheckoutResponse
|
|
8919
|
-
const
|
|
8920
|
-
const dpaTransactionOptions = prepareMastercardDpaTransactionOptions(
|
|
8921
|
-
params.dpaTransactionOptions
|
|
8922
|
-
);
|
|
8923
|
-
const complianceSettings = prepareMastercardComplianceSettings(
|
|
8924
|
-
params.skipVerificationNextTime,
|
|
8925
|
-
!!params.card
|
|
8926
|
-
);
|
|
8927
|
-
let checkoutParams = {
|
|
8928
|
-
windowRef: (_a = params.iframeRef) == null ? void 0 : _a.contentWindow,
|
|
8929
|
-
consumer,
|
|
8930
|
-
dpaTransactionOptions,
|
|
8931
|
-
complianceSettings
|
|
8932
|
-
};
|
|
8933
|
-
if (params.card) {
|
|
8934
|
-
const cardFilledWithProfileDetails = MastercardMapper.toCardObject(params.card, params.profileDetails);
|
|
8935
|
-
const encryptedCard = await MastercardEncryptionService.encryptCard(
|
|
8936
|
-
cardFilledWithProfileDetails,
|
|
8937
|
-
_Orchestrator.activeEnvironmentState
|
|
8938
|
-
);
|
|
8939
|
-
const orchestratorState = get_store_value(orchestratorStore);
|
|
8940
|
-
if (orchestratorState && !!orchestratorState.idToken) {
|
|
8941
|
-
checkoutParams = {
|
|
8942
|
-
...checkoutParams,
|
|
8943
|
-
idToken: orchestratorState.idToken.length > 0 ? orchestratorState.idToken[0] : void 0
|
|
8944
|
-
};
|
|
8945
|
-
}
|
|
8946
|
-
checkoutParams = {
|
|
8947
|
-
...checkoutParams,
|
|
8948
|
-
encryptedCard
|
|
8949
|
-
};
|
|
8950
|
-
}
|
|
8951
|
-
if (params.srcDigitalCardId) {
|
|
8952
|
-
checkoutParams = {
|
|
8953
|
-
...checkoutParams,
|
|
8954
|
-
srcDigitalCardId: params.srcDigitalCardId
|
|
8955
|
-
};
|
|
8956
|
-
}
|
|
8900
|
+
let mastercardCheckoutResponse;
|
|
8901
|
+
const checkoutParams = await MastercardService.prepareCheckoutParams(params, _Orchestrator.activeEnvironmentState);
|
|
8957
8902
|
try {
|
|
8958
8903
|
mastercardCheckoutResponse = await MastercardService.checkout(checkoutParams);
|
|
8959
8904
|
} catch (e) {
|
|
@@ -8969,76 +8914,11 @@ __publicField(Orchestrator, "checkout", async (params) => {
|
|
|
8969
8914
|
idToken: [mastercardCheckoutResponse.idToken]
|
|
8970
8915
|
});
|
|
8971
8916
|
}
|
|
8972
|
-
return
|
|
8973
|
-
userAction: mastercardCheckoutResponse.dcfActionCode,
|
|
8974
|
-
srcCorrelationId: (_b = mastercardCheckoutResponse == null ? void 0 : mastercardCheckoutResponse.checkoutResponse) == null ? void 0 : _b.srcCorrelationId,
|
|
8975
|
-
checkoutResponseSignature: mastercardCheckoutResponse == null ? void 0 : mastercardCheckoutResponse.checkoutResponseSignature,
|
|
8976
|
-
creditCardBrand: CreditCardBrand.MASTERCARD,
|
|
8977
|
-
performance: void 0
|
|
8978
|
-
};
|
|
8917
|
+
return MastercardMapper.toCheckoutResponse(mastercardCheckoutResponse);
|
|
8979
8918
|
}
|
|
8980
8919
|
if (isVisaCardBrand(creditCardBrand)) {
|
|
8981
|
-
let visaCheckoutResponse
|
|
8982
|
-
const
|
|
8983
|
-
const dpaTransactionOptions = prepareVisaDpaTransactionOptions(
|
|
8984
|
-
params.dpaTransactionOptions
|
|
8985
|
-
);
|
|
8986
|
-
const complianceSettings = prepareVisaComplianceSettings(
|
|
8987
|
-
params.skipVerificationNextTime,
|
|
8988
|
-
!!params.card,
|
|
8989
|
-
params.complianceResourceURLs
|
|
8990
|
-
);
|
|
8991
|
-
const visaInitConfig = get_store_value(schemeConfigStore).config.visa;
|
|
8992
|
-
const authenticationContext = {
|
|
8993
|
-
authenticationReasons: [
|
|
8994
|
-
visaInitConfig.threeDSOptions.authenticationReason ? visaInitConfig.threeDSOptions.authenticationReason : VisaAuthenticationReasonEnum.TRANSACTION_AUTHENTICATION
|
|
8995
|
-
],
|
|
8996
|
-
srciDpaId: visaInitConfig.srciDpaId,
|
|
8997
|
-
acquirerMerchantId: visaInitConfig.threeDSOptions.acquirerMerchantId,
|
|
8998
|
-
acquirerBIN: visaInitConfig.threeDSOptions.acquirerBIN,
|
|
8999
|
-
merchantName: visaInitConfig.threeDSOptions.merchantName
|
|
9000
|
-
};
|
|
9001
|
-
const authenticationMethod = {
|
|
9002
|
-
authenticationMethodType: VisaAuthenticationMethodTypeEnum.MANAGED_AUTHENTICATION,
|
|
9003
|
-
authenticationSubject: VisaAuthenticationSubjectEnum.CARDHOLDER,
|
|
9004
|
-
methodAttributes: {
|
|
9005
|
-
challengeIndicator: visaInitConfig.threeDSOptions.challengeIndicator
|
|
9006
|
-
}
|
|
9007
|
-
};
|
|
9008
|
-
let checkoutParams = {
|
|
9009
|
-
srciTransactionId: _Orchestrator.transactionId,
|
|
9010
|
-
consumer,
|
|
9011
|
-
dpaTransactionOptions,
|
|
9012
|
-
complianceSettings,
|
|
9013
|
-
authenticationContext,
|
|
9014
|
-
authenticationMethod
|
|
9015
|
-
};
|
|
9016
|
-
if (params.card) {
|
|
9017
|
-
const cardFilledWithProfileDetails = VisaMapper.toCardObject(params.card, params.profileDetails);
|
|
9018
|
-
const encryptedCard = await VisaEncryptionService.encryptCard(
|
|
9019
|
-
cardFilledWithProfileDetails,
|
|
9020
|
-
VisaService.visaEncryptionKey,
|
|
9021
|
-
VisaService.visaNModulus
|
|
9022
|
-
);
|
|
9023
|
-
const orchestratorState = get_store_value(orchestratorStore);
|
|
9024
|
-
if (orchestratorState && !!orchestratorState.idToken && !!orchestratorState.srcCorrelationIds) {
|
|
9025
|
-
checkoutParams = {
|
|
9026
|
-
...checkoutParams,
|
|
9027
|
-
idToken: orchestratorState.idToken.length > 0 ? orchestratorState.idToken[0] : void 0,
|
|
9028
|
-
srcCorrelationId: orchestratorState.srcCorrelationIds.get(CreditCardBrand.VISA)
|
|
9029
|
-
};
|
|
9030
|
-
}
|
|
9031
|
-
checkoutParams = {
|
|
9032
|
-
...checkoutParams,
|
|
9033
|
-
encryptedCard
|
|
9034
|
-
};
|
|
9035
|
-
}
|
|
9036
|
-
if (params.srcDigitalCardId) {
|
|
9037
|
-
checkoutParams = {
|
|
9038
|
-
...checkoutParams,
|
|
9039
|
-
srcDigitalCardId: params.srcDigitalCardId
|
|
9040
|
-
};
|
|
9041
|
-
}
|
|
8920
|
+
let visaCheckoutResponse;
|
|
8921
|
+
const checkoutParams = await VisaService.prepareCheckoutParams(params, _Orchestrator.transactionId);
|
|
9042
8922
|
try {
|
|
9043
8923
|
visaCheckoutResponse = await VisaService.checkout(checkoutParams);
|
|
9044
8924
|
} catch (e) {
|
|
@@ -9054,42 +8934,19 @@ __publicField(Orchestrator, "checkout", async (params) => {
|
|
|
9054
8934
|
idToken: [visaCheckoutResponse.idToken]
|
|
9055
8935
|
});
|
|
9056
8936
|
}
|
|
9057
|
-
return
|
|
9058
|
-
userAction: visaCheckoutResponse.dcfActionCode,
|
|
9059
|
-
checkoutResponseSignature: visaCheckoutResponse == null ? void 0 : visaCheckoutResponse.checkoutResponse,
|
|
9060
|
-
srcCorrelationId: void 0,
|
|
9061
|
-
creditCardBrand: CreditCardBrand.VISA,
|
|
9062
|
-
performance: void 0
|
|
9063
|
-
};
|
|
8937
|
+
return VisaMapper.toCheckoutResponse(visaCheckoutResponse);
|
|
9064
8938
|
}
|
|
9065
8939
|
if (isAmexCardBrand(creditCardBrand)) {
|
|
9066
|
-
let amexCheckoutResponse
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
|
|
9071
|
-
|
|
9072
|
-
);
|
|
9073
|
-
|
|
9074
|
-
|
|
9075
|
-
|
|
9076
|
-
windowRef: params.iframeRef
|
|
9077
|
-
});
|
|
9078
|
-
} catch (e) {
|
|
9079
|
-
const error = e;
|
|
9080
|
-
throw new OrchestratorError(error.reason, error.message);
|
|
9081
|
-
}
|
|
9082
|
-
}
|
|
9083
|
-
if (params.srcDigitalCardId) {
|
|
9084
|
-
try {
|
|
9085
|
-
amexCheckoutResponse = await AmexService.checkout({
|
|
9086
|
-
srcDigitalCardId: params.srcDigitalCardId,
|
|
9087
|
-
windowRef: params.iframeRef
|
|
9088
|
-
});
|
|
9089
|
-
} catch (e) {
|
|
9090
|
-
const error = e;
|
|
9091
|
-
throw new OrchestratorError(error.reason, error.message);
|
|
9092
|
-
}
|
|
8940
|
+
let amexCheckoutResponse;
|
|
8941
|
+
const checkoutParams = await AmexService.prepareCheckoutParams(
|
|
8942
|
+
params,
|
|
8943
|
+
_Orchestrator.activeEnvironmentState
|
|
8944
|
+
);
|
|
8945
|
+
try {
|
|
8946
|
+
amexCheckoutResponse = await AmexService.checkout(checkoutParams);
|
|
8947
|
+
} catch (e) {
|
|
8948
|
+
const error = e;
|
|
8949
|
+
throw new OrchestratorError(error.reason, error.message);
|
|
9093
8950
|
}
|
|
9094
8951
|
if (amexCheckoutResponse === void 0) {
|
|
9095
8952
|
throw Error("Unknown params passed to checkout method on amex SDK.");
|
|
@@ -9100,13 +8957,7 @@ __publicField(Orchestrator, "checkout", async (params) => {
|
|
|
9100
8957
|
idToken: [amexCheckoutResponse.idToken]
|
|
9101
8958
|
});
|
|
9102
8959
|
}
|
|
9103
|
-
return
|
|
9104
|
-
userAction: amexCheckoutResponse.dcfActionCode,
|
|
9105
|
-
checkoutResponseSignature: amexCheckoutResponse == null ? void 0 : amexCheckoutResponse.checkoutResponse,
|
|
9106
|
-
srcCorrelationId: void 0,
|
|
9107
|
-
creditCardBrand: CreditCardBrand.AMEX,
|
|
9108
|
-
performance: void 0
|
|
9109
|
-
};
|
|
8960
|
+
return AmexMapper.toCheckoutResponse(amexCheckoutResponse);
|
|
9110
8961
|
}
|
|
9111
8962
|
throw Error("Unknown credit card brand");
|
|
9112
8963
|
});
|
|
@@ -9261,12 +9112,12 @@ __publicField(CardSubmitService, "handleCardSubmit", async () => {
|
|
|
9261
9112
|
srcLoadingStore.done();
|
|
9262
9113
|
});
|
|
9263
9114
|
__publicField(CardSubmitService, "handleCheckout", async (selectedCreditCard) => {
|
|
9264
|
-
var
|
|
9115
|
+
var _a2;
|
|
9265
9116
|
try {
|
|
9266
9117
|
const checkoutResponse = await Orchestrator.checkout({
|
|
9267
9118
|
srcDigitalCardId: selectedCreditCard.maskedCard.srcDigitalCardId,
|
|
9268
9119
|
creditCardBrand: selectedCreditCard.creditCardBrand,
|
|
9269
|
-
iframeRef: (
|
|
9120
|
+
iframeRef: (_a2 = get_store_value(dcfWindowStore).iframe) == null ? void 0 : _a2.ref,
|
|
9270
9121
|
skipVerificationNextTime: get_store_value(skipVerificationNextTimeStore).skipVerificationNextTime
|
|
9271
9122
|
});
|
|
9272
9123
|
await DcfHandlerService.handleDCFResponse(checkoutResponse);
|
|
@@ -9285,7 +9136,7 @@ function add_css$h(target) {
|
|
|
9285
9136
|
}
|
|
9286
9137
|
function get_each_context$1(ctx, list, i) {
|
|
9287
9138
|
const child_ctx = ctx.slice();
|
|
9288
|
-
child_ctx[
|
|
9139
|
+
child_ctx[20] = list[i];
|
|
9289
9140
|
return child_ctx;
|
|
9290
9141
|
}
|
|
9291
9142
|
function create_if_block_5(ctx) {
|
|
@@ -9458,10 +9309,10 @@ function create_each_block$1(ctx) {
|
|
|
9458
9309
|
checked: !/*allCardsExpired*/
|
|
9459
9310
|
ctx[9] && /*selectedCreditCard*/
|
|
9460
9311
|
ctx[0].maskedCard.srcDigitalCardId === /*card*/
|
|
9461
|
-
ctx[
|
|
9312
|
+
ctx[20].maskedCard.srcDigitalCardId,
|
|
9462
9313
|
card: (
|
|
9463
9314
|
/*card*/
|
|
9464
|
-
ctx[
|
|
9315
|
+
ctx[20]
|
|
9465
9316
|
),
|
|
9466
9317
|
onSelectCard: (
|
|
9467
9318
|
/*handleOnSelectCard*/
|
|
@@ -9493,11 +9344,11 @@ function create_each_block$1(ctx) {
|
|
|
9493
9344
|
creditcard_changes.checked = !/*allCardsExpired*/
|
|
9494
9345
|
ctx2[9] && /*selectedCreditCard*/
|
|
9495
9346
|
ctx2[0].maskedCard.srcDigitalCardId === /*card*/
|
|
9496
|
-
ctx2[
|
|
9347
|
+
ctx2[20].maskedCard.srcDigitalCardId;
|
|
9497
9348
|
if (dirty & /*shownCards*/
|
|
9498
9349
|
128)
|
|
9499
9350
|
creditcard_changes.card = /*card*/
|
|
9500
|
-
ctx2[
|
|
9351
|
+
ctx2[20];
|
|
9501
9352
|
if (dirty & /*shownCards*/
|
|
9502
9353
|
128)
|
|
9503
9354
|
creditcard_changes.singleCard = /*shownCards*/
|
|
@@ -9547,7 +9398,7 @@ function create_if_block_2$3(ctx) {
|
|
|
9547
9398
|
p(ctx2, dirty) {
|
|
9548
9399
|
const linkbutton_changes = {};
|
|
9549
9400
|
if (dirty & /*$$scope, $t*/
|
|
9550
|
-
|
|
9401
|
+
8389632) {
|
|
9551
9402
|
linkbutton_changes.$$scope = { dirty, ctx: ctx2 };
|
|
9552
9403
|
}
|
|
9553
9404
|
linkbutton.$set(linkbutton_changes);
|
|
@@ -9593,7 +9444,7 @@ function create_if_block_1$5(ctx) {
|
|
|
9593
9444
|
p(ctx2, dirty) {
|
|
9594
9445
|
const linkbutton_changes = {};
|
|
9595
9446
|
if (dirty & /*$$scope, $t*/
|
|
9596
|
-
|
|
9447
|
+
8389632) {
|
|
9597
9448
|
linkbutton_changes.$$scope = { dirty, ctx: ctx2 };
|
|
9598
9449
|
}
|
|
9599
9450
|
linkbutton.$set(linkbutton_changes);
|
|
@@ -9696,7 +9547,7 @@ function create_if_block$a(ctx) {
|
|
|
9696
9547
|
button_changes.disabled = /*allCardsExpired*/
|
|
9697
9548
|
ctx2[9];
|
|
9698
9549
|
if (dirty & /*$$scope, $t, amount, currency, isPanInPayButton, selectedCreditCard*/
|
|
9699
|
-
|
|
9550
|
+
8389745) {
|
|
9700
9551
|
button_changes.$$scope = { dirty, ctx: ctx2 };
|
|
9701
9552
|
}
|
|
9702
9553
|
button.$set(button_changes);
|
|
@@ -10075,8 +9926,13 @@ function instance$k($$self, $$props, $$invalidate) {
|
|
|
10075
9926
|
if (!isCreditCardExpired(selectedCard.maskedCard.panExpirationYear, selectedCard.maskedCard.panExpirationMonth)) {
|
|
10076
9927
|
handleComponentEvent(UserActionType.SELECT, "card");
|
|
10077
9928
|
$$invalidate(0, selectedCreditCard = selectedCard);
|
|
9929
|
+
dispatchCardSelectionEvent();
|
|
10078
9930
|
}
|
|
10079
9931
|
};
|
|
9932
|
+
const dispatchCardSelectionEvent = () => {
|
|
9933
|
+
const cardSelectionEvent = new CustomEvent(FLOW_EVENT_CARD_SELECTION, { detail: selectedCreditCard });
|
|
9934
|
+
get_store_value(webComponentRefStore).webComponentRef.dispatchEvent(cardSelectionEvent);
|
|
9935
|
+
};
|
|
10080
9936
|
function flowEvent_handler(event) {
|
|
10081
9937
|
bubble.call(this, $$self, event);
|
|
10082
9938
|
}
|
|
@@ -10085,7 +9941,7 @@ function instance$k($$self, $$props, $$invalidate) {
|
|
|
10085
9941
|
$$invalidate(14, allCards = $$props2.allCards);
|
|
10086
9942
|
};
|
|
10087
9943
|
$$self.$$.update = () => {
|
|
10088
|
-
var
|
|
9944
|
+
var _a2, _b;
|
|
10089
9945
|
if ($$self.$$.dirty & /*allCards*/
|
|
10090
9946
|
16384) {
|
|
10091
9947
|
$$invalidate(15, firstCard = allCards[0]);
|
|
@@ -10115,7 +9971,7 @@ function instance$k($$self, $$props, $$invalidate) {
|
|
|
10115
9971
|
}
|
|
10116
9972
|
if ($$self.$$.dirty & /*$merchantConfigStore*/
|
|
10117
9973
|
131072) {
|
|
10118
|
-
$$invalidate(6, amount = (
|
|
9974
|
+
$$invalidate(6, amount = (_a2 = $merchantConfigStore.transactionAmount) == null ? void 0 : _a2.amount);
|
|
10119
9975
|
}
|
|
10120
9976
|
if ($$self.$$.dirty & /*$merchantConfigStore*/
|
|
10121
9977
|
131072) {
|
|
@@ -11679,35 +11535,43 @@ function add_css$g(target) {
|
|
|
11679
11535
|
}
|
|
11680
11536
|
function get_each_context(ctx, list, i) {
|
|
11681
11537
|
const child_ctx = ctx.slice();
|
|
11682
|
-
child_ctx[
|
|
11683
|
-
child_ctx[
|
|
11684
|
-
child_ctx[
|
|
11538
|
+
child_ctx[20] = list[i];
|
|
11539
|
+
child_ctx[21] = list;
|
|
11540
|
+
child_ctx[22] = i;
|
|
11685
11541
|
return child_ctx;
|
|
11686
11542
|
}
|
|
11687
11543
|
function create_each_block(ctx) {
|
|
11688
11544
|
let input;
|
|
11689
11545
|
let otpInputFieldIndex = (
|
|
11690
11546
|
/*otpInputFieldIndex*/
|
|
11691
|
-
ctx[
|
|
11547
|
+
ctx[20]
|
|
11692
11548
|
);
|
|
11693
11549
|
let mounted;
|
|
11694
11550
|
let dispose;
|
|
11695
11551
|
const assign_input = () => (
|
|
11696
11552
|
/*input_binding*/
|
|
11697
|
-
ctx[
|
|
11553
|
+
ctx[9](input, otpInputFieldIndex)
|
|
11698
11554
|
);
|
|
11699
11555
|
const unassign_input = () => (
|
|
11700
11556
|
/*input_binding*/
|
|
11701
|
-
ctx[
|
|
11557
|
+
ctx[9](null, otpInputFieldIndex)
|
|
11702
11558
|
);
|
|
11703
11559
|
function keyup_handler(...args) {
|
|
11704
11560
|
return (
|
|
11705
11561
|
/*keyup_handler*/
|
|
11706
|
-
ctx[
|
|
11562
|
+
ctx[10](
|
|
11707
11563
|
/*otpInputFieldIndex*/
|
|
11708
|
-
ctx[
|
|
11709
|
-
|
|
11710
|
-
|
|
11564
|
+
ctx[20],
|
|
11565
|
+
...args
|
|
11566
|
+
)
|
|
11567
|
+
);
|
|
11568
|
+
}
|
|
11569
|
+
function keydown_handler(...args) {
|
|
11570
|
+
return (
|
|
11571
|
+
/*keydown_handler*/
|
|
11572
|
+
ctx[11](
|
|
11573
|
+
/*otpInputFieldIndex*/
|
|
11574
|
+
ctx[20],
|
|
11711
11575
|
...args
|
|
11712
11576
|
)
|
|
11713
11577
|
);
|
|
@@ -11715,22 +11579,22 @@ function create_each_block(ctx) {
|
|
|
11715
11579
|
function input_handler() {
|
|
11716
11580
|
return (
|
|
11717
11581
|
/*input_handler*/
|
|
11718
|
-
ctx[
|
|
11582
|
+
ctx[12](
|
|
11719
11583
|
/*otpInputFieldIndex*/
|
|
11720
|
-
ctx[
|
|
11584
|
+
ctx[20],
|
|
11721
11585
|
/*input*/
|
|
11722
|
-
ctx[
|
|
11586
|
+
ctx[19]
|
|
11723
11587
|
)
|
|
11724
11588
|
);
|
|
11725
11589
|
}
|
|
11726
11590
|
function paste_handler(...args) {
|
|
11727
11591
|
return (
|
|
11728
11592
|
/*paste_handler*/
|
|
11729
|
-
ctx[
|
|
11593
|
+
ctx[13](
|
|
11730
11594
|
/*otpInputFieldIndex*/
|
|
11731
|
-
ctx[
|
|
11595
|
+
ctx[20],
|
|
11732
11596
|
/*input*/
|
|
11733
|
-
ctx[
|
|
11597
|
+
ctx[19],
|
|
11734
11598
|
...args
|
|
11735
11599
|
)
|
|
11736
11600
|
);
|
|
@@ -11738,9 +11602,9 @@ function create_each_block(ctx) {
|
|
|
11738
11602
|
function focusin_handler() {
|
|
11739
11603
|
return (
|
|
11740
11604
|
/*focusin_handler*/
|
|
11741
|
-
ctx[
|
|
11605
|
+
ctx[14](
|
|
11742
11606
|
/*otpInputFieldIndex*/
|
|
11743
|
-
ctx[
|
|
11607
|
+
ctx[20]
|
|
11744
11608
|
)
|
|
11745
11609
|
);
|
|
11746
11610
|
}
|
|
@@ -11755,7 +11619,7 @@ function create_each_block(ctx) {
|
|
|
11755
11619
|
input,
|
|
11756
11620
|
"id",
|
|
11757
11621
|
/*otpInputFieldIndex*/
|
|
11758
|
-
ctx[
|
|
11622
|
+
ctx[20] === 0 ? "otp-input" : void 0
|
|
11759
11623
|
);
|
|
11760
11624
|
attr(input, "class", "svelte-amjkt9");
|
|
11761
11625
|
},
|
|
@@ -11767,18 +11631,19 @@ function create_each_block(ctx) {
|
|
|
11767
11631
|
listen(input, "blur", function() {
|
|
11768
11632
|
if (is_function(
|
|
11769
11633
|
/*input*/
|
|
11770
|
-
ctx[
|
|
11634
|
+
ctx[19].onBlur
|
|
11771
11635
|
))
|
|
11772
|
-
ctx[
|
|
11636
|
+
ctx[19].onBlur.apply(this, arguments);
|
|
11773
11637
|
}),
|
|
11774
11638
|
listen(input, "focus", function() {
|
|
11775
11639
|
if (is_function(
|
|
11776
11640
|
/*input*/
|
|
11777
|
-
ctx[
|
|
11641
|
+
ctx[19].onFocus
|
|
11778
11642
|
))
|
|
11779
|
-
ctx[
|
|
11643
|
+
ctx[19].onFocus.apply(this, arguments);
|
|
11780
11644
|
}),
|
|
11781
11645
|
listen(input, "keyup", keyup_handler),
|
|
11646
|
+
listen(input, "keydown", keydown_handler),
|
|
11782
11647
|
listen(input, "input", input_handler),
|
|
11783
11648
|
listen(input, "paste", paste_handler),
|
|
11784
11649
|
listen(input, "focusin", focusin_handler)
|
|
@@ -11789,10 +11654,10 @@ function create_each_block(ctx) {
|
|
|
11789
11654
|
p(new_ctx, dirty) {
|
|
11790
11655
|
ctx = new_ctx;
|
|
11791
11656
|
if (otpInputFieldIndex !== /*otpInputFieldIndex*/
|
|
11792
|
-
ctx[
|
|
11657
|
+
ctx[20]) {
|
|
11793
11658
|
unassign_input();
|
|
11794
11659
|
otpInputFieldIndex = /*otpInputFieldIndex*/
|
|
11795
|
-
ctx[
|
|
11660
|
+
ctx[20];
|
|
11796
11661
|
assign_input();
|
|
11797
11662
|
}
|
|
11798
11663
|
},
|
|
@@ -11853,8 +11718,8 @@ function create_default_slot$7(ctx) {
|
|
|
11853
11718
|
4 && t0_value !== (t0_value = /*$t*/
|
|
11854
11719
|
ctx2[2]("label.oneTimeCode") + ""))
|
|
11855
11720
|
set_data(t0, t0_value);
|
|
11856
|
-
if (dirty & /*undefined, otpInputFields, input, handleKeyUp, handleInput, handlePaste, handleFocusIn*/
|
|
11857
|
-
|
|
11721
|
+
if (dirty & /*undefined, otpInputFields, input, handleKeyUp, handleKeyDown, handleInput, handlePaste, handleFocusIn*/
|
|
11722
|
+
524538) {
|
|
11858
11723
|
each_value = [0, 1, 2, 3, 4, 5];
|
|
11859
11724
|
let i;
|
|
11860
11725
|
for (i = 0; i < 6; i += 1) {
|
|
@@ -11892,8 +11757,8 @@ function create_fragment$h(ctx) {
|
|
|
11892
11757
|
$$slots: {
|
|
11893
11758
|
default: [
|
|
11894
11759
|
create_default_slot$7,
|
|
11895
|
-
({ input }) => ({
|
|
11896
|
-
({ input }) => input ?
|
|
11760
|
+
({ input }) => ({ 19: input }),
|
|
11761
|
+
({ input }) => input ? 524288 : 0
|
|
11897
11762
|
]
|
|
11898
11763
|
},
|
|
11899
11764
|
$$scope: { ctx }
|
|
@@ -11914,7 +11779,7 @@ function create_fragment$h(ctx) {
|
|
|
11914
11779
|
field_changes.validate = /*validate*/
|
|
11915
11780
|
ctx2[0];
|
|
11916
11781
|
if (dirty & /*$$scope, otpInputFields, input, $t*/
|
|
11917
|
-
|
|
11782
|
+
8912902) {
|
|
11918
11783
|
field_changes.$$scope = { dirty, ctx: ctx2 };
|
|
11919
11784
|
}
|
|
11920
11785
|
field.$set(field_changes);
|
|
@@ -11950,17 +11815,18 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
11950
11815
|
value = codes.join("");
|
|
11951
11816
|
formField.onChange(value);
|
|
11952
11817
|
};
|
|
11953
|
-
const
|
|
11954
|
-
|
|
11955
|
-
|
|
11956
|
-
|
|
11957
|
-
|
|
11958
|
-
|
|
11959
|
-
onValueChanged(formField);
|
|
11960
|
-
if (inputIndex < otpInputFields.length - 1) {
|
|
11961
|
-
otpInputFields[inputIndex + 1].focus();
|
|
11818
|
+
const handleKeyDown = (event, input) => {
|
|
11819
|
+
if (input.value !== "") {
|
|
11820
|
+
if (/[0-9]/.test(event.key)) {
|
|
11821
|
+
input.value = "";
|
|
11822
|
+
} else if (event.key !== "Backspace") {
|
|
11823
|
+
event.preventDefault();
|
|
11962
11824
|
}
|
|
11963
11825
|
}
|
|
11826
|
+
};
|
|
11827
|
+
const handleKeyUp = (event, input) => {
|
|
11828
|
+
const key = event.key;
|
|
11829
|
+
const inputIndex = otpInputFields.indexOf(input);
|
|
11964
11830
|
if (key === "ArrowRight" && inputIndex < otpInputFields.length - 1) {
|
|
11965
11831
|
otpInputFields[inputIndex + 1].focus();
|
|
11966
11832
|
} else if ((key === "ArrowLeft" || key === "Backspace") && inputIndex > 0) {
|
|
@@ -11968,8 +11834,8 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
11968
11834
|
}
|
|
11969
11835
|
};
|
|
11970
11836
|
const handlePaste = (event, index, formField) => {
|
|
11971
|
-
var
|
|
11972
|
-
let pasteText = (
|
|
11837
|
+
var _a2;
|
|
11838
|
+
let pasteText = (_a2 = event.clipboardData) == null ? void 0 : _a2.getData("text");
|
|
11973
11839
|
if (!pasteText)
|
|
11974
11840
|
return;
|
|
11975
11841
|
pasteText = pasteText.replace(/[^0-9]/g, "").slice(0, codes.length - index);
|
|
@@ -11992,6 +11858,9 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
11992
11858
|
}
|
|
11993
11859
|
input.value = input.value.replace(/[^0-9]/g, "");
|
|
11994
11860
|
const inputIndex = otpInputFields.indexOf(input);
|
|
11861
|
+
if (input.value && input.value !== "" && /[0-9]/.test(input.value) && inputIndex < otpInputFields.length - 1) {
|
|
11862
|
+
otpInputFields[inputIndex + 1].focus();
|
|
11863
|
+
}
|
|
11995
11864
|
codes[inputIndex] = input.value;
|
|
11996
11865
|
onValueChanged(formField);
|
|
11997
11866
|
};
|
|
@@ -12001,7 +11870,8 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
12001
11870
|
$$invalidate(1, otpInputFields);
|
|
12002
11871
|
});
|
|
12003
11872
|
}
|
|
12004
|
-
const keyup_handler = (otpInputFieldIndex,
|
|
11873
|
+
const keyup_handler = (otpInputFieldIndex, e) => handleKeyUp(e, otpInputFields[otpInputFieldIndex]);
|
|
11874
|
+
const keydown_handler = (otpInputFieldIndex, e) => handleKeyDown(e, otpInputFields[otpInputFieldIndex]);
|
|
12005
11875
|
const input_handler = (otpInputFieldIndex, input) => handleInput(otpInputFields[otpInputFieldIndex], input);
|
|
12006
11876
|
const paste_handler = (otpInputFieldIndex, input, e) => handlePaste(e, otpInputFieldIndex, input);
|
|
12007
11877
|
const focusin_handler = (otpInputFieldIndex) => handleFocusIn(otpInputFields[otpInputFieldIndex]);
|
|
@@ -12013,6 +11883,7 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
12013
11883
|
validate,
|
|
12014
11884
|
otpInputFields,
|
|
12015
11885
|
$t,
|
|
11886
|
+
handleKeyDown,
|
|
12016
11887
|
handleKeyUp,
|
|
12017
11888
|
handlePaste,
|
|
12018
11889
|
handleFocusIn,
|
|
@@ -12020,6 +11891,7 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
12020
11891
|
resetOtp,
|
|
12021
11892
|
input_binding,
|
|
12022
11893
|
keyup_handler,
|
|
11894
|
+
keydown_handler,
|
|
12023
11895
|
input_handler,
|
|
12024
11896
|
paste_handler,
|
|
12025
11897
|
focusin_handler
|
|
@@ -12028,10 +11900,10 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
12028
11900
|
class OtpInputField extends SvelteComponent {
|
|
12029
11901
|
constructor(options) {
|
|
12030
11902
|
super();
|
|
12031
|
-
init(this, options, instance$h, create_fragment$h, safe_not_equal, { validate: 0, resetOtp:
|
|
11903
|
+
init(this, options, instance$h, create_fragment$h, safe_not_equal, { validate: 0, resetOtp: 8 }, add_css$g);
|
|
12032
11904
|
}
|
|
12033
11905
|
get resetOtp() {
|
|
12034
|
-
return this.$$.ctx[
|
|
11906
|
+
return this.$$.ctx[8];
|
|
12035
11907
|
}
|
|
12036
11908
|
}
|
|
12037
11909
|
const required = (value) => {
|
|
@@ -13811,7 +13683,6 @@ const handleOnValidationComplete = ({
|
|
|
13811
13683
|
currentComponentProps: {
|
|
13812
13684
|
email: get_store_value(orchestratorStore).email
|
|
13813
13685
|
},
|
|
13814
|
-
// @ts-ignore
|
|
13815
13686
|
currentComponent: ConsumerNotFound
|
|
13816
13687
|
};
|
|
13817
13688
|
}
|
|
@@ -13821,7 +13692,6 @@ const handleOnValidationComplete = ({
|
|
|
13821
13692
|
currentComponentProps: {
|
|
13822
13693
|
allCards: allCreditCardsForUser
|
|
13823
13694
|
},
|
|
13824
|
-
// @ts-ignore
|
|
13825
13695
|
currentComponent: SelectCardScreen
|
|
13826
13696
|
};
|
|
13827
13697
|
};
|
|
@@ -14118,19 +13988,19 @@ function create_fragment$b(ctx) {
|
|
|
14118
13988
|
if_block.p(ctx2, dirty);
|
|
14119
13989
|
const button0_changes = {};
|
|
14120
13990
|
if (dirty & /*$$scope, $t*/
|
|
14121
|
-
|
|
13991
|
+
65) {
|
|
14122
13992
|
button0_changes.$$scope = { dirty, ctx: ctx2 };
|
|
14123
13993
|
}
|
|
14124
13994
|
button0.$set(button0_changes);
|
|
14125
13995
|
const button1_changes = {};
|
|
14126
13996
|
if (dirty & /*$$scope, $t*/
|
|
14127
|
-
|
|
13997
|
+
65) {
|
|
14128
13998
|
button1_changes.$$scope = { dirty, ctx: ctx2 };
|
|
14129
13999
|
}
|
|
14130
14000
|
button1.$set(button1_changes);
|
|
14131
14001
|
const linkbutton_changes = {};
|
|
14132
14002
|
if (dirty & /*$$scope, $t*/
|
|
14133
|
-
|
|
14003
|
+
65) {
|
|
14134
14004
|
linkbutton_changes.$$scope = { dirty, ctx: ctx2 };
|
|
14135
14005
|
}
|
|
14136
14006
|
linkbutton.$set(linkbutton_changes);
|
|
@@ -14164,18 +14034,12 @@ function create_fragment$b(ctx) {
|
|
|
14164
14034
|
};
|
|
14165
14035
|
}
|
|
14166
14036
|
function instance$b($$self, $$props, $$invalidate) {
|
|
14167
|
-
let $orchestratorStore;
|
|
14168
14037
|
let $t;
|
|
14169
|
-
component_subscribe($$self, orchestratorStore, ($$value) => $$invalidate(5, $orchestratorStore = $$value));
|
|
14170
14038
|
component_subscribe($$self, t, ($$value) => $$invalidate(0, $t = $$value));
|
|
14171
14039
|
const dispatcher = createEventDispatcher();
|
|
14172
14040
|
let { errorReason = "" } = $$props;
|
|
14173
14041
|
const userFriendlyErrorMessage = getUserFriendlyErrorMessage(errorReason);
|
|
14174
14042
|
const handleGoBack = () => {
|
|
14175
|
-
if (isUserLoggedIn($orchestratorStore)) {
|
|
14176
|
-
dispatcher(FLOW_EVENT, { flowStep: FlowStep.ON_SWITCH_ID });
|
|
14177
|
-
return;
|
|
14178
|
-
}
|
|
14179
14043
|
dispatcher(FLOW_EVENT, { flowStep: FlowStep.ON_CANCEL });
|
|
14180
14044
|
};
|
|
14181
14045
|
const handleAlternativePayment = () => {
|
|
@@ -14245,13 +14109,13 @@ function create_if_block$6(ctx) {
|
|
|
14245
14109
|
p(ctx2, dirty) {
|
|
14246
14110
|
const button_changes = {};
|
|
14247
14111
|
if (dirty & /*$$scope, $t*/
|
|
14248
|
-
|
|
14112
|
+
34) {
|
|
14249
14113
|
button_changes.$$scope = { dirty, ctx: ctx2 };
|
|
14250
14114
|
}
|
|
14251
14115
|
button.$set(button_changes);
|
|
14252
14116
|
const linkbutton_changes = {};
|
|
14253
14117
|
if (dirty & /*$$scope, $t*/
|
|
14254
|
-
|
|
14118
|
+
34) {
|
|
14255
14119
|
linkbutton_changes.$$scope = { dirty, ctx: ctx2 };
|
|
14256
14120
|
}
|
|
14257
14121
|
linkbutton.$set(linkbutton_changes);
|
|
@@ -14440,9 +14304,7 @@ function create_fragment$a(ctx) {
|
|
|
14440
14304
|
};
|
|
14441
14305
|
}
|
|
14442
14306
|
function instance$a($$self, $$props, $$invalidate) {
|
|
14443
|
-
let $orchestratorStore;
|
|
14444
14307
|
let $t;
|
|
14445
|
-
component_subscribe($$self, orchestratorStore, ($$value) => $$invalidate(4, $orchestratorStore = $$value));
|
|
14446
14308
|
component_subscribe($$self, t, ($$value) => $$invalidate(1, $t = $$value));
|
|
14447
14309
|
const dispatcher = createEventDispatcher();
|
|
14448
14310
|
let { rootFailure = false } = $$props;
|
|
@@ -14451,10 +14313,6 @@ function instance$a($$self, $$props, $$invalidate) {
|
|
|
14451
14313
|
console.error(error);
|
|
14452
14314
|
}
|
|
14453
14315
|
const handleGoBack = () => {
|
|
14454
|
-
if (isUserLoggedIn($orchestratorStore)) {
|
|
14455
|
-
dispatcher(FLOW_EVENT, { flowStep: FlowStep.ON_SWITCH_ID });
|
|
14456
|
-
return;
|
|
14457
|
-
}
|
|
14458
14316
|
dispatcher(FLOW_EVENT, { flowStep: FlowStep.ON_CANCEL });
|
|
14459
14317
|
};
|
|
14460
14318
|
$$self.$$set = ($$props2) => {
|
|
@@ -14828,12 +14686,12 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
14828
14686
|
let { validate = () => void 0 } = $$props;
|
|
14829
14687
|
let isFirstType = true;
|
|
14830
14688
|
const handleOnInput = (event, input) => {
|
|
14831
|
-
var
|
|
14689
|
+
var _a2;
|
|
14832
14690
|
if (isFirstType) {
|
|
14833
14691
|
handleComponentEvent(UserActionType.TEXT_TYPE, name);
|
|
14834
14692
|
isFirstType = false;
|
|
14835
14693
|
}
|
|
14836
|
-
input.onChange((
|
|
14694
|
+
input.onChange((_a2 = event.target) == null ? void 0 : _a2.value);
|
|
14837
14695
|
};
|
|
14838
14696
|
const input_handler = (input, event) => handleOnInput(event, input);
|
|
14839
14697
|
const click_handler = () => handleComponentEvent(UserActionType.CLICK, name);
|
|
@@ -14891,7 +14749,7 @@ const createCtExplanationModalStore = () => {
|
|
|
14891
14749
|
};
|
|
14892
14750
|
};
|
|
14893
14751
|
const ctpExplanationModalStore = createCtExplanationModalStore();
|
|
14894
|
-
const
|
|
14752
|
+
const LogoSRC = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAzNCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPG1hc2sgaWQ9Im1hc2swIiBtYXNrLXR5cGU9ImFscGhhIiBtYXNrVW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzQiIGhlaWdodD0iMjAiPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTAgMEgzMy4zMzMzVjIwSDBWMFoiIGZpbGw9IndoaXRlIi8+CjwvbWFzaz4KPGcgbWFzaz0idXJsKCNtYXNrMCkiPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE0Ljk1IDEuODk2OTVDMTcuMTY4OCA0LjMzMzU5IDE5LjIyODkgNi42MDIxNCAyMS4yOTY2IDguODY0ODFDMjIuMjA3NiA5Ljg2MTYgMjIuMjA2NSAxMC4xMjA3IDIxLjMwMjEgMTEuMTIxM0MxOS4yNDIzIDEzLjQwMDIgMTcuMTU1IDE1LjY1NyAxNS4xNTI4IDE3Ljk4MDlDMTMuOTU5MSAxOS4zNjYxIDEyLjU4MzYgMjAuMDkgMTAuNjQxNSAxOS45OTFDOC4zOTEyOCAxOS44NzY5IDYuMTI5NDggMTkuOTcxMyAzLjg3Mjc1IDE5Ljk2MjNDMS43MjQ2NCAxOS45NTQ0IDAuMDE4MjM5MyAxOC4zNjQ0IDAuMDEwOTk4MSAxNi4zMzMxQy0wLjAwMzQ4NDQzIDEyLjA5MzEgLTAuMDAzODQ2NDkgNy44NTM0OSAwLjAxMDk5ODEgMy42MTM0OUMwLjAxODYwMTQgMS41OTIyNCAxLjY2NDE3IDAuMDQ1ODYyNCAzLjc5NDE4IDAuMDI3NTMxNEM1LjM1ODY1IDAuMDE0Mzg4NCA2LjkyMzQ5IDAuMDM5NjM2OCA4LjQ4NzU5IDAuMDE4MTkzQzkuMTg3MSAwLjAwODg1NDUxIDkuNTk5ODUgMC4yNzE3MTQgOS42MDI3NCAwLjk0ODkyNEM5LjYwNjM3IDEuNjMwMjggOS4xNzE1MyAxLjkwMTQ1IDguNDg5NzcgMS44OTgzM0M3LjA0NTg2IDEuODkyMTEgNS42MDE2IDEuODkwMzggNC4xNTY5NyAxLjg5ODY4QzIuNzU2MTUgMS45MDYyOSAxLjk5MDc1IDIuNjM1NzIgMS45ODg1OCAzLjk3OTc3QzEuOTgyNDMgOC4wMTkxNiAxLjk4MTcgMTIuMDU4NiAxLjk4OTMgMTYuMDk4QzEuOTkxODQgMTcuMzU5NyAyLjczMTE3IDE4LjA4MDUgNC4wNDAwMiAxOC4wODgxQzYuNDQ3MzcgMTguMTAyMyA4Ljg1NjE3IDE4LjEzNTEgMTEuMjYwNiAxOC4wNjA4QzExLjgyNTggMTguMDQzNSAxMi41NDY3IDE3Ljc3MDYgMTIuOTA4IDE3LjM3NTlDMTUuMTAwMyAxNC45ODI1IDE3LjIwODYgMTIuNTE5OSAxOS4zODM1IDEwLjAzNjZDMTcuNjAzNiA3Ljk4MzU0IDE1Ljg0NjEgNS45NTUzNyAxNC4wODgzIDMuOTI3NTRDMTMuNDU2OSAzLjE5ODggMTIuNzg0NSAyLjQ5NzAzIDEyLjIxNTcgMS43MjYwOUMxMS45ODkxIDEuNDE4NjEgMTEuODA5OSAwLjg3OTc1MSAxMS45NDUzIDAuNTg4MTg0QzEyLjA3NjcgMC4zMDU2MDkgMTIuNjM1IDAuMDYxNzcyNCAxMy4wMTQ4IDAuMDQ5NjY3QzE0Ljc1ODEgLTAuMDA2MzYzNjkgMTYuNTA1MSAtMC4wMDExNzU2NiAxOC4yNDg4IDAuMDQ1ODYyNEMxOC42MTY2IDAuMDU1ODkyNiAxOS4wODM3IDAuMjQzMzUzIDE5LjMyMzQgMC41MDE3MTdDMjEuOTkwMyAzLjM3NjkyIDI0LjYyIDYuMjgzOTQgMjcuMjY0OSA5LjE3NzgyQzI3Ljc4OTEgOS43NTA5MiAyNy43NjIzIDEwLjI4NTMgMjcuMjQ2OCAxMC44NTM2QzI1LjI0MTMgMTMuMDYzIDIzLjI0NzggMTUuMjgyNCAyMS4yNTAzIDE3LjQ5OTFDMjEuMTE5MiAxNy42NDUgMjAuOTk1NyAxNy43OTcyIDIwLjc0NzQgMTguMDg5MUMyMS43Mzc2IDE4LjA4OTEgMjIuNTYzNSAxOC4xMDU0IDIzLjM4NzkgMTguMDc2M0MyMy41NjU3IDE4LjA3MDEgMjMuNzgzNiAxNy45Mzc2IDIzLjkwNDYgMTcuODAwM0MyNi4xODI2IDE1LjIxNDYgMjguNDQ4OCAxMi42MTk2IDMwLjc2MjcgOS45NzQ3QzI5LjExNDYgOC4wNjk2NiAyNy40OTU1IDYuMTk2NDQgMjUuODc0OSA0LjMyNDZDMjUuMTQ3OSAzLjQ4NDgzIDI0LjQyNzcgMi42Mzk4NyAyMy42ODczIDEuODExNTJDMjMuMjE3NyAxLjI4NjQ5IDIzLjAxOSAwLjcyMjAzNSAyMy42MzQ4IDAuMjM2NzgyQzI0LjIwMTggLTAuMjA5NzM0IDI0LjczMDEgMC4wMjMzODEgMjUuMTg3MyAwLjUzNTk1OEMyNy43NTgzIDMuNDE2IDMwLjM0MDkgNi4yODYwMiAzMi45MyA5LjE1MTU0QzMzLjQ3NzEgOS43NTY0NiAzMy40NjU1IDEwLjI4NzcgMzIuOTA4IDEwLjg5MzdDMzAuMjcyMSAxMy43NTc1IDI3LjY2ODIgMTYuNjQ3NSAyNS4wMjAxIDE5LjUwMDZDMjQuNzgyNiAxOS43NTY5IDI0LjMxMyAxOS45MzQgMjMuOTQ1MSAxOS45NDQ0QzIyLjIzMTUgMTkuOTkwNCAyMC41MTQ2IDE5Ljk5MTQgMTguODAxMyAxOS45NDQ0QzE4LjQwNTYgMTkuOTMzMyAxNy43NjE1IDE5Ljc0MTcgMTcuNjg1NCAxOS41MDJDMTcuNTYzNCAxOS4xMjAxIDE3LjY3NjcgMTguNTE4NyAxNy45NDI4IDE4LjIwMDhDMTkuNzIyIDE2LjA3MzEgMjEuNTcyMiAxMy45OTkyIDIzLjM4OTcgMTEuOTAwNUMyMy45MjE5IDExLjI4NTkgMjQuODIwOSAxMC42NDk4IDI0LjgyNiAxMC4wMTc2QzI0LjgzMTQgOS4zOTA4OCAyMy45NDE4IDguNzQyMDMgMjMuNDEwNyA4LjEyOTQ5QzIxLjg0MTUgNi4zMTc4NCAyMC4yMTg0IDQuNTQ3MzQgMTguNjk2MyAyLjcwMTQ0QzE4LjE2NzMgMi4wNjAyIDE3LjYyMjQgMS45NjcxNiAxNi43OTg0IDEuODg2MjNDMTYuMjg5MyAxLjgzNjA4IDE1LjcyMzQgMS44OTY5NSAxNC45NSAxLjg5Njk1IiBmaWxsPSJibGFjayIvPgo8L2c+Cjwvc3ZnPgo=";
|
|
14895
14753
|
function add_css$6(target) {
|
|
14896
14754
|
append_styles(target, "svelte-150h49s", ".form-container.svelte-150h49s,.login-form.svelte-150h49s{display:flex;flex-direction:column;gap:var(--size-gap-xl)}.text-wrapper.svelte-150h49s{display:flex;flex-direction:column;gap:var(--size-gap-l)}.logoSCR.svelte-150h49s{height:var(--font-size-14)}.helper-text.svelte-150h49s{display:flex;gap:var(--size-gap-m);align-items:center;font-size:var(--font-size-14)}");
|
|
14897
14755
|
}
|
|
@@ -15097,7 +14955,7 @@ function create_default_slot$1(ctx) {
|
|
|
15097
14955
|
create_component(button.$$.fragment);
|
|
15098
14956
|
attr(div, "class", "text-wrapper svelte-150h49s");
|
|
15099
14957
|
attr(img, "class", "logoSCR svelte-150h49s");
|
|
15100
|
-
if (!src_url_equal(img.src, img_src_value =
|
|
14958
|
+
if (!src_url_equal(img.src, img_src_value = LogoSRC))
|
|
15101
14959
|
attr(img, "src", img_src_value);
|
|
15102
14960
|
attr(img, "alt", "Netcetera SRCi");
|
|
15103
14961
|
attr(p2, "class", "helper-text svelte-150h49s");
|
|
@@ -15463,8 +15321,8 @@ function create_fragment$6(ctx) {
|
|
|
15463
15321
|
t3 = space();
|
|
15464
15322
|
if (if_block2)
|
|
15465
15323
|
if_block2.c();
|
|
15466
|
-
attr(img, "class", "
|
|
15467
|
-
if (!src_url_equal(img.src, img_src_value =
|
|
15324
|
+
attr(img, "class", "logoSRC");
|
|
15325
|
+
if (!src_url_equal(img.src, img_src_value = LogoSRC))
|
|
15468
15326
|
attr(img, "src", img_src_value);
|
|
15469
15327
|
attr(img, "alt", "Netcetera SRCi");
|
|
15470
15328
|
attr(div0, "class", "divider svelte-g9jtmf");
|
|
@@ -16398,10 +16256,10 @@ const _HeadlessOrchestrator = class {
|
|
|
16398
16256
|
};
|
|
16399
16257
|
let HeadlessOrchestrator = _HeadlessOrchestrator;
|
|
16400
16258
|
__publicField(HeadlessOrchestrator, "checkout", async (params) => {
|
|
16401
|
-
var
|
|
16259
|
+
var _a2, _b;
|
|
16402
16260
|
_HeadlessOrchestrator.validateCheckout(params, get_store_value(t));
|
|
16403
16261
|
addCardFlowStore.startAddingCard();
|
|
16404
|
-
const creditCardBrand = getCreditCardBrand((
|
|
16262
|
+
const creditCardBrand = getCreditCardBrand((_a2 = params.card) == null ? void 0 : _a2.primaryAccountNumber);
|
|
16405
16263
|
let internalIframeRef;
|
|
16406
16264
|
if (creditCardBrand === CreditCardBrand.MASTERCARD && !params.iframeRef) {
|
|
16407
16265
|
const dcfWindowState = get_store_value(dcfWindowStore);
|
|
@@ -16428,7 +16286,7 @@ __publicField(HeadlessOrchestrator, "checkout", async (params) => {
|
|
|
16428
16286
|
return checkoutResponse;
|
|
16429
16287
|
});
|
|
16430
16288
|
__publicField(HeadlessOrchestrator, "validateCheckout", (params, t2) => {
|
|
16431
|
-
var
|
|
16289
|
+
var _a2;
|
|
16432
16290
|
const card = params.card;
|
|
16433
16291
|
if (required(card == null ? void 0 : card.primaryAccountNumber) !== void 0) {
|
|
16434
16292
|
throw {
|
|
@@ -16479,7 +16337,7 @@ __publicField(HeadlessOrchestrator, "validateCheckout", (params, t2) => {
|
|
|
16479
16337
|
message: t2("label.cardExpired")
|
|
16480
16338
|
};
|
|
16481
16339
|
}
|
|
16482
|
-
const creditCardBrand = getCreditCardBrand((
|
|
16340
|
+
const creditCardBrand = getCreditCardBrand((_a2 = params.card) == null ? void 0 : _a2.primaryAccountNumber);
|
|
16483
16341
|
if (creditCardBrand === CreditCardBrand.VISA) {
|
|
16484
16342
|
if (required(params.complianceResourceURLs.termsAndConditionsUrl) !== void 0) {
|
|
16485
16343
|
throw {
|
|
@@ -16759,7 +16617,7 @@ function create_fragment$1(ctx) {
|
|
|
16759
16617
|
p = element("p");
|
|
16760
16618
|
t16 = text(t16_value);
|
|
16761
16619
|
attr(div0, "class", "close-modal-action svelte-5gewzx");
|
|
16762
|
-
if (!src_url_equal(img0.src, img0_src_value =
|
|
16620
|
+
if (!src_url_equal(img0.src, img0_src_value = LogoSRC))
|
|
16763
16621
|
attr(img0, "src", img0_src_value);
|
|
16764
16622
|
attr(img0, "alt", "Netcetera SRCi");
|
|
16765
16623
|
attr(img0, "class", "logo svelte-5gewzx");
|
|
@@ -17283,14 +17141,14 @@ function create_then_block(ctx) {
|
|
|
17283
17141
|
};
|
|
17284
17142
|
}
|
|
17285
17143
|
function create_if_block(ctx) {
|
|
17286
|
-
var
|
|
17144
|
+
var _a2;
|
|
17287
17145
|
let navigator;
|
|
17288
17146
|
let t2;
|
|
17289
17147
|
let if_block_anchor;
|
|
17290
17148
|
let current;
|
|
17291
17149
|
navigator = new Navigator({});
|
|
17292
17150
|
let if_block = !/*parsedConfig*/
|
|
17293
|
-
((
|
|
17151
|
+
((_a2 = ctx[0].iframe) == null ? void 0 : _a2.ref) && create_if_block_1();
|
|
17294
17152
|
return {
|
|
17295
17153
|
c() {
|
|
17296
17154
|
create_component(navigator.$$.fragment);
|
|
@@ -17308,9 +17166,9 @@ function create_if_block(ctx) {
|
|
|
17308
17166
|
current = true;
|
|
17309
17167
|
},
|
|
17310
17168
|
p(ctx2, dirty) {
|
|
17311
|
-
var
|
|
17169
|
+
var _a3;
|
|
17312
17170
|
if (!/*parsedConfig*/
|
|
17313
|
-
((
|
|
17171
|
+
((_a3 = ctx2[0].iframe) == null ? void 0 : _a3.ref)) {
|
|
17314
17172
|
if (if_block) {
|
|
17315
17173
|
if (dirty & /*parsedConfig*/
|
|
17316
17174
|
1) {
|
|
@@ -17654,7 +17512,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
17654
17512
|
$$invalidate(17, enableperformancemeasurement = $$props2.enableperformancemeasurement);
|
|
17655
17513
|
};
|
|
17656
17514
|
$$self.$$.update = () => {
|
|
17657
|
-
var
|
|
17515
|
+
var _a2, _b, _c, _d;
|
|
17658
17516
|
if ($$self.$$.dirty & /*config*/
|
|
17659
17517
|
32) {
|
|
17660
17518
|
$$invalidate(0, parsedConfig = parseConfigProp(config));
|
|
@@ -17721,7 +17579,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
17721
17579
|
}
|
|
17722
17580
|
if ($$self.$$.dirty & /*parsedConfig*/
|
|
17723
17581
|
1) {
|
|
17724
|
-
if ((
|
|
17582
|
+
if ((_a2 = parsedConfig == null ? void 0 : parsedConfig.iframe) == null ? void 0 : _a2.ref) {
|
|
17725
17583
|
dcfWindowStore.setIframe(parsedConfig.iframe);
|
|
17726
17584
|
if (isApplicationInSandbox(getContext(environmentKey))) {
|
|
17727
17585
|
console.log("Using provided iframe.", (_b = parsedConfig == null ? void 0 : parsedConfig.iframe) == null ? void 0 : _b.ref);
|