@alipay/ams-checkout 0.0.1726734012-dev.1 → 0.0.1726734012-dev.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/umd/ams-checkout.min.js +1 -1
- package/esm/component/channel.d.ts +19 -0
- package/esm/component/channel.js +87 -0
- package/esm/component/component.inline.style.d.ts +10 -0
- package/esm/component/component.inline.style.js +121 -0
- package/esm/component/component.popup.style.d.ts +25 -0
- package/esm/component/component.popup.style.js +203 -0
- package/esm/component/popupWindow.style.d.ts +11 -0
- package/esm/component/popupWindow.style.js +121 -0
- package/esm/config/index.d.ts +11 -0
- package/esm/config/index.js +20 -1
- package/esm/constant/index.d.ts +25 -0
- package/esm/constant/index.js +28 -0
- package/esm/core/bus/index.d.ts +3 -3
- package/esm/core/bus/index.js +14 -14
- package/esm/core/component/address.d.ts +8 -0
- package/esm/core/component/address.js +72 -0
- package/esm/core/component/appPreloadProcessing.js +2 -2
- package/esm/core/component/ckp/index.js +12 -8
- package/esm/core/component/element/components/address.d.ts +19 -0
- package/esm/core/component/element/components/address.js +68 -0
- package/esm/core/component/element/components/auth.d.ts +17 -0
- package/esm/core/component/element/components/auth.js +60 -0
- package/esm/core/component/element/components/payment.d.ts +19 -0
- package/esm/core/component/element/components/payment.js +74 -0
- package/esm/core/component/element/index.d.ts +47 -0
- package/esm/core/component/element/index.js +817 -0
- package/esm/core/component/element/mock.d.ts +4 -0
- package/esm/core/component/element/mock.js +491 -0
- package/esm/core/component/element/type.d.ts +191 -0
- package/esm/core/component/element/type.js +36 -0
- package/esm/core/component/element/utils.d.ts +13 -0
- package/esm/core/component/element/utils.js +6 -0
- package/esm/core/component/index.d.ts +14 -7
- package/esm/core/component/index.js +137 -78
- package/esm/core/drop-in/index.js +2 -2
- package/esm/core/instance/index.d.ts +2 -1
- package/esm/core/instance/index.js +27 -12
- package/esm/foundation/core/index.d.ts +28 -0
- package/esm/foundation/core/index.js +396 -0
- package/esm/foundation/index.d.ts +75 -0
- package/esm/foundation/index.js +42 -0
- package/esm/foundation/product-processor/easysafepay/deps.d.ts +18 -0
- package/esm/foundation/product-processor/easysafepay/deps.js +12 -0
- package/esm/foundation/product-processor/easysafepay/index.d.ts +26 -0
- package/esm/foundation/product-processor/easysafepay/index.js +464 -0
- package/esm/foundation/service/api-bus/ability/callback.d.ts +9 -0
- package/esm/foundation/service/api-bus/ability/callback.js +55 -0
- package/esm/foundation/service/api-bus/ability/globalData.d.ts +10 -0
- package/esm/foundation/service/api-bus/ability/globalData.js +89 -0
- package/esm/foundation/service/api-bus/ability/request.d.ts +10 -0
- package/esm/foundation/service/api-bus/ability/request.js +151 -0
- package/esm/foundation/service/api-bus/ability/security.d.ts +12 -0
- package/esm/foundation/service/api-bus/ability/security.js +161 -0
- package/esm/foundation/service/api-bus/ability/tracker.d.ts +9 -0
- package/esm/foundation/service/api-bus/ability/tracker.js +80 -0
- package/esm/foundation/service/api-bus/busManager.d.ts +127 -0
- package/esm/foundation/service/api-bus/busManager.js +398 -0
- package/esm/foundation/service/api-bus/index.d.ts +20 -0
- package/esm/foundation/service/api-bus/index.js +88 -0
- package/esm/foundation/service/api-bus/interface.d.ts +48 -0
- package/esm/foundation/service/api-bus/interface.js +54 -0
- package/esm/foundation/service/container/index.d.ts +32 -0
- package/esm/foundation/service/container/index.js +332 -0
- package/esm/foundation/service/container/popup.d.ts +17 -0
- package/esm/foundation/service/container/popup.js +103 -0
- package/esm/foundation/service/container/utils.d.ts +7 -0
- package/esm/foundation/service/container/utils.js +48 -0
- package/esm/foundation/service/event-center.d.ts +82 -0
- package/esm/foundation/service/event-center.js +274 -0
- package/esm/foundation/service/global-data/index.d.ts +11 -0
- package/esm/foundation/service/global-data/index.js +68 -0
- package/esm/foundation/service/index.d.ts +19 -0
- package/esm/foundation/service/index.js +82 -0
- package/esm/foundation/service/log/index.d.ts +43 -0
- package/esm/foundation/service/log/index.js +250 -0
- package/esm/foundation/service/log/keys.d.ts +13 -0
- package/esm/foundation/service/log/keys.js +103 -0
- package/esm/foundation/service/log/processor.d.ts +9 -0
- package/esm/foundation/service/log/processor.js +148 -0
- package/esm/foundation/service/log/types.d.ts +32 -0
- package/esm/foundation/service/log/types.js +1 -0
- package/esm/foundation/service/requester/deps.d.ts +17 -0
- package/esm/foundation/service/requester/deps.js +11 -0
- package/esm/foundation/service/requester/requester.d.ts +22 -0
- package/esm/foundation/service/requester/requester.js +217 -0
- package/esm/foundation/service/security/index.d.ts +28 -0
- package/esm/foundation/service/security/index.js +284 -0
- package/esm/foundation/service/security/security.d.ts +33 -0
- package/esm/foundation/service/security/security.js +182 -0
- package/esm/foundation/utils/gray_scale_utils.d.ts +7 -0
- package/esm/foundation/utils/gray_scale_utils.js +40 -0
- package/esm/foundation/utils/payment_context_utils.d.ts +13 -0
- package/esm/foundation/utils/payment_context_utils.js +57 -0
- package/esm/foundation/utils/payment_product_utils.d.ts +13 -0
- package/esm/foundation/utils/payment_product_utils.js +38 -0
- package/esm/foundation/utils/redirect_utils.d.ts +11 -0
- package/esm/foundation/utils/redirect_utils.js +262 -0
- package/esm/foundation/utils/system_events.d.ts +4 -0
- package/esm/foundation/utils/system_events.js +66 -0
- package/esm/foundation/utils/web_app_url_utils.d.ts +46 -0
- package/esm/foundation/utils/web_app_url_utils.js +112 -0
- package/esm/index.d.ts +21 -12
- package/esm/index.js +116 -56
- package/esm/plugin/applepay/component.js +13 -11
- package/esm/plugin/applepay/index.js +10 -6
- package/esm/plugin/applepay/service.d.ts +2 -2
- package/esm/plugin/applepay/service.js +26 -18
- package/esm/plugin/component/cashierApp.d.ts +10 -8
- package/esm/plugin/component/cashierApp.js +48 -11
- package/esm/plugin/component/channel.d.ts +4 -3
- package/esm/plugin/component/channel.js +39 -2
- package/esm/plugin/component/component.inline.style.d.ts +9 -10
- package/esm/plugin/component/component.inline.style.js +93 -10
- package/esm/plugin/component/component.popup.style.d.ts +15 -6
- package/esm/plugin/component/component.popup.style.js +30 -7
- package/esm/plugin/component/index.d.ts +14 -8
- package/esm/plugin/component/index.js +384 -187
- package/esm/plugin/component/popupWindow.style.d.ts +5 -2
- package/esm/plugin/component/popupWindow.style.js +70 -14
- package/esm/plugin/const.js +5 -5
- package/esm/plugin/drop-in/index.d.ts +5 -5
- package/esm/plugin/drop-in/index.js +7 -7
- package/esm/plugin/payment-element/utils.d.ts +2 -0
- package/esm/plugin/payment-element/utils.js +6 -0
- package/esm/plugin/paypal/index.js +2 -1
- package/esm/plugin/type.d.ts +4 -3
- package/esm/service/element.d.ts +4 -0
- package/esm/service/element.js +51 -0
- package/esm/service/index.d.ts +1 -0
- package/esm/service/index.js +6 -2
- package/esm/types/index.d.ts +339 -40
- package/esm/types/index.js +119 -55
- package/esm/util/createIframeNode.d.ts +2 -2
- package/esm/util/createIframeNode.js +3 -3
- package/esm/util/getBackScheme.d.ts +5 -0
- package/esm/util/getBackScheme.js +133 -0
- package/esm/util/index.js +4 -8
- package/esm/util/logger.d.ts +3 -3
- package/esm/util/logger.js +49 -13
- package/esm/util/security.d.ts +3 -2
- package/esm/util/security.js +2 -2
- package/esm/util/spm-map.d.ts +172 -0
- package/esm/util/spm-map.js +172 -0
- package/package.json +3 -1
package/esm/types/index.d.ts
CHANGED
@@ -5,6 +5,18 @@
|
|
5
5
|
* 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
|
6
6
|
* 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
|
7
7
|
*/
|
8
|
+
export * from '../core/component/element/type';
|
9
|
+
export type onChange = () => onCnageResult;
|
10
|
+
interface onCnageResult {
|
11
|
+
complete: boolean;
|
12
|
+
addressValue: AddressItem[];
|
13
|
+
selectIndex: number | string;
|
14
|
+
}
|
15
|
+
export type getValue = (hasValidate: boolean) => Promise<AddressValueResult>;
|
16
|
+
interface AddressValueResult {
|
17
|
+
complete: boolean;
|
18
|
+
value: AddressItem;
|
19
|
+
}
|
8
20
|
/**
|
9
21
|
* SDK options
|
10
22
|
*/
|
@@ -17,18 +29,20 @@ export interface IoptionsParams {
|
|
17
29
|
onLog?: callOnLog;
|
18
30
|
onEventCallback?: callOnEventCallback;
|
19
31
|
onClose?: callOnClose;
|
20
|
-
|
21
|
-
mode?: string;
|
32
|
+
onChange?: onChange;
|
22
33
|
analytics?: {
|
23
34
|
enabled: boolean;
|
24
35
|
};
|
25
|
-
product?: string;
|
26
36
|
onBeforeSubmit?: callOnBeforeSubmit;
|
37
|
+
product?: string;
|
38
|
+
networkMode?: string;
|
39
|
+
mode?: string;
|
40
|
+
securityRegion?: 'US' | 'SG' | 'DE';
|
27
41
|
}
|
28
42
|
export interface IApplePayOptionsParams extends Pick<IoptionsParams, 'locale' | 'environment' | 'onEventCallback' | 'analytics'> {
|
29
43
|
}
|
30
44
|
export type Iselector = string;
|
31
|
-
export declare enum
|
45
|
+
export declare enum DisplayTypeEnum {
|
32
46
|
'popup' = "popup",
|
33
47
|
'inline' = "inline"
|
34
48
|
}
|
@@ -41,7 +55,11 @@ export interface IcreatePaymentParams {
|
|
41
55
|
backgroundColor?: string;
|
42
56
|
};
|
43
57
|
}
|
44
|
-
export declare enum
|
58
|
+
export declare enum ComponentSignEnumV2 {
|
59
|
+
'ELEMENT_PAYMENT' = "ELEMENT_PAYMENT_ALL",
|
60
|
+
'ELEMENT_ADDRESS' = "ELEMENT_ADDRESS_ALL"
|
61
|
+
}
|
62
|
+
export declare enum ComponentSignEnum {
|
45
63
|
'EASY_PAY_WALLET' = "EASY_PAY_WALLET",
|
46
64
|
'EASY_PAY_APM' = "EASY_PAY_APM",
|
47
65
|
'CASHIER_PAYMENT_CARD' = "CASHIER_PAYMENT_CARD",
|
@@ -51,9 +69,11 @@ export declare enum componentSignEnum {
|
|
51
69
|
'AUTO_DEBIT_PAY_WALLET' = "AUTO_DEBIT_PAY_WALLET",
|
52
70
|
'NONE' = "NONE",
|
53
71
|
'VAULTING_CARD' = "VAULTING_CARD",
|
54
|
-
'CHECKOUT_PAYMENT' = "CHECKOUT_PAYMENT"
|
72
|
+
'CHECKOUT_PAYMENT' = "CHECKOUT_PAYMENT",
|
73
|
+
'ELEMENT_PAYMENT' = "ELEMENT_PAYMENT_ALL",
|
74
|
+
'ELEMENT_ADDRESS' = "ELEMENT_ADDRESS_ALL"
|
55
75
|
}
|
56
|
-
export declare enum
|
76
|
+
export declare enum ProductSceneEnum {
|
57
77
|
'EASY_PAY' = "EASY_PAY",
|
58
78
|
'CASHIER_PAYMENT' = "CASHIER_PAYMENT",
|
59
79
|
'AUTO_DEBIT' = "AUTO_DEBIT",
|
@@ -61,34 +81,98 @@ export declare enum productSceneEnum {
|
|
61
81
|
'VAULTING' = "VAULTING",
|
62
82
|
'FLASH_BUY' = "FLASH_BUY",
|
63
83
|
'CARD_APPLE_PAY' = "CARD_APPLE_PAY",
|
84
|
+
'ELEMENT_PAYMENT' = "ELEMENT_PAYMENT",
|
85
|
+
'ELEMENT_ADDRESS' = "ELEMENT_ADDRESS",
|
64
86
|
'CHECKOUT_PAYMENT' = "CHECKOUT_PAYMENT"
|
65
87
|
}
|
66
|
-
export declare enum
|
88
|
+
export declare enum PaymentMethodCategoryTypeEnum {
|
67
89
|
'CARD' = "CARD",
|
68
90
|
'WALLET' = "WALLET",
|
69
91
|
'BANK' = "BANK",
|
70
|
-
'APM' = "APM"
|
92
|
+
'APM' = "APM",
|
93
|
+
'ALL' = "ALL"
|
71
94
|
}
|
72
95
|
export interface DeviceIdParameter {
|
73
96
|
scene?: string;
|
74
|
-
productScene?:
|
75
|
-
paymentMethodCategoryType?:
|
97
|
+
productScene?: ProductSceneEnum;
|
98
|
+
paymentMethodCategoryType?: PaymentMethodCategoryTypeEnum;
|
76
99
|
tokenCollectTime?: string;
|
77
100
|
dataPollingInterval?: string;
|
78
101
|
}
|
79
102
|
export interface IcreateComponent {
|
80
103
|
sessionData: string;
|
81
104
|
paymentSessionData?: string;
|
105
|
+
elementProps?: {
|
106
|
+
elementLink: string;
|
107
|
+
};
|
108
|
+
appendAliasContainerId?: boolean;
|
82
109
|
notRedirectAfterComplete?: boolean;
|
83
|
-
appearance?:
|
110
|
+
appearance?: {
|
111
|
+
[x: string]: any;
|
112
|
+
themeType?: string;
|
113
|
+
accentColor?: string;
|
114
|
+
};
|
115
|
+
isAppWebview?: boolean;
|
84
116
|
merchantAppointParam?: IMerchantAppointParam;
|
85
117
|
}
|
86
118
|
export interface IappendIframeNodesParams extends IcreateComponent {
|
87
|
-
paymentSessionMetaData:
|
88
|
-
renderDisplayType:
|
119
|
+
paymentSessionMetaData: IPaymentSessionMetaData;
|
120
|
+
renderDisplayType: DisplayTypeEnum;
|
89
121
|
selector?: Iselector;
|
90
122
|
paypalConfiguration?: IPaypalConfiguration;
|
91
|
-
|
123
|
+
/** 将address-element参数定义合入原参数定义 */
|
124
|
+
configParams?: {
|
125
|
+
hideFields?: string[];
|
126
|
+
addressAutoSuggestDisabled?: addressAutoSuggestDisabledType;
|
127
|
+
};
|
128
|
+
prefillValue?: AddressItem[];
|
129
|
+
componentSession?: string;
|
130
|
+
loca?: string;
|
131
|
+
}
|
132
|
+
/** 表单地址数据 */
|
133
|
+
export interface AddressItem {
|
134
|
+
shippingName: {
|
135
|
+
firstName: string;
|
136
|
+
lastName: string;
|
137
|
+
};
|
138
|
+
/** 手机号 */
|
139
|
+
shippingPhoneNo: string;
|
140
|
+
/** 地址 */
|
141
|
+
shippingAddress: {
|
142
|
+
/** 国家 */
|
143
|
+
region: string;
|
144
|
+
/** 地址1 */
|
145
|
+
address1: string;
|
146
|
+
/** 地址2 */
|
147
|
+
address2: string;
|
148
|
+
/** 省份 */
|
149
|
+
province?: string;
|
150
|
+
/** 城市 */
|
151
|
+
city?: string;
|
152
|
+
/** 地址级联 四层 【province,city,district,subDistrict】 */
|
153
|
+
district?: string[];
|
154
|
+
/** 邮政编码 */
|
155
|
+
zipCode: string;
|
156
|
+
/** 对应地址级联数据对象 */
|
157
|
+
districtValues?: {
|
158
|
+
/** 城市 */
|
159
|
+
city?: string;
|
160
|
+
/** 区/县 */
|
161
|
+
district?: string;
|
162
|
+
/** 省份 */
|
163
|
+
province?: string;
|
164
|
+
/** 子区域 */
|
165
|
+
subDistrict?: string;
|
166
|
+
};
|
167
|
+
};
|
168
|
+
/** 备注 */
|
169
|
+
notes?: string;
|
170
|
+
open?: boolean;
|
171
|
+
/** 是否默认地址 */
|
172
|
+
prefer?: '1' | '0';
|
173
|
+
shippingId?: string;
|
174
|
+
}
|
175
|
+
type addressAutoSuggestDisabledType = 0 | 1;
|
92
176
|
export interface IPaypalConfiguration {
|
93
177
|
style?: object;
|
94
178
|
blockPayPalCreditButton?: boolean;
|
@@ -119,8 +203,8 @@ export interface Isubmit {
|
|
119
203
|
billingAddress?: IbillingAddress;
|
120
204
|
}
|
121
205
|
export interface IpaymentSessionConfig {
|
122
|
-
productScene:
|
123
|
-
paymentMethodCategoryType
|
206
|
+
productScene: ProductSceneEnum;
|
207
|
+
paymentMethodCategoryType?: PaymentMethodCategoryTypeEnum;
|
124
208
|
productSceneVersion: string;
|
125
209
|
}
|
126
210
|
export interface IpaymentSecurityConfig {
|
@@ -138,14 +222,29 @@ export interface IsecurityConfig {
|
|
138
222
|
h5gateway: string;
|
139
223
|
}
|
140
224
|
export interface InitSecurityConfig {
|
141
|
-
product:
|
225
|
+
product: ProductSceneEnum;
|
142
226
|
region?: string;
|
227
|
+
securityRegion?: 'US' | 'SG' | 'DE';
|
143
228
|
}
|
144
229
|
export interface frontModulesToBeLoadedInterface {
|
145
230
|
acquirerName: string;
|
146
231
|
scriptUrl: string;
|
147
232
|
}
|
148
|
-
export interface
|
233
|
+
export interface PaymentSessionActionData {
|
234
|
+
amountConfirmRequired?: boolean;
|
235
|
+
autoDebitWithToken: boolean;
|
236
|
+
enableSignAgreement?: boolean;
|
237
|
+
skipSdkQuery: boolean;
|
238
|
+
requireFastSdk: boolean;
|
239
|
+
nonCompliant?: boolean;
|
240
|
+
nonInitSecuritySDK?: boolean;
|
241
|
+
skipSdkQueryForm?: {
|
242
|
+
value: boolean;
|
243
|
+
version: string;
|
244
|
+
platform: string;
|
245
|
+
};
|
246
|
+
}
|
247
|
+
export interface IPaymentSessionMetaData {
|
149
248
|
clientId?: string;
|
150
249
|
renderDisplayType?: string;
|
151
250
|
paymentSessionConfig?: IpaymentSessionConfig;
|
@@ -153,18 +252,8 @@ export interface IpaymentSessionMetaData {
|
|
153
252
|
moneyView?: any;
|
154
253
|
extendInfo?: string;
|
155
254
|
paymentMethodInfoView?: any;
|
156
|
-
|
157
|
-
|
158
|
-
autoDebitWithToken: boolean;
|
159
|
-
enableSignAgreement?: boolean;
|
160
|
-
skipSdkQuery: boolean;
|
161
|
-
requireFastSdk: boolean;
|
162
|
-
skipSdkQueryForm?: {
|
163
|
-
value: boolean;
|
164
|
-
version: string;
|
165
|
-
platform: string;
|
166
|
-
};
|
167
|
-
};
|
255
|
+
paymentView?: any;
|
256
|
+
action?: PaymentSessionActionData;
|
168
257
|
authUrlInfo?: {
|
169
258
|
appIdentifier?: string;
|
170
259
|
applinkUrl?: string;
|
@@ -235,6 +324,9 @@ export interface IpaymentSessionMetaData {
|
|
235
324
|
};
|
236
325
|
frontModulesToBeLoaded?: frontModulesToBeLoadedInterface[];
|
237
326
|
};
|
327
|
+
connectFactor?: {
|
328
|
+
enableConnect?: boolean;
|
329
|
+
};
|
238
330
|
}
|
239
331
|
export interface IPaymentSessionFactor {
|
240
332
|
merchantInfo?: IMerchantInfo;
|
@@ -281,7 +373,7 @@ export declare enum networkModeEnum {
|
|
281
373
|
export interface IcheckoutState {
|
282
374
|
paymentMethodType?: string;
|
283
375
|
}
|
284
|
-
export declare enum
|
376
|
+
export declare enum EnvironmentEnum {
|
285
377
|
sandbox = "sandbox",
|
286
378
|
prod = "prod",
|
287
379
|
light_sandbox = "light_sandbox"
|
@@ -302,7 +394,7 @@ export interface Ienv {
|
|
302
394
|
terminalType: terminalTypeEnum;
|
303
395
|
environment: string;
|
304
396
|
}
|
305
|
-
export declare enum
|
397
|
+
export declare enum PlatformEnum {
|
306
398
|
desktop = "desktop",
|
307
399
|
mobile = "mobile"
|
308
400
|
}
|
@@ -356,19 +448,19 @@ export type callOnBeforeSubmit = (state?: Record<string, any>) => Promise<onBefo
|
|
356
448
|
* @description Create an event handler, In pop-up layer mode, the user clicks the semi floating layer close button and is called.
|
357
449
|
*/
|
358
450
|
export type callOnClose = () => void;
|
359
|
-
export declare enum
|
451
|
+
export declare enum MessageName {
|
360
452
|
SDK_TO_APP = "SDK_TO_APP",
|
361
453
|
APP_TO_SDK = "APP_TO_SDK",
|
362
454
|
APP_TO_APP = "APP_TO_APP"
|
363
455
|
}
|
364
|
-
export interface
|
365
|
-
name:
|
456
|
+
export interface EventPayload {
|
457
|
+
name: MessageName;
|
366
458
|
mode?: string;
|
367
459
|
appId?: string;
|
368
460
|
instanceId: string;
|
369
|
-
context:
|
461
|
+
context: EventPayloadContext;
|
370
462
|
}
|
371
|
-
export interface
|
463
|
+
export interface EventPayloadContext {
|
372
464
|
event: string;
|
373
465
|
data: any;
|
374
466
|
eventCallbackId?: string;
|
@@ -384,7 +476,7 @@ export interface AMSCheckoutOptions {
|
|
384
476
|
export interface Ianalytics {
|
385
477
|
enabled: boolean;
|
386
478
|
}
|
387
|
-
export declare enum
|
479
|
+
export declare enum TargetEnum {
|
388
480
|
BLANK = "_blank",
|
389
481
|
SELF = "_self",
|
390
482
|
REPLACE = "_replace"
|
@@ -515,6 +607,7 @@ export interface CashierSubmitPayResult {
|
|
515
607
|
normalUrl?: string;
|
516
608
|
errorStatus?: string;
|
517
609
|
message?: string;
|
610
|
+
traceId?: string;
|
518
611
|
}
|
519
612
|
export declare enum eventCodeEnum {
|
520
613
|
SDK_START_OF_LOADING = "SDK_START_OF_LOADING",
|
@@ -569,6 +662,212 @@ export declare enum ProductSceneVersion {
|
|
569
662
|
V2 = "2.0"
|
570
663
|
}
|
571
664
|
export type IAppendParams = {
|
572
|
-
componentSign:
|
665
|
+
componentSign: ComponentSignEnum;
|
573
666
|
iframeNodesParams: IappendIframeNodesParams;
|
574
667
|
};
|
668
|
+
export declare enum AccountStatusEnum {
|
669
|
+
EFFECTIVE = "EFFECTIVE",
|
670
|
+
UNREGISTERED = "UNREGISTERED"
|
671
|
+
}
|
672
|
+
export type IAccountInfo = {
|
673
|
+
email?: string;
|
674
|
+
verifyId?: string;
|
675
|
+
accountStatus?: AccountStatusEnum;
|
676
|
+
oneAccountId?: string;
|
677
|
+
needOtp?: boolean;
|
678
|
+
errorMsg?: string;
|
679
|
+
inputStatus?: 'success' | 'loading' | 'error' | 'focused' | '';
|
680
|
+
resendLeftTimes?: number;
|
681
|
+
};
|
682
|
+
export interface AccountQueryRequest {
|
683
|
+
paymentSessionData: string;
|
684
|
+
paymentSessionConfig: any;
|
685
|
+
accountInfo: IAccountInfo;
|
686
|
+
}
|
687
|
+
export interface ShippingsItem {
|
688
|
+
shippingName: {
|
689
|
+
firstName: string;
|
690
|
+
lastName: string;
|
691
|
+
};
|
692
|
+
prefer: '1' | '0';
|
693
|
+
shippingId: string;
|
694
|
+
shippingPhoneNo: string;
|
695
|
+
shippingAddress: {
|
696
|
+
region: string;
|
697
|
+
state: string;
|
698
|
+
city: string;
|
699
|
+
address1: string;
|
700
|
+
address2: string;
|
701
|
+
zipCode: string;
|
702
|
+
};
|
703
|
+
}
|
704
|
+
export interface ISubPaymentElementView {
|
705
|
+
defaultText: string;
|
706
|
+
defaultValue: string;
|
707
|
+
elementMandatory: boolean;
|
708
|
+
elementRegx?: string;
|
709
|
+
elementType: string;
|
710
|
+
extendInfo: string;
|
711
|
+
paramIllegalText: string;
|
712
|
+
paymentElementKey: string;
|
713
|
+
title: string;
|
714
|
+
validateFunction?: string;
|
715
|
+
isPart?: boolean;
|
716
|
+
isPartEnd?: boolean;
|
717
|
+
}
|
718
|
+
export interface IPaymentElement {
|
719
|
+
defaultValue: string;
|
720
|
+
elementMandatory: boolean;
|
721
|
+
elementType: string;
|
722
|
+
extendInfo: string;
|
723
|
+
paymentElementKey: string;
|
724
|
+
subPaymentElementView: ISubPaymentElementView[];
|
725
|
+
title: string;
|
726
|
+
}
|
727
|
+
export declare enum InterActionTypeEnum {
|
728
|
+
COLLECT_REDIRECT = "COLLECT_REDIRECT",
|
729
|
+
SHOW_CODE = "SHOW_CODE",
|
730
|
+
COLLECT_SHOW_CODE = "COLLECT_SHOW_CODE",
|
731
|
+
REDIRECT = "REDIRECT"
|
732
|
+
}
|
733
|
+
export interface IAmount {
|
734
|
+
amount?: string;
|
735
|
+
currency: string;
|
736
|
+
currencyLabel: string;
|
737
|
+
formattedAmount?: string;
|
738
|
+
formattedAmountWithCurrency?: string;
|
739
|
+
value: string;
|
740
|
+
}
|
741
|
+
export interface IAmountView {
|
742
|
+
currency: string;
|
743
|
+
currencyDivider: string;
|
744
|
+
currencyLabel: string;
|
745
|
+
currencySymbolPosition: 'L' | 'R';
|
746
|
+
formattedValue: string;
|
747
|
+
value: string;
|
748
|
+
}
|
749
|
+
export interface IPaymentMethod {
|
750
|
+
paymentMethodKey?: string;
|
751
|
+
antomPage?: string;
|
752
|
+
redirectUrl?: string;
|
753
|
+
icon?: string;
|
754
|
+
iconName?: string;
|
755
|
+
logoList?: Array<{
|
756
|
+
cardBrand: string;
|
757
|
+
logoUrl: string;
|
758
|
+
}>;
|
759
|
+
paymentMethod?: string;
|
760
|
+
paymentMethodName: string;
|
761
|
+
paymentMethodType: string;
|
762
|
+
category?: string;
|
763
|
+
paymentElements?: IPaymentElement[];
|
764
|
+
paymentMethodId?: string;
|
765
|
+
paymentMethodDetail?: {
|
766
|
+
last4?: string;
|
767
|
+
requireIssuerAuthentication?: string;
|
768
|
+
};
|
769
|
+
interActionType?: InterActionTypeEnum;
|
770
|
+
recommend?: boolean;
|
771
|
+
expressCheckout?: boolean;
|
772
|
+
webRedirectType?: string;
|
773
|
+
paymentCurrencyList?: string[];
|
774
|
+
paymentAmount?: IAmount;
|
775
|
+
paymentAmountView?: IAmountView;
|
776
|
+
paymentQuoteId?: string;
|
777
|
+
}
|
778
|
+
interface Estimate {
|
779
|
+
unit: string;
|
780
|
+
value: number;
|
781
|
+
}
|
782
|
+
interface DeliveryEstimate {
|
783
|
+
maximum: Estimate;
|
784
|
+
minimum: Estimate;
|
785
|
+
}
|
786
|
+
interface FixedAmount {
|
787
|
+
amount: number;
|
788
|
+
currency: string;
|
789
|
+
}
|
790
|
+
interface ShippingRateData {
|
791
|
+
displayName: string;
|
792
|
+
deliveryEstimate: DeliveryEstimate;
|
793
|
+
fixedAmount: FixedAmount;
|
794
|
+
}
|
795
|
+
export interface ShippingAddress {
|
796
|
+
address1: string;
|
797
|
+
address2: string;
|
798
|
+
city: string;
|
799
|
+
region: string;
|
800
|
+
state: string;
|
801
|
+
zipCode: string;
|
802
|
+
}
|
803
|
+
export interface IUserName {
|
804
|
+
firstName: string;
|
805
|
+
middleName?: string;
|
806
|
+
lastName: string;
|
807
|
+
fullName?: string;
|
808
|
+
}
|
809
|
+
export type Shippings = ShippingsItem[];
|
810
|
+
export type IPaymentMethods = IPaymentMethod[];
|
811
|
+
export interface CKPShipping {
|
812
|
+
shippingRateId?: string;
|
813
|
+
shippingRateData?: ShippingRateData;
|
814
|
+
shippingAddress: ShippingAddress;
|
815
|
+
shippingFee?: IAmount;
|
816
|
+
shippingFeeView?: IAmountView;
|
817
|
+
shippingDescription?: string;
|
818
|
+
deliveryEstimate?: DeliveryEstimate;
|
819
|
+
shippingFeeId?: string;
|
820
|
+
shippingName?: IUserName;
|
821
|
+
shippingPhoneNo?: string;
|
822
|
+
shipToEmail?: string;
|
823
|
+
notes?: string;
|
824
|
+
}
|
825
|
+
export interface AccountQueryResult {
|
826
|
+
accountInfo: IAccountInfo;
|
827
|
+
actionForm?: ActionForm;
|
828
|
+
paymentMethods: IPaymentMethods;
|
829
|
+
shippings: Shippings;
|
830
|
+
success: boolean;
|
831
|
+
errorCode?: string;
|
832
|
+
errorMessage?: string;
|
833
|
+
errorStatus?: string;
|
834
|
+
shippingInfo?: CKPShipping;
|
835
|
+
}
|
836
|
+
export declare enum ElementPaymentMethod {
|
837
|
+
CONTAINER_ELEMENT = "CONTAINER_ELEMENT",
|
838
|
+
AUTH_ELEMENT = "AUTH_ELEMENT",
|
839
|
+
ADDRESS_ELEMENT = "ADDRESS_ELEMENT",
|
840
|
+
PAYMENT_ELEMENT = "PAYMENT_ELEMENT"
|
841
|
+
}
|
842
|
+
export declare enum ElementPaymentEvent {
|
843
|
+
INITIAL_DATA_READY = "initialDataReady",
|
844
|
+
CAPTURE_ASSET = "onCaptureAsset",
|
845
|
+
SIGN_OUT = "onSignout",
|
846
|
+
BLUR = "onBlur",
|
847
|
+
VALIDATE = "validate",
|
848
|
+
SUBMIT_RISK = "onSubmitRisk",
|
849
|
+
AFTER_SUBMIT = "onAfterSubmit",
|
850
|
+
SIZE_CHANGE = "onSizeChange",
|
851
|
+
LAUNCH = "onLaunch",
|
852
|
+
CALLBACK = "callback",
|
853
|
+
LOG = "log"
|
854
|
+
}
|
855
|
+
export declare enum ConnectErrorCode {
|
856
|
+
RISK_REJECT = "RISK_REJECT",
|
857
|
+
USER_AUTH_VERIFICATION_FAILED = "USER_AUTH_VERIFICATION_FAILED",
|
858
|
+
USER_NOT_EXISTS = "USER_NOT_EXISTS"
|
859
|
+
}
|
860
|
+
export interface IoptionsAddressParams {
|
861
|
+
environment?: string;
|
862
|
+
locale?: string;
|
863
|
+
onSizeChanged?: callOnSizeChanged;
|
864
|
+
onChange?: onChange;
|
865
|
+
analytics?: {
|
866
|
+
enabled: boolean;
|
867
|
+
};
|
868
|
+
product?: string;
|
869
|
+
}
|
870
|
+
export declare enum RiskSdkInfoEnum {
|
871
|
+
NEED = "need",
|
872
|
+
NO_NEED = "noneed"
|
873
|
+
}
|