@netceterapx/click-to-pay-sdk 3.0.0 → 3.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/build/click-to-pay-sdk.es.js +17 -18629
- package/build/click-to-pay-sdk.js +1 -1
- package/index.d.ts +102 -26
- package/package.json +47 -47
package/index.d.ts
CHANGED
|
@@ -138,7 +138,7 @@ export declare type AmexDpaTransactionOptions = {
|
|
|
138
138
|
paymentOptions?: AmexPaymentOptions[];
|
|
139
139
|
/**
|
|
140
140
|
* To indicate to the user if payment will be processed after selection
|
|
141
|
-
* or if only data returned to
|
|
141
|
+
* or if only data returned to SRCI/merchant to confirm first.
|
|
142
142
|
* Valid values for enum:
|
|
143
143
|
* • PAY: Should be used if merchant does not have a summary page and wants payment for transaction
|
|
144
144
|
* to be processed immediately. Consumer is not brought to any merchant summary page.
|
|
@@ -210,6 +210,9 @@ export declare type AmexDpaTransactionOptions = {
|
|
|
210
210
|
};
|
|
211
211
|
|
|
212
212
|
export declare enum AmexDynamicDataTypeEnum {
|
|
213
|
+
/**
|
|
214
|
+
* DYNAMIC_CARD_SECURITY_CODE.
|
|
215
|
+
*/
|
|
213
216
|
DYNAMIC_CARD_SECURITY_CODE = "DYNAMIC_CARD_SECURITY_CODE"
|
|
214
217
|
}
|
|
215
218
|
|
|
@@ -236,9 +239,10 @@ export declare enum AmexOrderTypeEnum {
|
|
|
236
239
|
|
|
237
240
|
export declare type AmexPaymentOptions = {
|
|
238
241
|
/**
|
|
239
|
-
* If not provided,
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
+
* If not provided, or provided but the issuer does not support tokenization, a PAN payload will be returned;
|
|
243
|
+
* otherwise, a token response will be returned.
|
|
244
|
+
* Valid values for enum:
|
|
245
|
+
* • DYNAMIC_CARD_SECURITY_CODE
|
|
242
246
|
*/
|
|
243
247
|
dynamicDataType?: AmexDynamicDataTypeEnum;
|
|
244
248
|
/**
|
|
@@ -479,6 +483,8 @@ export declare enum LANG {
|
|
|
479
483
|
ar_SA = "ar_SA",
|
|
480
484
|
/** Bulgarian - Bulgaria */
|
|
481
485
|
bg_BG = "bg_BG",
|
|
486
|
+
/** Bosnian - Bosnia and Herzegovina */
|
|
487
|
+
bs_BA = "bs_BA",
|
|
482
488
|
/** Catalan - Spain */
|
|
483
489
|
ca_ES = "ca_ES",
|
|
484
490
|
/** Czech - Czechia */
|
|
@@ -486,7 +492,7 @@ export declare enum LANG {
|
|
|
486
492
|
/** Welsh - United Kingdom */
|
|
487
493
|
cy_GB = "cy_GB",
|
|
488
494
|
/** Danish - Denmark */
|
|
489
|
-
|
|
495
|
+
da_DK = "da_DK",
|
|
490
496
|
/** German - Austria */
|
|
491
497
|
de_AT = "de_AT",
|
|
492
498
|
/** German - Germany */
|
|
@@ -539,6 +545,8 @@ export declare enum LANG {
|
|
|
539
545
|
lt_LT = "lt_LT",
|
|
540
546
|
/** Latvian - Latvia */
|
|
541
547
|
lv_LV = "lv_LV",
|
|
548
|
+
/** Macedonian - Macedonia */
|
|
549
|
+
mk_MK = "mk_MK",
|
|
542
550
|
/** Maltese - Malta */
|
|
543
551
|
mt_MT = "mt_MT",
|
|
544
552
|
/** Dutch - Belgium */
|
|
@@ -558,7 +566,13 @@ export declare enum LANG {
|
|
|
558
566
|
/** Slovak - Slovakia */
|
|
559
567
|
sk_SK = "sk_SK",
|
|
560
568
|
/** Slovenian - Slovenia */
|
|
561
|
-
|
|
569
|
+
sl_SI = "sl_SI",
|
|
570
|
+
/** Albanian - Albania */
|
|
571
|
+
sq_AL = "sq_AL",
|
|
572
|
+
/** Serbian - Montenegro */
|
|
573
|
+
sr_ME = "sr_ME",
|
|
574
|
+
/** Serbian - Serbia */
|
|
575
|
+
sr_RS = "sr_RS",
|
|
562
576
|
/** Swedish - Finland */
|
|
563
577
|
sv_FI = "sv_FI",
|
|
564
578
|
/** Swedish - Sweden */
|
|
@@ -571,6 +585,35 @@ export declare enum LANG {
|
|
|
571
585
|
vi_VN = "vi_VN"
|
|
572
586
|
}
|
|
573
587
|
|
|
588
|
+
declare type MastercardAuthenticationOptions = {
|
|
589
|
+
/**
|
|
590
|
+
* Acquiring institution identification code.
|
|
591
|
+
*/
|
|
592
|
+
acquirerMerchantId: string;
|
|
593
|
+
/**
|
|
594
|
+
* Acquiring institution identification code as assigned by the 3DS Directory Server receiving the AReq message.
|
|
595
|
+
*/
|
|
596
|
+
acquirerBIN: string;
|
|
597
|
+
/**
|
|
598
|
+
* Code representing merchant’s type of business, product or service.
|
|
599
|
+
*/
|
|
600
|
+
merchantCategoryCode: string;
|
|
601
|
+
/**
|
|
602
|
+
* ISO-3166 country code of the merchant.
|
|
603
|
+
*/
|
|
604
|
+
merchantCountryCode: string;
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
declare type MastercardAuthenticationPreferences = {
|
|
608
|
+
/**
|
|
609
|
+
* Indicates if an Integrator has requested for the authentication of the payload or not.
|
|
610
|
+
* Valid values for enum:
|
|
611
|
+
* • AUTHENTICATED: Passkeys and 3DS authentication is on.
|
|
612
|
+
* • NON_AUTHENTICATED: Passkeys and 3DS authentication is off.
|
|
613
|
+
*/
|
|
614
|
+
payloadRequested?: MastercardPayloadRequestedEnum;
|
|
615
|
+
};
|
|
616
|
+
|
|
574
617
|
export declare type MastercardCustomInputData = {
|
|
575
618
|
/**
|
|
576
619
|
* Configure when card enrollment is offered to the cardholder. This only applies to Mastercard cards.
|
|
@@ -656,6 +699,11 @@ export declare type MastercardDpaTransactionOptions = {
|
|
|
656
699
|
* If not provided the default is FULL.
|
|
657
700
|
*/
|
|
658
701
|
dpaShippingPreference?: MastercardDpaShippingPreferenceEnum;
|
|
702
|
+
/**
|
|
703
|
+
* Object to contain the parameters for Authentication.
|
|
704
|
+
* Conditionality: This will be overridden by the properties of MastercardAuthenticationOptions.
|
|
705
|
+
*/
|
|
706
|
+
authenticationPreferences?: MastercardAuthenticationPreferences;
|
|
659
707
|
/**
|
|
660
708
|
* Flag to indicate if the consumer name is requested or not.
|
|
661
709
|
* Default is true.
|
|
@@ -705,6 +753,26 @@ export declare type MastercardDpaTransactionOptions = {
|
|
|
705
753
|
* When set to False, consumer is prompted to ‘Continue’ the payment on a loading screen; when set to True, consumer is prompted with a Confirm payment message on DCF.
|
|
706
754
|
*/
|
|
707
755
|
confirmPayment?: boolean;
|
|
756
|
+
/**
|
|
757
|
+
* Acquiring institution identification code.
|
|
758
|
+
* Conditionality: This will be overridden by the properties of MastercardAuthenticationOptions.
|
|
759
|
+
*/
|
|
760
|
+
acquirerMerchantId?: string;
|
|
761
|
+
/**
|
|
762
|
+
* Acquiring institution identification code as assigned by the 3DS Directory Server receiving the AReq message.
|
|
763
|
+
* Conditionality: This will be overridden by the properties of MastercardAuthenticationOptions.
|
|
764
|
+
*/
|
|
765
|
+
acquirerBIN?: string;
|
|
766
|
+
/**
|
|
767
|
+
* Code representing merchant’s type of business, product or service.
|
|
768
|
+
* Conditionality: This will be overridden by the properties of MastercardAuthenticationOptions.
|
|
769
|
+
*/
|
|
770
|
+
merchantCategoryCode?: string;
|
|
771
|
+
/**
|
|
772
|
+
* ISO-3166 country code of the merchant.
|
|
773
|
+
* Conditionality: This will be overridden by the properties of MastercardAuthenticationOptions.
|
|
774
|
+
*/
|
|
775
|
+
merchantCountryCode?: string;
|
|
708
776
|
};
|
|
709
777
|
|
|
710
778
|
export declare enum MastercardDynamicDataTypeEnum {
|
|
@@ -728,6 +796,10 @@ export declare type MastercardInitConfiguration = {
|
|
|
728
796
|
* May be provided, as required, to dynamically update previously registered DPA Data, e.g., presentation name.
|
|
729
797
|
*/
|
|
730
798
|
dpaData?: MastercardDpaData;
|
|
799
|
+
/**
|
|
800
|
+
* Authentication options to execute passkeys or 3DS authentication for transactions.
|
|
801
|
+
*/
|
|
802
|
+
authenticationOptions?: MastercardAuthenticationOptions;
|
|
731
803
|
/**
|
|
732
804
|
* This is the JWT token stored by the integrator on the consumer device.
|
|
733
805
|
* This token is stored in a first party cookie by the integrator and used to recognize the consumer in the browser.
|
|
@@ -735,15 +807,27 @@ export declare type MastercardInitConfiguration = {
|
|
|
735
807
|
recognitionToken?: JWT;
|
|
736
808
|
};
|
|
737
809
|
|
|
810
|
+
declare enum MastercardPayloadRequestedEnum {
|
|
811
|
+
/**
|
|
812
|
+
* Authenticated. Passkeys and 3DS authentication is enabled.
|
|
813
|
+
*/
|
|
814
|
+
AUTHENTICATED = "AUTHENTICATED",
|
|
815
|
+
/**
|
|
816
|
+
* Non authenticated. Passkeys and 3DS authentication is disabled.
|
|
817
|
+
*/
|
|
818
|
+
NON_AUTHENTICATED = "NON_AUTHENTICATED"
|
|
819
|
+
}
|
|
820
|
+
|
|
738
821
|
export declare type MastercardPaymentOptions = {
|
|
739
822
|
/**
|
|
740
823
|
* Note: Not currently supported by Mastercard SRC
|
|
741
824
|
*/
|
|
742
825
|
dpaDynamicDataTtlMinutes?: number;
|
|
743
826
|
/**
|
|
744
|
-
*
|
|
827
|
+
* If not provided, or provided but the issuer does not support tokenization, a PAN payload will be returned;
|
|
828
|
+
* otherwise, a token response will be returned.
|
|
745
829
|
* Valid values for enum:
|
|
746
|
-
* • CARD_APPLICATION_CRYPTOGRAM_SHORT_FORM
|
|
830
|
+
* • CARD_APPLICATION_CRYPTOGRAM_SHORT_FORM
|
|
747
831
|
*/
|
|
748
832
|
dynamicDataType?: MastercardDynamicDataTypeEnum;
|
|
749
833
|
};
|
|
@@ -857,7 +941,7 @@ export declare enum VisaAuthenticatedStateEnum {
|
|
|
857
941
|
|
|
858
942
|
declare type VisaAuthenticationMethod = {
|
|
859
943
|
/**
|
|
860
|
-
*
|
|
944
|
+
* SRCI to indicate for a particular transaction if Click to Pay needs to perform managed authentication or not.
|
|
861
945
|
* Valid values for enum:
|
|
862
946
|
* • SMS_OTP
|
|
863
947
|
* • EMAIL_OTP
|
|
@@ -929,10 +1013,11 @@ declare enum VisaAuthenticationMethodTypeEnum {
|
|
|
929
1013
|
|
|
930
1014
|
export declare type VisaAuthenticationOptions = {
|
|
931
1015
|
/**
|
|
932
|
-
* Whether the
|
|
1016
|
+
* Whether the SRCI or merchant prefers an authenticated payload.
|
|
933
1017
|
* Valid values for enum:
|
|
934
|
-
* • AUTHENTICATED
|
|
935
|
-
* • NON_AUTHENTICATED
|
|
1018
|
+
* • AUTHENTICATED - Visa will always perform 3DS.
|
|
1019
|
+
* • NON_AUTHENTICATED - The integrator prefers to handle 3DS themselves, however,
|
|
1020
|
+
* Visa will initiate 3DS if its risk system determines that a transaction is high risk.
|
|
936
1021
|
*/
|
|
937
1022
|
payloadRequested: VisaAuthenticatedStateEnum;
|
|
938
1023
|
/**
|
|
@@ -965,12 +1050,12 @@ export declare type VisaAuthenticationOptions = {
|
|
|
965
1050
|
|
|
966
1051
|
declare type VisaAuthenticationPreferences = {
|
|
967
1052
|
/**
|
|
968
|
-
* An
|
|
1053
|
+
* An SRCI may provide its preferences related to an authentication method so that SRC system can facilitate
|
|
969
1054
|
* authentication; for example, the preferred value for the Challenge indicator may be passed here.
|
|
970
1055
|
*/
|
|
971
1056
|
authenticationMethods?: VisaAuthenticationMethod[];
|
|
972
1057
|
/**
|
|
973
|
-
* Whether the
|
|
1058
|
+
* Whether the SRCI or merchant prefers an authenticated payload.
|
|
974
1059
|
* Valid values for enum:
|
|
975
1060
|
* • AUTHENTICATED
|
|
976
1061
|
* • NON_AUTHENTICATED
|
|
@@ -1056,7 +1141,7 @@ export declare enum VisaDpaThreeDsPreferenceEnum {
|
|
|
1056
1141
|
|
|
1057
1142
|
export declare type VisaDpaTransactionOptions = {
|
|
1058
1143
|
/**
|
|
1059
|
-
* Authentication preferences provided by the
|
|
1144
|
+
* Authentication preferences provided by the SRCI.
|
|
1060
1145
|
* Format: An authenticationPreferences structure
|
|
1061
1146
|
*
|
|
1062
1147
|
* Conditionality: This will be overridden by the properties of VisaAuthenticationOptions
|
|
@@ -1179,15 +1264,6 @@ export declare type VisaDpaTransactionOptions = {
|
|
|
1179
1264
|
* • INSTALLMENT
|
|
1180
1265
|
*/
|
|
1181
1266
|
orderType?: VisaOrderTypeEnum;
|
|
1182
|
-
/**
|
|
1183
|
-
* The verbosity of payload requested.
|
|
1184
|
-
* • FULL - includes everything; all PCI & PII data (card/token, billing, shipping, consumer)
|
|
1185
|
-
* • SUMMARY - (default) no JWE. If FULL needed during checkout, SRCi needs to make a request for it explicitly.
|
|
1186
|
-
* • PAYMENT - same as FULL
|
|
1187
|
-
* • NON_PAYMENT - only PII (billing, shipping, consumer). It has both SUMMARY and encryptedPayload without card, token, or dynamicData.
|
|
1188
|
-
* • NONE - just srcCorrelationId (with COMPLETE dcfActionCode)
|
|
1189
|
-
*/
|
|
1190
|
-
payloadTypeIndicator?: VisaPayloadTypeIndicatorEnum;
|
|
1191
1267
|
/**
|
|
1192
1268
|
* Amount of the transaction.
|
|
1193
1269
|
* Required when transaction authentication is performed.
|
|
@@ -1229,11 +1305,11 @@ export declare enum VisaDynamicDataTypeEnum {
|
|
|
1229
1305
|
|
|
1230
1306
|
export declare type VisaInitConfiguration = {
|
|
1231
1307
|
/**
|
|
1232
|
-
*
|
|
1308
|
+
* SRCI identifier generated by an SRC system during the onboarding process.
|
|
1233
1309
|
*/
|
|
1234
1310
|
srcInitiatorId: string;
|
|
1235
1311
|
/**
|
|
1236
|
-
* A unique ID provided by the
|
|
1312
|
+
* A unique ID provided by the SRCI for the DPA, which can be used as an external client ID.
|
|
1237
1313
|
* Required if srciDpaId in dpaData is not provided.
|
|
1238
1314
|
*/
|
|
1239
1315
|
srciDpaId: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netceterapx/click-to-pay-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Click-to-pay web-SDK for supporting SecureRemoteCommerce on web platforms",
|
|
5
5
|
"main": "build/click-to-pay-sdk.es.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,68 +29,68 @@
|
|
|
29
29
|
"registry": "https://registry.npmjs.org"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@babel/core": "^7.
|
|
33
|
-
"@cyclonedx/cyclonedx-npm": "^
|
|
34
|
-
"@eslint/eslintrc": "^3.
|
|
35
|
-
"@eslint/js": "^9.
|
|
36
|
-
"@rollup/plugin-alias": "^
|
|
37
|
-
"@rollup/plugin-commonjs": "^
|
|
38
|
-
"@rollup/plugin-node-resolve": "^16.0.
|
|
39
|
-
"@rollup/plugin-replace": "^6.0.
|
|
32
|
+
"@babel/core": "^7.28.6",
|
|
33
|
+
"@cyclonedx/cyclonedx-npm": "^4.1.2",
|
|
34
|
+
"@eslint/eslintrc": "^3.3.3",
|
|
35
|
+
"@eslint/js": "^9.39.2",
|
|
36
|
+
"@rollup/plugin-alias": "^6.0.0",
|
|
37
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
38
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
39
|
+
"@rollup/plugin-replace": "^6.0.3",
|
|
40
40
|
"@rollup/plugin-terser": "^0.4.4",
|
|
41
|
-
"@rollup/plugin-typescript": "^12.
|
|
41
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
42
42
|
"@rollup/plugin-url": "^8.0.2",
|
|
43
|
-
"@sveltejs/vite-plugin-svelte": "^
|
|
44
|
-
"@testing-library/jest-dom": "^6.
|
|
45
|
-
"@testing-library/svelte": "^5.
|
|
46
|
-
"@tsconfig/svelte": "^5.0.
|
|
43
|
+
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
|
44
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
45
|
+
"@testing-library/svelte": "^5.3.1",
|
|
46
|
+
"@tsconfig/svelte": "^5.0.6",
|
|
47
47
|
"@types/eslint__js": "^8.42.3",
|
|
48
|
-
"@types/node": "^
|
|
48
|
+
"@types/node": "^25.0.10",
|
|
49
49
|
"@types/postcss-url": "^10.0.4",
|
|
50
50
|
"@types/uuid": "^10.0.0",
|
|
51
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
52
|
-
"@typescript-eslint/parser": "^8.
|
|
53
|
-
"@vitest/coverage-v8": "^
|
|
54
|
-
"babel-loader": "^
|
|
55
|
-
"eslint": "^9.
|
|
56
|
-
"eslint-config-prettier": "^10.
|
|
57
|
-
"eslint-plugin-prettier": "^5.
|
|
58
|
-
"eslint-plugin-svelte": "^
|
|
59
|
-
"globals": "^
|
|
60
|
-
"jsdom": "^
|
|
51
|
+
"@typescript-eslint/eslint-plugin": "^8.53.1",
|
|
52
|
+
"@typescript-eslint/parser": "^8.53.1",
|
|
53
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
54
|
+
"babel-loader": "^10.0.0",
|
|
55
|
+
"eslint": "^9.39.2",
|
|
56
|
+
"eslint-config-prettier": "^10.1.8",
|
|
57
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
58
|
+
"eslint-plugin-svelte": "^3.14.0",
|
|
59
|
+
"globals": "^17.1.0",
|
|
60
|
+
"jsdom": "^27.4.0",
|
|
61
61
|
"path-browserify": "^1.0.1",
|
|
62
|
-
"postcss": "^8.5.
|
|
62
|
+
"postcss": "^8.5.6",
|
|
63
63
|
"postcss-url": "^10.1.3",
|
|
64
|
-
"prettier": "^3.4
|
|
65
|
-
"prettier-plugin-svelte": "^3.
|
|
66
|
-
"rollup": "^4.
|
|
64
|
+
"prettier": "^3.7.4",
|
|
65
|
+
"prettier-plugin-svelte": "^3.4.1",
|
|
66
|
+
"rollup": "^4.55.1",
|
|
67
67
|
"rollup-plugin-copy": "^3.5.0",
|
|
68
|
-
"rollup-plugin-css-only": "^4.5.
|
|
69
|
-
"rollup-plugin-svelte": "^7.2.
|
|
70
|
-
"shadow-dom-testing-library": "^1.
|
|
71
|
-
"shelljs": "^0.
|
|
72
|
-
"sirv-cli": "^3.0.
|
|
68
|
+
"rollup-plugin-css-only": "^4.5.5",
|
|
69
|
+
"rollup-plugin-svelte": "^7.2.3",
|
|
70
|
+
"shadow-dom-testing-library": "^1.13.1",
|
|
71
|
+
"shelljs": "^0.10.0",
|
|
72
|
+
"sirv-cli": "^3.0.1",
|
|
73
73
|
"stream-browserify": "^3.0.0",
|
|
74
|
-
"stylelint": "^
|
|
75
|
-
"stylelint-config-standard": "^
|
|
76
|
-
"svelte": "^5.
|
|
77
|
-
"svelte-check": "^4.
|
|
78
|
-
"svelte-eslint-parser": "^
|
|
74
|
+
"stylelint": "^17.0.0",
|
|
75
|
+
"stylelint-config-standard": "^40.0.0",
|
|
76
|
+
"svelte": "^5.46.3",
|
|
77
|
+
"svelte-check": "^4.3.5",
|
|
78
|
+
"svelte-eslint-parser": "^1.4.1",
|
|
79
79
|
"svelte-loader": "^3.2.4",
|
|
80
80
|
"svelte-preprocess": "^6.0.3",
|
|
81
81
|
"ts-node": "^10.9.2",
|
|
82
82
|
"tslib": "^2.8.1",
|
|
83
|
-
"typescript": "5.
|
|
84
|
-
"typescript-eslint": "^8.
|
|
85
|
-
"vite": "^
|
|
86
|
-
"vite-plugin-dts": "^4.5.
|
|
83
|
+
"typescript": "^5.9.3",
|
|
84
|
+
"typescript-eslint": "^8.53.0",
|
|
85
|
+
"vite": "^7.3.1",
|
|
86
|
+
"vite-plugin-dts": "^4.5.4",
|
|
87
87
|
"vite-plugin-eslint": "^1.8.1",
|
|
88
|
-
"vitest": "^
|
|
88
|
+
"vitest": "^4.0.18"
|
|
89
89
|
},
|
|
90
90
|
"dependencies": {
|
|
91
|
-
"final-form": "^
|
|
92
|
-
"jose": "^
|
|
91
|
+
"final-form": "^5.0.0",
|
|
92
|
+
"jose": "^6.1.3",
|
|
93
93
|
"svelte-final-form": "^1.2.3",
|
|
94
|
-
"uuid": "^
|
|
94
|
+
"uuid": "^13.0.0"
|
|
95
95
|
}
|
|
96
96
|
}
|