@alipay/ams-checkout 0.0.1783663570-dev.6 → 0.0.1784095668-dev.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/ams-checkout.js +3 -4
- package/dist/ams-checkout.min.js +1 -2
- package/esm/config/index.d.ts +0 -7
- package/esm/config/index.js +2 -2
- package/esm/constant/element.d.ts +1 -2
- package/esm/constant/element.js +0 -1
- package/esm/constant/index.d.ts +21 -4
- package/esm/core/component/element/elementController/index.d.ts +3 -3
- package/esm/core/component/element/elementController/index.js +42 -66
- package/esm/core/component/element/elementProcessor/paymentProcessor.js +10 -13
- package/esm/core/component/element/index.d.ts +1 -4
- package/esm/core/component/element/index.js +4 -19
- package/esm/core/component/element/type.d.ts +18 -16
- package/esm/core/instance/index.d.ts +4 -12
- package/esm/core/instance/index.js +26 -152
- package/esm/foundation/service/event-center.js +1 -1
- package/esm/foundation/service/security/index.d.ts +4 -9
- package/esm/foundation/service/security/index.js +35 -158
- package/esm/foundation/service/security/security.d.ts +1 -22
- package/esm/foundation/service/security/security.js +37 -150
- package/esm/foundation/utils/preload_helper.d.ts +3 -6
- package/esm/foundation/utils/preload_helper.js +32 -122
- package/esm/main.js +4 -4
- package/esm/modern/index.d.ts +1 -5
- package/esm/modern/index.js +51 -1
- package/esm/modern/stageName.d.ts +3 -0
- package/esm/modern/stageName.js +1 -0
- package/esm/plugin/component/channel.d.ts +2 -2
- package/esm/plugin/component/channel.js +18 -18
- package/esm/plugin/component/index.js +29 -36
- package/esm/types/index.d.ts +0 -1
- package/esm/util/beforeConfirm.d.ts +2 -4
- package/esm/util/beforeConfirm.js +14 -15
- package/esm/util/logger.js +2 -1
- package/esm/util/security.d.ts +1 -22
- package/esm/util/security.js +39 -150
- package/package.json +9 -15
- package/types.d.ts +94 -785
- package/types.untrimmed.d.ts +108 -929
- package/dist/ams-checkout.min.js.map +0 -1
- package/esm/core/component/element/modernElementController/adapter.d.ts +0 -19
- package/esm/core/component/element/modernElementController/adapter.js +0 -73
- package/esm/core/component/element/modernElementController/index.d.ts +0 -149
- package/esm/core/component/element/modernElementController/index.js +0 -1665
- package/esm/modern/global.d.ts +0 -3
- package/esm/modern/tools.js +0 -1
- package/esm/util/jshield-apdid/apdid-loader.js +0 -340
- package/esm/util/jshield-apdid/index.js +0 -21
- package/esm/util/security-registry.d.ts +0 -72
- package/esm/util/security-registry.js +0 -175
package/types.untrimmed.d.ts
CHANGED
|
@@ -143,88 +143,7 @@ declare interface AmountLimitInfo {
|
|
|
143
143
|
/**
|
|
144
144
|
* AntomBridge事件类型,包含了SDK与webapp通信的所有事件类型
|
|
145
145
|
*/
|
|
146
|
-
export declare interface AntomBridgeEventMap<AppConfig extends Record<string, any> = Record<string, any>, SubmitParams extends Record<string, any> = Record<string, any
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* @description 整合了native事件的eventMap,如果你的业务element需要支持native,事件请继承这个类型
|
|
151
|
-
*/
|
|
152
|
-
export declare interface AntomBridgeWithNativeEventMap<AppConfig extends Record<string, any> = Record<string, any>, SubmitParams extends Record<string, any> = Record<string, any>, SR extends SubmitResult = SubmitResult> extends AntomBridgeEventMap<AppConfig, SubmitParams, SR> {
|
|
153
|
-
/**
|
|
154
|
-
* @internal 展示半浮层
|
|
155
|
-
*/
|
|
156
|
-
showPopup: {
|
|
157
|
-
mode: string;
|
|
158
|
-
showAnimation: string;
|
|
159
|
-
};
|
|
160
|
-
/**
|
|
161
|
-
* @internal 隐藏loading
|
|
162
|
-
*/
|
|
163
|
-
dismissLoading: Record<string, never>;
|
|
164
|
-
/**
|
|
165
|
-
* @internal 通知APP 收银台已经ready
|
|
166
|
-
*/
|
|
167
|
-
webAppReady: {
|
|
168
|
-
source: string;
|
|
169
|
-
};
|
|
170
|
-
/**
|
|
171
|
-
* @internal 通知app 应用已启动
|
|
172
|
-
*/
|
|
173
|
-
onLaunch: {
|
|
174
|
-
success: boolean;
|
|
175
|
-
source: string;
|
|
176
|
-
target: string;
|
|
177
|
-
};
|
|
178
|
-
/**
|
|
179
|
-
* @internal 收到客户端返回action query的数据和商户的配置
|
|
180
|
-
*/
|
|
181
|
-
renderComponent: {
|
|
182
|
-
sessionResult?: Record<string, unknown>;
|
|
183
|
-
};
|
|
184
|
-
/**
|
|
185
|
-
* @internal 心跳事件
|
|
186
|
-
*/
|
|
187
|
-
appHeartBeat: {
|
|
188
|
-
success: boolean;
|
|
189
|
-
};
|
|
190
|
-
/**
|
|
191
|
-
* @internal 客户端 展示toast弹窗
|
|
192
|
-
*/
|
|
193
|
-
showToast: {
|
|
194
|
-
icon: string;
|
|
195
|
-
message: string;
|
|
196
|
-
source: string;
|
|
197
|
-
};
|
|
198
|
-
/**
|
|
199
|
-
* @internal 客户端eventCallback 事件
|
|
200
|
-
*/
|
|
201
|
-
onEventCallback: {
|
|
202
|
-
code: string;
|
|
203
|
-
};
|
|
204
|
-
/**
|
|
205
|
-
* @internal 发送回调码事件
|
|
206
|
-
*/
|
|
207
|
-
onSubmitPayCallback: CallbackReturnData;
|
|
208
|
-
/**
|
|
209
|
-
* @internal 重置收银台
|
|
210
|
-
*/
|
|
211
|
-
reset: Record<string, never>;
|
|
212
|
-
/**
|
|
213
|
-
* @internal 销毁收银台
|
|
214
|
-
*/
|
|
215
|
-
destroy: Record<string, never>;
|
|
216
|
-
/**
|
|
217
|
-
* @internal 关闭收银台
|
|
218
|
-
*/
|
|
219
|
-
onClose: Record<string, never>;
|
|
220
|
-
/**
|
|
221
|
-
* @internal 重定向
|
|
222
|
-
*/
|
|
223
|
-
onRedirect: {
|
|
224
|
-
normalUrl: string;
|
|
225
|
-
isDestroy: boolean;
|
|
226
|
-
needReset: boolean;
|
|
227
|
-
};
|
|
146
|
+
export declare interface AntomBridgeEventMap<AppConfig extends Record<string, any> = Record<string, any>, SubmitParams extends Record<string, any> = Record<string, any>> extends BaseBridgeEventMap<AppConfig, SubmitResult, SubmitParams, string, OpenModalParams> {
|
|
228
147
|
}
|
|
229
148
|
|
|
230
149
|
/**
|
|
@@ -259,8 +178,6 @@ declare interface AntomErrorResponse {
|
|
|
259
178
|
extendInfo?: Record<string, any>;
|
|
260
179
|
}
|
|
261
180
|
|
|
262
|
-
export declare type AntomLayouts = 'tabs' | 'accordion';
|
|
263
|
-
|
|
264
181
|
/**
|
|
265
182
|
* 给中间页使用的桥接事件类型
|
|
266
183
|
* @internal 内部使用,不暴露到外部
|
|
@@ -268,13 +185,15 @@ export declare type AntomLayouts = 'tabs' | 'accordion';
|
|
|
268
185
|
export declare interface AntomMiddlePageEventMap extends AntomBridgeEventMap {
|
|
269
186
|
/**
|
|
270
187
|
* @description 3DS流程完成
|
|
271
|
-
* @deprecated 使用auto_close_modal
|
|
272
188
|
*/
|
|
273
189
|
three_ds_end: void;
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* 给modal和webapp页面messagePort使用的桥接事件类型
|
|
194
|
+
* @internal 内部使用,不暴露到外部
|
|
195
|
+
*/
|
|
196
|
+
export declare interface AntomModalEventMap extends AntomBridgeEventMap {
|
|
278
197
|
}
|
|
279
198
|
|
|
280
199
|
/**
|
|
@@ -295,11 +214,6 @@ export declare class AntomSDK extends BaseElementsFactory {
|
|
|
295
214
|
* @description 更新配置
|
|
296
215
|
*/
|
|
297
216
|
updateConfig(config: Partial<BaseFactoryConfig>): void;
|
|
298
|
-
/**
|
|
299
|
-
* @internal
|
|
300
|
-
* @param payload
|
|
301
|
-
*/
|
|
302
|
-
protected redirect(payload: BaseBridgeEventMap['OPENSDK@REDIRECT']): void | Promise<void>;
|
|
303
217
|
/**
|
|
304
218
|
* @internal
|
|
305
219
|
* 这个方法为内部调用方法
|
|
@@ -310,11 +224,9 @@ export declare class AntomSDK extends BaseElementsFactory {
|
|
|
310
224
|
getContentWindow: () => Window;
|
|
311
225
|
}>;
|
|
312
226
|
elements(): Elements;
|
|
313
|
-
createElement(elementType: 'payment', options?: PaymentAppConfig): PaymentElement;
|
|
314
227
|
createElement(elementType: 'vaulting', options?: VaultingAppConfig): VaultingElement;
|
|
315
228
|
createElement(elementType: 'CVV', options?: CVVAppConfig): CVVElement;
|
|
316
229
|
createElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
|
|
317
|
-
getElement(elementType: 'payment', options?: PaymentAppConfig): PaymentElement;
|
|
318
230
|
getElement(elementType: 'vaulting', options?: VaultingAppConfig): VaultingElement;
|
|
319
231
|
getElement(elementType: 'CVV', options?: CVVAppConfig): CVVElement;
|
|
320
232
|
getElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
|
|
@@ -371,22 +283,6 @@ export declare const AntomSDKErrorCodes: {
|
|
|
371
283
|
* @description channelClientId 查询失败(请求异常,如网络错误、服务器错误等)
|
|
372
284
|
*/
|
|
373
285
|
readonly CHANNEL_CLIENT_ID_QUERY_ERROR: "CHANNEL_CLIENT_ID_QUERY_ERROR";
|
|
374
|
-
/**
|
|
375
|
-
* @description checkout 页面未加载成功,不允许 updateConfig
|
|
376
|
-
*/
|
|
377
|
-
readonly CHECKOUT_NOT_READY: "CHECKOUT_NOT_READY";
|
|
378
|
-
/**
|
|
379
|
-
* @description 支付进行中,不允许更新金额
|
|
380
|
-
*/
|
|
381
|
-
readonly PAYMENT_IN_PROGRESS: "PAYMENT_IN_PROGRESS";
|
|
382
|
-
/**
|
|
383
|
-
* @description 金额不能为空
|
|
384
|
-
*/
|
|
385
|
-
readonly AMOUNT_VALUE_EMPTY: "AMOUNT_VALUE_EMPTY";
|
|
386
|
-
/**
|
|
387
|
-
* @description 金额格式非法(仅允许整数和小数)
|
|
388
|
-
*/
|
|
389
|
-
readonly AMOUNT_VALUE_INVALID: "AMOUNT_VALUE_INVALID";
|
|
390
286
|
readonly GENERATE_ELEMENT_KEY_FAILED: "GENERATE_ELEMENT_KEY_FAILED";
|
|
391
287
|
readonly ELEMENT_INIT_FAILED: "ELEMENT_INIT_FAILED";
|
|
392
288
|
readonly MOUNT_TIMEOUT: "MOUNT_TIMEOUT";
|
|
@@ -403,8 +299,6 @@ export declare const AntomSDKErrorCodes: {
|
|
|
403
299
|
readonly GROUPS_NOT_FOUND_MAIN_ELEMENT: "GROUPS_NOT_FOUND_MAIN_ELEMENT";
|
|
404
300
|
readonly NOT_SUPPORT_ELEMENT: "NOT_SUPPORT_ELEMENT";
|
|
405
301
|
readonly NOT_SUPPORT_SUBMIT: "NOT_SUPPORT_SUBMIT";
|
|
406
|
-
readonly UPDATE_CONFIG_TIMEOUT: "UPDATE_CONFIG_TIMEOUT";
|
|
407
|
-
readonly UPDATE_CONFIG_NOT_READY: "UPDATE_CONFIG_NOT_READY";
|
|
408
302
|
readonly INVALID_MODAL_URL: "INVALID_MODAL_URL";
|
|
409
303
|
readonly LOAD_DEBUGGER_FAILED: "LOAD_DEBUGGER_FAILED";
|
|
410
304
|
readonly API_MISS_PARAMS: "API_MISS_PARAMS";
|
|
@@ -422,8 +316,6 @@ export declare type AntomSDKErrorCodes = (typeof AntomSDKErrorCodes)[keyof typeo
|
|
|
422
316
|
|
|
423
317
|
export declare type AntomTheme = 'default' | 'agateGreen' | 'night' | 'nostalgicGray' | 'gamingPurple' | 'cherryBlossomPink' | 'light';
|
|
424
318
|
|
|
425
|
-
export declare type AntomVariables = 'content-primary' | 'content-secondary' | 'content-tertiary' | 'content-quaternary' | 'background-primary' | 'background-secondary' | 'background-disable' | 'background-transparency' | 'border-primary' | 'border-secondary' | 'border-disable' | 'action-normal' | 'action-hover' | 'action-disable' | 'action-secondary' | 'state-failure' | 'state-warning' | 'state-success' | 'state-info' | 'state-marketing' | 'state-conventional' | 'radius-backup' | 'radius-module' | 'radius-component' | 'radius-button' | 'wrapper-padding' | 'stroke-default' | 'stroke-active' | 'fontFamily';
|
|
426
|
-
|
|
427
319
|
declare interface APICallbackOptions {
|
|
428
320
|
requestType: 'fetch' | 'xhr';
|
|
429
321
|
time: number;
|
|
@@ -438,21 +330,15 @@ declare interface APICallbackOptions {
|
|
|
438
330
|
errorMsg?: string;
|
|
439
331
|
}
|
|
440
332
|
|
|
441
|
-
/**
|
|
442
|
-
* @description SDK UI组件的外观配置。
|
|
443
|
-
* 控制主题、CSS变量、布局规则及显示设置。
|
|
444
|
-
* @template Props - 自定义外观属性类型,默认为 DefaultAppearanceProps。
|
|
445
|
-
*/
|
|
446
333
|
declare interface Appearance<Props extends Partial<DefaultAppearanceProps> = DefaultAppearanceProps> {
|
|
447
334
|
theme?: Props['theme'];
|
|
448
335
|
variables?: PartialSpeKey<Props['variables'], string>;
|
|
449
336
|
rules?: PartialSpeKey<Props['rules'], CSS_2.Properties<string, number>>;
|
|
450
337
|
displaySetting?: PartialSpeKey<Props['displaySetting'], boolean>;
|
|
451
338
|
layout?: Props['layout'];
|
|
452
|
-
fonts?: FontSource[];
|
|
453
339
|
}
|
|
454
340
|
|
|
455
|
-
|
|
341
|
+
declare type AppearanceSetting = {
|
|
456
342
|
displaySetting: Record<'showCardBrandIcon', boolean>;
|
|
457
343
|
theme: 'light' | 'dark';
|
|
458
344
|
layout: 'accordion' | 'tabs';
|
|
@@ -865,16 +751,6 @@ declare interface BaseBridgeEventMap<AppConfig extends Record<string, any> = Rec
|
|
|
865
751
|
merged: AppConfig;
|
|
866
752
|
updated: Partial<AppConfig>;
|
|
867
753
|
};
|
|
868
|
-
/**
|
|
869
|
-
* 更新配置时的回复事件,包含可能发生的错误信息。
|
|
870
|
-
* 如果 error 为 undefined,则表示没有错误发生。
|
|
871
|
-
*/
|
|
872
|
-
"OPENSDK@UPDATE_CONFIG_REPLY": {
|
|
873
|
-
/**
|
|
874
|
-
* 更新配置时发生的错误,如果error为undefined,则表示没有错误发生
|
|
875
|
-
*/
|
|
876
|
-
error?: ErrorPayload<string>;
|
|
877
|
-
} | undefined;
|
|
878
754
|
/**
|
|
879
755
|
* @internal 内部事件 不暴露给商户
|
|
880
756
|
*/
|
|
@@ -913,10 +789,6 @@ declare interface BaseBridgeEventMap<AppConfig extends Record<string, any> = Rec
|
|
|
913
789
|
* @internal 内部事件 不暴露给商户
|
|
914
790
|
*/
|
|
915
791
|
"OPENSDK@TRANSFER_MODAL_APPEARANCE": Appearance;
|
|
916
|
-
/**
|
|
917
|
-
* @internal 内部事件 不暴露给商户
|
|
918
|
-
*/
|
|
919
|
-
"OPENSDK@TRANSFER_MODAL_INITIALDATA": Record<string, any>;
|
|
920
792
|
/**
|
|
921
793
|
* @internal 内部事件 不暴露给商户
|
|
922
794
|
*/
|
|
@@ -944,12 +816,6 @@ declare interface BaseBridgeEventMap<AppConfig extends Record<string, any> = Rec
|
|
|
944
816
|
* @internal 内部高度变化,同步到sdk更新iframe
|
|
945
817
|
*/
|
|
946
818
|
"OPENSDK@HEIGHT_UPDATE": number;
|
|
947
|
-
/**
|
|
948
|
-
* @internal 内部销毁元素,同步到sdk销毁元素
|
|
949
|
-
*/
|
|
950
|
-
"OPENSDK@DESTROY_ELEMENT": {
|
|
951
|
-
elementKey: string;
|
|
952
|
-
};
|
|
953
819
|
}
|
|
954
820
|
|
|
955
821
|
declare interface BaseConfig {
|
|
@@ -974,12 +840,6 @@ declare interface BaseConfig {
|
|
|
974
840
|
* @internal 不透出到用户
|
|
975
841
|
*/
|
|
976
842
|
version: string;
|
|
977
|
-
/**
|
|
978
|
-
* @description iframe 的 color-scheme CSS 属性,用于阻止商户页面的 color-scheme 传播到 iframe
|
|
979
|
-
* 默认值 'light dark',确保 iframe 透明背景在商户页面设置 color-scheme: dark 时正常工作
|
|
980
|
-
* @internal 内部使用,不暴露给商户
|
|
981
|
-
*/
|
|
982
|
-
colorScheme?: string;
|
|
983
843
|
}
|
|
984
844
|
|
|
985
845
|
/**
|
|
@@ -1028,8 +888,6 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
|
|
|
1028
888
|
* @internal 外部不要访问
|
|
1029
889
|
*/
|
|
1030
890
|
private cachedSend;
|
|
1031
|
-
/** Reuses the pending reply for concurrent submit calls. */
|
|
1032
|
-
private submitPromise?;
|
|
1033
891
|
constructor(name: string, config: WithAppURL<Config>);
|
|
1034
892
|
/**
|
|
1035
893
|
* @internal 外部不能直接调用
|
|
@@ -1041,9 +899,9 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
|
|
|
1041
899
|
*/
|
|
1042
900
|
setup(): Promise<Partial<BaseElementAppConfig> | undefined>;
|
|
1043
901
|
/**
|
|
1044
|
-
* @param {HTMLElement}
|
|
902
|
+
* @param {string | HTMLElement} containerId 如果给字符串id不要带#号
|
|
1045
903
|
*/
|
|
1046
|
-
mount(
|
|
904
|
+
mount(containerId: HTMLElement): Promise<void>;
|
|
1047
905
|
/**
|
|
1048
906
|
* @description 内部使用,挂载iframe
|
|
1049
907
|
* @internal 外部不能直接调用
|
|
@@ -1053,7 +911,7 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
|
|
|
1053
911
|
* 更新webapp配置
|
|
1054
912
|
* @param {Partial<BaseElementAppConfig>} newConfig
|
|
1055
913
|
*/
|
|
1056
|
-
updateConfig(newConfig: Partial<Config['appConfig']>):
|
|
914
|
+
updateConfig(newConfig: Partial<Config['appConfig']>): void;
|
|
1057
915
|
/**
|
|
1058
916
|
* 卸载元素
|
|
1059
917
|
*/
|
|
@@ -1117,28 +975,20 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
|
|
|
1117
975
|
}
|
|
1118
976
|
|
|
1119
977
|
declare interface BaseElementAppConfig {
|
|
1120
|
-
/**
|
|
1121
|
-
* @internal 不透出给商户,统一从loadAntom获取
|
|
1122
|
-
*/
|
|
1123
978
|
locale?: string;
|
|
1124
979
|
/**
|
|
1125
|
-
* @internal
|
|
980
|
+
* @internal 不透出给商户
|
|
1126
981
|
*/
|
|
1127
982
|
env?: 'sandbox' | 'prod';
|
|
1128
983
|
/**
|
|
1129
|
-
* @description
|
|
984
|
+
* @description 商户的唯一标识
|
|
1130
985
|
* @internal 不透出到用户
|
|
1131
986
|
*/
|
|
1132
987
|
merchantId?: string;
|
|
1133
988
|
[key: string]: any;
|
|
1134
989
|
}
|
|
1135
990
|
|
|
1136
|
-
declare interface BaseElementConfig<T extends BaseElementAppConfig =
|
|
1137
|
-
/**
|
|
1138
|
-
* @description Session id forwarded to the iframe as the track_id query parameter.
|
|
1139
|
-
* @internal Internal element config only.
|
|
1140
|
-
*/
|
|
1141
|
-
trackId?: string;
|
|
991
|
+
declare interface BaseElementConfig<T extends BaseElementAppConfig = Record<string, any>> extends BaseConfig {
|
|
1142
992
|
appConfig: T;
|
|
1143
993
|
elementMode: ElementMode;
|
|
1144
994
|
}
|
|
@@ -1234,7 +1084,6 @@ declare abstract class BaseFactory {
|
|
|
1234
1084
|
*/
|
|
1235
1085
|
constructor(config: BaseFactoryConfig);
|
|
1236
1086
|
protected openModal(payload: BaseBridgeEventMap['OPENSDK@OPEN_MODAL']): Promise<OpenModalHandle>;
|
|
1237
|
-
protected redirect(payload: BaseBridgeEventMap['OPENSDK@REDIRECT']): void | Promise<void>;
|
|
1238
1087
|
/**
|
|
1239
1088
|
* @description 子类必须实现此方法,返回工厂可用的元素类列表
|
|
1240
1089
|
* @internal
|
|
@@ -1360,10 +1209,6 @@ declare abstract class BaseMainElement<Config extends BaseElementConfig = BaseEl
|
|
|
1360
1209
|
_submit(data?: EventMap['OPENSDK@SUBMIT'] | undefined): Promise<EventMap['OPENSDK@SUBMIT_REPLY']>;
|
|
1361
1210
|
}
|
|
1362
1211
|
|
|
1363
|
-
/**
|
|
1364
|
-
* @description 打开模态框的配置项。
|
|
1365
|
-
* 包含显示选项、关闭行为、外观设置及初始化数据。
|
|
1366
|
-
*/
|
|
1367
1212
|
declare interface BaseOpenModalConfig {
|
|
1368
1213
|
/**
|
|
1369
1214
|
* 无需手动传递,app的唯一scope
|
|
@@ -1387,21 +1232,10 @@ declare interface BaseOpenModalConfig {
|
|
|
1387
1232
|
onClose?: () => void;
|
|
1388
1233
|
url: string;
|
|
1389
1234
|
/**
|
|
1390
|
-
*
|
|
1235
|
+
* 关闭时,是否需要app页面二次确认,默认为false,即直接关闭
|
|
1391
1236
|
*/
|
|
1392
1237
|
closeConfirm?: boolean;
|
|
1393
|
-
/**
|
|
1394
|
-
* @description 需要同步的外观配置
|
|
1395
|
-
*/
|
|
1396
1238
|
appearance?: Appearance;
|
|
1397
|
-
/**
|
|
1398
|
-
* @description 需要传递的初始化数据
|
|
1399
|
-
*/
|
|
1400
|
-
initialData?: Record<string, any>;
|
|
1401
|
-
/**
|
|
1402
|
-
* @description 无需手动传递, 模态框的唯一标识
|
|
1403
|
-
*/
|
|
1404
|
-
modalId?: string;
|
|
1405
1239
|
}
|
|
1406
1240
|
|
|
1407
1241
|
declare type BehaviorConfig = {
|
|
@@ -1499,42 +1333,6 @@ declare interface C2PProps {
|
|
|
1499
1333
|
merchantTransactionId?: string;
|
|
1500
1334
|
}
|
|
1501
1335
|
|
|
1502
|
-
/**
|
|
1503
|
-
* @description native回调错误信息格式
|
|
1504
|
-
* @internal
|
|
1505
|
-
*/
|
|
1506
|
-
export declare interface CallbackErrorInfo {
|
|
1507
|
-
code: string;
|
|
1508
|
-
message?: string;
|
|
1509
|
-
needChangeSessionForRetry?: boolean;
|
|
1510
|
-
traceId?: string;
|
|
1511
|
-
context?: string;
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
/**
|
|
1515
|
-
* @description native回调返回数据
|
|
1516
|
-
* @internal
|
|
1517
|
-
*/
|
|
1518
|
-
export declare interface CallbackReturnData {
|
|
1519
|
-
status?: string;
|
|
1520
|
-
userCanceled3D?: boolean;
|
|
1521
|
-
isExposed?: boolean;
|
|
1522
|
-
error?: CallbackErrorInfo;
|
|
1523
|
-
session?: {
|
|
1524
|
-
nextAction?: CallbackSessionNextAction;
|
|
1525
|
-
};
|
|
1526
|
-
}
|
|
1527
|
-
|
|
1528
|
-
/**
|
|
1529
|
-
* @description native回调会话下一步操作,包含了回调的url
|
|
1530
|
-
* @internal
|
|
1531
|
-
*/
|
|
1532
|
-
export declare interface CallbackSessionNextAction {
|
|
1533
|
-
normalUrl?: string;
|
|
1534
|
-
schemeUrl?: string;
|
|
1535
|
-
applinkUrl?: string;
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
1336
|
declare interface CardIssuerAuthentication {
|
|
1539
1337
|
/**
|
|
1540
1338
|
* @description 卡售卖单元
|
|
@@ -1952,7 +1750,7 @@ declare interface CashierSdkActionQueryResult {
|
|
|
1952
1750
|
/**
|
|
1953
1751
|
* @description 物流信息, 包含物流地址和物流费
|
|
1954
1752
|
*/
|
|
1955
|
-
shippingInfo?:
|
|
1753
|
+
shippingInfo?: ShippingInfo;
|
|
1956
1754
|
/**
|
|
1957
1755
|
* @description 用户已绑资产信息
|
|
1958
1756
|
*/
|
|
@@ -1985,6 +1783,28 @@ declare interface ChargeInfo {
|
|
|
1985
1783
|
chargeActualAmountView?: PaymentView;
|
|
1986
1784
|
}
|
|
1987
1785
|
|
|
1786
|
+
/** click 事件 resolve 参数 */
|
|
1787
|
+
export declare interface ClickResolveOptions {
|
|
1788
|
+
amount?: {
|
|
1789
|
+
currency: string;
|
|
1790
|
+
value: string;
|
|
1791
|
+
};
|
|
1792
|
+
shippingAddressRequired?: boolean;
|
|
1793
|
+
allowedShippingCountries?: string[];
|
|
1794
|
+
shippingRates?: Array<{
|
|
1795
|
+
id: string;
|
|
1796
|
+
displayName: string;
|
|
1797
|
+
amount: string;
|
|
1798
|
+
}>;
|
|
1799
|
+
lineItems?: Array<{
|
|
1800
|
+
name: string;
|
|
1801
|
+
amount: string;
|
|
1802
|
+
}>;
|
|
1803
|
+
business?: {
|
|
1804
|
+
name: string;
|
|
1805
|
+
};
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1988
1808
|
declare interface CodeFormView {
|
|
1989
1809
|
/**
|
|
1990
1810
|
* @description title
|
|
@@ -2010,11 +1830,6 @@ declare interface CodeFormView {
|
|
|
2010
1830
|
* @description label
|
|
2011
1831
|
*/
|
|
2012
1832
|
label?: string;
|
|
2013
|
-
/**
|
|
2014
|
-
* @description Payment guidance information (CKP scenario) The frontend only displays the payment guide button
|
|
2015
|
-
* when appLinkUrlForWeb is populated
|
|
2016
|
-
*/
|
|
2017
|
-
paymentGuideInfo?: PaymentGuideInfo;
|
|
2018
1833
|
/**
|
|
2019
1834
|
* @description 提醒事项
|
|
2020
1835
|
*/
|
|
@@ -2031,10 +1846,6 @@ declare interface CodeFormView {
|
|
|
2031
1846
|
* @description 码过期时间
|
|
2032
1847
|
*/
|
|
2033
1848
|
codeExpireTime?: string;
|
|
2034
|
-
/**
|
|
2035
|
-
* @description QR code configuration including renderStyle, centerIcon and cornerIcon
|
|
2036
|
-
*/
|
|
2037
|
-
qrcodeConfig?: QrCodeConfig;
|
|
2038
1849
|
}
|
|
2039
1850
|
|
|
2040
1851
|
/**
|
|
@@ -2591,14 +2402,10 @@ export declare interface ConfirmCardSetupOptions {
|
|
|
2591
2402
|
export declare interface ConfirmPaymentOptions extends Omit<ConfirmCardSetupOptions, 'elements'> {
|
|
2592
2403
|
sessionData: string;
|
|
2593
2404
|
/**
|
|
2594
|
-
* @description 传入已挂载的 CVVElement
|
|
2405
|
+
* @description 传入已挂载的 CVVElement 或 Elements 实例,不传则使用无 UI 自动提交模式
|
|
2595
2406
|
*/
|
|
2596
2407
|
elements?: BaseMainElement | BaseElements;
|
|
2597
2408
|
appearance?: CVVAppearance;
|
|
2598
|
-
/**
|
|
2599
|
-
* @description 集成用户自定义信息(如 cardHolderName)
|
|
2600
|
-
*/
|
|
2601
|
-
params?: Record<string, unknown>;
|
|
2602
2409
|
}
|
|
2603
2410
|
|
|
2604
2411
|
/**
|
|
@@ -2670,13 +2477,6 @@ declare namespace CSS_2 {
|
|
|
2670
2477
|
}
|
|
2671
2478
|
}
|
|
2672
2479
|
|
|
2673
|
-
/**
|
|
2674
|
-
* CSS 字体源 — 通过 <link> 标签加载外部 CSS(如 Google Fonts)
|
|
2675
|
-
*/
|
|
2676
|
-
declare interface CssFontSource {
|
|
2677
|
-
cssSrc: string;
|
|
2678
|
-
}
|
|
2679
|
-
|
|
2680
2480
|
declare interface CurrencyInfo {
|
|
2681
2481
|
/**
|
|
2682
2482
|
* @description Getter method for property <tt>currencyCode</tt>.
|
|
@@ -2721,17 +2521,6 @@ declare interface CustomerFxInfo {
|
|
|
2721
2521
|
useMarketPrice?: boolean;
|
|
2722
2522
|
}
|
|
2723
2523
|
|
|
2724
|
-
/**
|
|
2725
|
-
* 自定义字体源 — 通过 @font-face 加载自托管字体
|
|
2726
|
-
*/
|
|
2727
|
-
declare interface CustomFontSource {
|
|
2728
|
-
family: string;
|
|
2729
|
-
src: string;
|
|
2730
|
-
weight?: string;
|
|
2731
|
-
style?: string;
|
|
2732
|
-
unicodeRange?: string;
|
|
2733
|
-
}
|
|
2734
|
-
|
|
2735
2524
|
/**
|
|
2736
2525
|
* CustomizedPerformanceKey 是给业务使用的自定义指标,共 20 个,页面之间互相独立
|
|
2737
2526
|
*/
|
|
@@ -2741,7 +2530,7 @@ declare type CustomizedPerformanceKey = 'm1' | 'm2' | 'm3' | 'm4' | 'm5' | 'm6'
|
|
|
2741
2530
|
* @public
|
|
2742
2531
|
* @description CVV element app config type
|
|
2743
2532
|
*/
|
|
2744
|
-
export declare interface CVVAppConfig extends BaseAppearance<CVVAppearance
|
|
2533
|
+
export declare interface CVVAppConfig extends BaseAppearance<CVVAppearance> {
|
|
2745
2534
|
/**
|
|
2746
2535
|
* @description sessionData
|
|
2747
2536
|
*/
|
|
@@ -2779,8 +2568,7 @@ export declare type CVVAppearance = PickAppearance<CVVAppearanceProps>;
|
|
|
2779
2568
|
|
|
2780
2569
|
export declare type CVVAppearanceProps = {
|
|
2781
2570
|
theme: AntomTheme;
|
|
2782
|
-
variables:
|
|
2783
|
-
fonts?: FontSource[];
|
|
2571
|
+
variables: 'content-primary' | 'content-tertiary' | 'background-primary' | 'background-disable' | 'background-transparency' | 'border-primary' | 'border-disable' | 'action-normal' | 'action-hover' | 'radius-component' | 'content-secondary' | 'background-secondary';
|
|
2784
2572
|
};
|
|
2785
2573
|
|
|
2786
2574
|
/**
|
|
@@ -2872,10 +2660,6 @@ export declare interface CVVSubmitParams {
|
|
|
2872
2660
|
* 重定向策略
|
|
2873
2661
|
*/
|
|
2874
2662
|
redirect?: 'always' | 'if_required';
|
|
2875
|
-
/**
|
|
2876
|
-
* 集成用户自定义信息(如 cardHolderName)
|
|
2877
|
-
*/
|
|
2878
|
-
params?: Record<string, unknown>;
|
|
2879
2663
|
}
|
|
2880
2664
|
|
|
2881
2665
|
declare interface DanaSofCouponInfo {
|
|
@@ -3594,7 +3378,7 @@ declare class Elements extends BaseElements {
|
|
|
3594
3378
|
getElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
|
|
3595
3379
|
}
|
|
3596
3380
|
|
|
3597
|
-
declare type ElementTypeEnum = 'TEXT' | 'DIGIT_6' | 'DIGIT_18' | 'DIGIT_32' | 'DIGIT_11' | 'DIGIT_4' | 'DIGIT_10' | 'CHECKBOX' | 'SELECT' | 'SWITCH' | 'PASSWORD_2' | 'DATE_PICKER' | 'CHECKLIST' | 'ADDRESS' | 'DROPBOX' | 'DIGIT_13' | 'GRIDLIST' | 'TENOR_SELECT_KR' | 'STORELIST' | 'GRIDBANKLIST' | 'SUB_QR_CODE' | 'GRIDBANKTOP' | 'PHONE_TEXT_AREA_CODE'
|
|
3381
|
+
declare type ElementTypeEnum = 'TEXT' | 'DIGIT_6' | 'DIGIT_18' | 'DIGIT_32' | 'DIGIT_11' | 'DIGIT_4' | 'DIGIT_10' | 'CHECKBOX' | 'SELECT' | 'SWITCH' | 'PASSWORD_2' | 'DATE_PICKER' | 'CHECKLIST' | 'ADDRESS' | 'DROPBOX' | 'DIGIT_13' | 'GRIDLIST' | 'TENOR_SELECT_KR' | 'STORELIST' | 'GRIDBANKLIST' | 'SUB_QR_CODE' | 'GRIDBANKTOP' | 'PHONE_TEXT_AREA_CODE';
|
|
3598
3382
|
|
|
3599
3383
|
declare type Env = 'local' | 'dev' | 'sit' | 'pre' | 'prod';
|
|
3600
3384
|
|
|
@@ -3685,22 +3469,6 @@ declare interface ExpCardPlan {
|
|
|
3685
3469
|
* @description 每个月分期利息
|
|
3686
3470
|
*/
|
|
3687
3471
|
monthlyInterest?: ComIpayIexpprodServiceFacadeCommonAmount;
|
|
3688
|
-
/**
|
|
3689
|
-
* @description 分期有效期开始时间
|
|
3690
|
-
*/
|
|
3691
|
-
validStartTime?: string;
|
|
3692
|
-
/**
|
|
3693
|
-
* @description 分期有效期结束时间
|
|
3694
|
-
*/
|
|
3695
|
-
validEndTime?: string;
|
|
3696
|
-
/**
|
|
3697
|
-
* @description 支持的银行信息
|
|
3698
|
-
*
|
|
3699
|
-
* 包含该分期计划支持的银行详细信息,包括银行简称、logo等。
|
|
3700
|
-
* 该字段从 installmentBanks 数据中通过 bankShortName 关联而来,
|
|
3701
|
-
* 若分期计划无银行限制或未匹配到银行信息,该字段可能为null。@see ExpSupportIppBank
|
|
3702
|
-
*/
|
|
3703
|
-
supportedBank?: ExpSupportIppBank;
|
|
3704
3472
|
}
|
|
3705
3473
|
|
|
3706
3474
|
declare interface ExpInstallmentInfo {
|
|
@@ -3725,18 +3493,12 @@ declare interface ExpPaymentOptionDetail {
|
|
|
3725
3493
|
* @public
|
|
3726
3494
|
* @description Express element app config type
|
|
3727
3495
|
*/
|
|
3728
|
-
export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetting
|
|
3496
|
+
export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetting> {
|
|
3729
3497
|
/** payment SessionData */
|
|
3730
3498
|
sessionData?: string;
|
|
3731
3499
|
/** Business division (country/region) */
|
|
3732
3500
|
businessDivision?: string;
|
|
3733
|
-
/**
|
|
3734
|
-
* Amount & Currency
|
|
3735
|
-
*
|
|
3736
|
-
* Only effective via `updateConfig({ amount })` at runtime.
|
|
3737
|
-
* Passing amount at creation time is ignored; the initial amount
|
|
3738
|
-
* comes from the server-side sdkQuery result (renderData.paymentAmount).
|
|
3739
|
-
*/
|
|
3501
|
+
/** Amount & Currency */
|
|
3740
3502
|
amount?: {
|
|
3741
3503
|
currency: string;
|
|
3742
3504
|
value: string;
|
|
@@ -3745,20 +3507,20 @@ export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetti
|
|
|
3745
3507
|
paypal?: PayPalConfig;
|
|
3746
3508
|
/**
|
|
3747
3509
|
* Button text type (following Stripe Express Checkout Element design)
|
|
3748
|
-
* Each payment method can independently set the button display text
|
|
3510
|
+
* Each payment method can independently set the button display text
|
|
3511
|
+
* Reserved index signature for future payment method integration
|
|
3749
3512
|
*/
|
|
3750
3513
|
buttonType?: {
|
|
3751
3514
|
/** PayPal: paypal | checkout | buynow | pay */
|
|
3752
3515
|
paypal?: 'paypal' | 'checkout' | 'buynow' | 'pay';
|
|
3753
3516
|
[method: string]: string | undefined;
|
|
3754
3517
|
};
|
|
3755
|
-
/**
|
|
3756
|
-
* Unified height for all buttons (px)
|
|
3757
|
-
*/
|
|
3518
|
+
/** Unified height for all buttons (px) */
|
|
3758
3519
|
buttonHeight?: number;
|
|
3759
3520
|
/**
|
|
3760
3521
|
* Button color theme (following Stripe Express Checkout Element design)
|
|
3761
|
-
* Each payment method can independently set the theme color
|
|
3522
|
+
* Each payment method can independently set the theme color
|
|
3523
|
+
* Reserved index signature for future payment method integration
|
|
3762
3524
|
*/
|
|
3763
3525
|
buttonTheme?: {
|
|
3764
3526
|
/** PayPal: gold | blue | silver | white | black */
|
|
@@ -3779,15 +3541,6 @@ export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetti
|
|
|
3779
3541
|
* Locale for internationalization, passed from entry params (loadAntom), default to en_US
|
|
3780
3542
|
*/
|
|
3781
3543
|
locale?: string;
|
|
3782
|
-
/**
|
|
3783
|
-
* 是否运行在 Native App 的 WebView 中。
|
|
3784
|
-
* 为 true 时,跳转通过 onRedirect 事件委托给 Native 端处理。
|
|
3785
|
-
*/
|
|
3786
|
-
isNativeAppWebview?: boolean;
|
|
3787
|
-
/** @internal SDK host 侧商户域名,供 Apple Pay merchant validation 使用 */
|
|
3788
|
-
merchantDomain?: string;
|
|
3789
|
-
/** @internal Elements2 历史协议字段,含义同 merchantDomain */
|
|
3790
|
-
doMain?: string;
|
|
3791
3544
|
}
|
|
3792
3545
|
|
|
3793
3546
|
/** cancel 事件负载 */
|
|
@@ -3796,54 +3549,24 @@ export declare interface ExpressCancelEvent {
|
|
|
3796
3549
|
data?: any;
|
|
3797
3550
|
}
|
|
3798
3551
|
|
|
3799
|
-
/** click
|
|
3552
|
+
/** click 事件负载 */
|
|
3800
3553
|
export declare interface ExpressClickEvent {
|
|
3801
3554
|
expressPaymentType: string;
|
|
3555
|
+
resolve: (options: ClickResolveOptions) => void;
|
|
3802
3556
|
}
|
|
3803
3557
|
|
|
3804
3558
|
/** confirm 事件负载(统一终态,替代 approve) */
|
|
3805
3559
|
export declare interface ExpressConfirmData {
|
|
3806
3560
|
expressPaymentType: string;
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
address?: {
|
|
3812
|
-
line1?: string;
|
|
3813
|
-
line2?: string;
|
|
3814
|
-
city?: string;
|
|
3815
|
-
state?: string;
|
|
3816
|
-
postalCode?: string;
|
|
3817
|
-
country?: string;
|
|
3818
|
-
};
|
|
3819
|
-
};
|
|
3820
|
-
shippingAddress?: {
|
|
3821
|
-
name?: string;
|
|
3822
|
-
phone?: string;
|
|
3823
|
-
address?: {
|
|
3824
|
-
line1?: string;
|
|
3825
|
-
line2?: string;
|
|
3826
|
-
city?: string;
|
|
3827
|
-
state?: string;
|
|
3828
|
-
postalCode?: string;
|
|
3829
|
-
country?: string;
|
|
3830
|
-
};
|
|
3831
|
-
};
|
|
3832
|
-
/** 支付方式返回的原始支付数据(如 alipayCn、applePay 等) */
|
|
3833
|
-
paymentData?: unknown;
|
|
3834
|
-
/**
|
|
3835
|
-
* 商户主动拒绝本次支付(如库存不足、价格变动等)。
|
|
3836
|
-
* 调用后 SDK 立即取消支付流程,confirmPayment() 无需调用。
|
|
3837
|
-
*/
|
|
3838
|
-
paymentFailed: () => void;
|
|
3561
|
+
paymentData: any;
|
|
3562
|
+
billingDetails?: any;
|
|
3563
|
+
shippingAddress?: any;
|
|
3564
|
+
sessionData?: string;
|
|
3839
3565
|
}
|
|
3840
3566
|
|
|
3841
3567
|
/**
|
|
3842
3568
|
* @public
|
|
3843
3569
|
* @description Express element - express checkout element, supports PayPal / Apple Pay / Google Pay
|
|
3844
|
-
*
|
|
3845
|
-
* Host 侧只保留 Element 生命周期、商户事件包装和 bridge 连接。
|
|
3846
|
-
* AP/GP/AlipayCN 的 submit、2DS/3DS、polling 结果处理都由 express_element webapp 承接。
|
|
3847
3570
|
*/
|
|
3848
3571
|
export declare class ExpressElement extends BaseMainElement<ExpressElementConfig, ExpressElementEvents> {
|
|
3849
3572
|
static elementType: string;
|
|
@@ -3851,44 +3574,15 @@ export declare class ExpressElement extends BaseMainElement<ExpressElementConfig
|
|
|
3851
3574
|
* Store all function-type callbacks locally, not involved in postMessage serialization
|
|
3852
3575
|
*/
|
|
3853
3576
|
private _callbacks;
|
|
3854
|
-
/** setup 阶段的 renderData,仅供非 Safari PC Apple Pay host-token 路径读取 paymentRequest。 */
|
|
3855
|
-
private _renderData;
|
|
3856
|
-
private _hostSign;
|
|
3857
|
-
/**
|
|
3858
|
-
* 本地事件处理器(绕过 bridge 的 host→webapp 方向限制)。
|
|
3859
|
-
* bridge.on 只能监听 iframe 发来的消息;SDK host 主动推送事件给商户时走 _emit → _localHandlers。
|
|
3860
|
-
*/
|
|
3861
|
-
private _localHandlers;
|
|
3862
|
-
/** 支付流程进行中标志(click → confirm/error/cancel 之间) */
|
|
3863
|
-
private _paymentInProgress;
|
|
3864
|
-
private _paypalOverlay;
|
|
3865
3577
|
constructor(name: string, config: ExpressElementConfig);
|
|
3578
|
+
setup(): Promise<Partial<ExpressAppConfig> | undefined>;
|
|
3866
3579
|
/**
|
|
3867
|
-
*
|
|
3868
|
-
* 1. 对 confirm 事件拦截,在商户回调执行前注入 paymentFailed()
|
|
3869
|
-
* 2. 对 onRedirect 事件同步注册到 _localHandlers(SDK host 主动推送时商户能收到)
|
|
3870
|
-
*/
|
|
3871
|
-
on(event: string, handler: (...args: any[]) => void): void;
|
|
3872
|
-
/**
|
|
3873
|
-
* SDK host 主动推送事件给商户(不走 bridge postMessage,直接调用本地注册的 handler)。
|
|
3874
|
-
* 用于 Native WebView 场景下 SDK 需要向商户透传跳转信息等。
|
|
3875
|
-
*/
|
|
3876
|
-
private _emit;
|
|
3877
|
-
updateConfig(newConfig: Pick<ExpressAppConfig, 'amount'>): Promise<ExpressElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
|
|
3878
|
-
/**
|
|
3879
|
-
* 商户在 confirm 回调内调用,触发实际支付提交。
|
|
3880
|
-
* iframe 收到 OPENSDK@COMPLETE_PAYMENT 后执行 submitPay / polling 等,
|
|
3881
|
-
* 完成后通过 OPENSDK@COMPLETE_PAYMENT_RESULT 回包,Promise resolve。
|
|
3580
|
+
* Register internal event listeners (iframe communication)
|
|
3882
3581
|
*/
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
code: string;
|
|
3888
|
-
message: string;
|
|
3889
|
-
};
|
|
3890
|
-
}>;
|
|
3891
|
-
setup(): Promise<Partial<ExpressAppConfig> | undefined>;
|
|
3582
|
+
/** Overlay DOM node, created on click, removed after payment ends */
|
|
3583
|
+
private _overlay;
|
|
3584
|
+
private _showOverlay;
|
|
3585
|
+
private _hideOverlay;
|
|
3892
3586
|
private registerInternalListeners;
|
|
3893
3587
|
protected focus(): void;
|
|
3894
3588
|
protected blur(): void;
|
|
@@ -3906,83 +3600,84 @@ export declare interface ExpressElementConfig extends BaseElementConfig<ExpressA
|
|
|
3906
3600
|
* @public
|
|
3907
3601
|
* @description Express element events type
|
|
3908
3602
|
*/
|
|
3909
|
-
export declare interface ExpressElementEvents extends
|
|
3603
|
+
export declare interface ExpressElementEvents extends AntomBridgeEventMap<ExpressAppConfig> {
|
|
3604
|
+
/**
|
|
3605
|
+
* @description Element ready event — 上报可用支付方式
|
|
3606
|
+
*/
|
|
3910
3607
|
ready: {
|
|
3911
3608
|
availablePaymentMethods: Record<string, boolean>;
|
|
3912
3609
|
};
|
|
3610
|
+
/**
|
|
3611
|
+
* @description 用户点击按钮 — 商户必须调用 event.resolve() 后 sheet 才弹出
|
|
3612
|
+
* 对 PayPal: resolve 为 no-op(PayPal 自行弹出 popup)
|
|
3613
|
+
*/
|
|
3913
3614
|
click: ExpressClickEvent;
|
|
3615
|
+
/**
|
|
3616
|
+
* @description 统一支付完成事件(替代 approve)
|
|
3617
|
+
* 用户授权完成后触发,通过 expressPaymentType 区分钱包类型
|
|
3618
|
+
*/
|
|
3914
3619
|
confirm: ExpressConfirmData;
|
|
3620
|
+
/**
|
|
3621
|
+
* @description 支付错误事件(扩展基类 ErrorPayload,新增 expressPaymentType)
|
|
3622
|
+
*/
|
|
3915
3623
|
error: ErrorPayload & {
|
|
3916
3624
|
expressPaymentType: string;
|
|
3917
3625
|
};
|
|
3626
|
+
/**
|
|
3627
|
+
* @description 用户取消支付
|
|
3628
|
+
*/
|
|
3918
3629
|
cancel: ExpressCancelEvent;
|
|
3630
|
+
/**
|
|
3631
|
+
* @description 用户在 sheet 内变更收货地址(AP/GP only,PayPal 不触发)
|
|
3632
|
+
*/
|
|
3919
3633
|
shippingaddresschange: {
|
|
3920
3634
|
expressPaymentType: string;
|
|
3921
3635
|
address: any;
|
|
3922
3636
|
resolve: (options: ShippingResolveOptions) => void;
|
|
3923
3637
|
reject: (reason: string) => void;
|
|
3924
3638
|
};
|
|
3639
|
+
/**
|
|
3640
|
+
* @description 用户在 sheet 内变更配送方式(AP/GP only,PayPal 不触发)
|
|
3641
|
+
*/
|
|
3925
3642
|
shippingratechange: {
|
|
3926
3643
|
expressPaymentType: string;
|
|
3927
3644
|
shippingRate: any;
|
|
3928
3645
|
resolve: (options: RateResolveOptions) => void;
|
|
3929
3646
|
};
|
|
3647
|
+
/** @internal iframe 内容高度变化 */
|
|
3930
3648
|
contentHeightChanged: {
|
|
3931
3649
|
height: number;
|
|
3932
3650
|
};
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
};
|
|
3936
|
-
'OPENSDK@CLICK_RESOLVE': Record<string, never>;
|
|
3937
|
-
'OPENSDK@PAYPAL_CREATE_ORDER': {
|
|
3651
|
+
/** @internal PayPal 请求商户创建订单 */
|
|
3652
|
+
'paypal:createOrder': {
|
|
3938
3653
|
requestId: string;
|
|
3939
3654
|
};
|
|
3940
|
-
|
|
3655
|
+
/** @internal PayPal createOrder 响应 */
|
|
3656
|
+
'paypal:createOrder:reply': {
|
|
3941
3657
|
requestId: string;
|
|
3942
3658
|
sessionData?: string;
|
|
3943
3659
|
error?: string;
|
|
3944
3660
|
};
|
|
3945
|
-
|
|
3661
|
+
/** @internal PayPal 用户变更收货地址 */
|
|
3662
|
+
'paypal:onShippingAddressChange': {
|
|
3946
3663
|
requestId: string;
|
|
3947
3664
|
shippingData: any;
|
|
3948
3665
|
};
|
|
3949
|
-
|
|
3666
|
+
/** @internal PayPal 收货地址变更响应 */
|
|
3667
|
+
'paypal:onShippingAddressChange:reply': {
|
|
3950
3668
|
requestId: string;
|
|
3951
3669
|
error?: string;
|
|
3952
3670
|
};
|
|
3953
|
-
|
|
3671
|
+
/** @internal PayPal 用户变更配送方式 */
|
|
3672
|
+
'paypal:onShippingOptionsChange': {
|
|
3954
3673
|
requestId: string;
|
|
3955
3674
|
shippingData: any;
|
|
3956
3675
|
};
|
|
3957
|
-
|
|
3676
|
+
/** @internal PayPal 配送方式变更响应 */
|
|
3677
|
+
'paypal:onShippingOptionsChange:reply': {
|
|
3958
3678
|
requestId: string;
|
|
3959
3679
|
error?: string;
|
|
3960
3680
|
};
|
|
3961
|
-
'OPENSDK@GET_APPLE_PAY_TOKEN': {
|
|
3962
|
-
requestId: string;
|
|
3963
|
-
expressPaymentType: string;
|
|
3964
|
-
};
|
|
3965
|
-
/** host 完成 Apple Pay token 获取后回包给 iframe,submit/3DS/polling 均由 webapp 完成 */
|
|
3966
|
-
'OPENSDK@GET_APPLE_PAY_TOKEN_REPLY': {
|
|
3967
|
-
requestId: string;
|
|
3968
|
-
success: boolean;
|
|
3969
|
-
result?: any;
|
|
3970
|
-
errorCode?: string;
|
|
3971
|
-
errorMessage?: string;
|
|
3972
|
-
billingDetails?: any;
|
|
3973
|
-
shippingAddress?: any;
|
|
3974
|
-
};
|
|
3975
|
-
'OPENSDK@UPDATE_CONFIG_REPLY': {
|
|
3976
|
-
error?: ErrorPayload<string>;
|
|
3977
|
-
};
|
|
3978
|
-
'OPENSDK@COMPLETE_PAYMENT_REJECT': Record<string, never>;
|
|
3979
|
-
onRedirect: {
|
|
3980
|
-
normalUrl: string;
|
|
3981
|
-
applinkUrl?: string;
|
|
3982
|
-
schemaUrl?: string;
|
|
3983
|
-
isDestroy: boolean;
|
|
3984
|
-
needReset: boolean;
|
|
3985
|
-
};
|
|
3986
3681
|
}
|
|
3987
3682
|
|
|
3988
3683
|
declare interface ExpSupportBank {
|
|
@@ -4007,24 +3702,6 @@ declare interface ExpSupportCardBrand {
|
|
|
4007
3702
|
logo?: Logo;
|
|
4008
3703
|
}
|
|
4009
3704
|
|
|
4010
|
-
/**
|
|
4011
|
-
* @description 支持的分期银行信息
|
|
4012
|
-
*/
|
|
4013
|
-
declare interface ExpSupportIppBank {
|
|
4014
|
-
/**
|
|
4015
|
-
* @description bank short name or bank code
|
|
4016
|
-
*/
|
|
4017
|
-
bankShortName?: string;
|
|
4018
|
-
/**
|
|
4019
|
-
* @description logo
|
|
4020
|
-
*/
|
|
4021
|
-
logo?: Logo;
|
|
4022
|
-
/**
|
|
4023
|
-
* @description bins
|
|
4024
|
-
*/
|
|
4025
|
-
bins?: string[];
|
|
4026
|
-
}
|
|
4027
|
-
|
|
4028
3705
|
declare type Fallback<T> = { [P in keyof T]: T[P] | readonly NonNullable<T[P]>[] };
|
|
4029
3706
|
|
|
4030
3707
|
declare interface FirstPhaseSubscriptionDetail {
|
|
@@ -4042,27 +3719,6 @@ declare interface FirstPhaseSubscriptionDetail {
|
|
|
4042
3719
|
promotionDetails?: PromotionDetail[];
|
|
4043
3720
|
}
|
|
4044
3721
|
|
|
4045
|
-
declare type FontSource = CssFontSource | CustomFontSource;
|
|
4046
|
-
|
|
4047
|
-
declare interface FrontModulesToBeLoadedInterface {
|
|
4048
|
-
acquirerName: string;
|
|
4049
|
-
scriptUrl: string;
|
|
4050
|
-
}
|
|
4051
|
-
|
|
4052
|
-
/**
|
|
4053
|
-
* @description 分期银行展示模型
|
|
4054
|
-
*/
|
|
4055
|
-
declare interface FrontSupportIppBank {
|
|
4056
|
-
/**
|
|
4057
|
-
* @description bank short name or bank code
|
|
4058
|
-
*/
|
|
4059
|
-
bankShortName?: string;
|
|
4060
|
-
/**
|
|
4061
|
-
* @description logo
|
|
4062
|
-
*/
|
|
4063
|
-
logo?: Logo;
|
|
4064
|
-
}
|
|
4065
|
-
|
|
4066
3722
|
declare type GetI18nQueryParam = string | {
|
|
4067
3723
|
/**
|
|
4068
3724
|
* 多语言文案的 key
|
|
@@ -4694,14 +4350,6 @@ declare interface HTTPErrorCallbackOptions {
|
|
|
4694
4350
|
aborted?: 0 | 1;
|
|
4695
4351
|
}
|
|
4696
4352
|
|
|
4697
|
-
declare interface IApplePayContactField {
|
|
4698
|
-
email: string;
|
|
4699
|
-
name: string;
|
|
4700
|
-
phone: string;
|
|
4701
|
-
postalAddress: string;
|
|
4702
|
-
phoneticName: string;
|
|
4703
|
-
}
|
|
4704
|
-
|
|
4705
4353
|
declare interface iBaseElementClass {
|
|
4706
4354
|
new (name: string, config: BaseElementConfig): BaseElement;
|
|
4707
4355
|
elementType: string;
|
|
@@ -4869,100 +4517,6 @@ declare interface IOptions {
|
|
|
4869
4517
|
stayTime?: number;
|
|
4870
4518
|
}
|
|
4871
4519
|
|
|
4872
|
-
declare interface IPaymentSessionMetaData {
|
|
4873
|
-
clientId?: string;
|
|
4874
|
-
renderDisplayType?: string;
|
|
4875
|
-
paymentSessionConfig?: PaymentSessionConfig;
|
|
4876
|
-
securityConfig?: SessionSecurityConfig;
|
|
4877
|
-
moneyView?: any;
|
|
4878
|
-
extendInfo?: string;
|
|
4879
|
-
paymentMethodInfoView?: any;
|
|
4880
|
-
paymentView?: any;
|
|
4881
|
-
modernWeb?: boolean;
|
|
4882
|
-
action?: PaymentSessionAction;
|
|
4883
|
-
/**
|
|
4884
|
-
* @description 是一个string,灰度开关,格式为 flag1,flag2,flag3
|
|
4885
|
-
*/
|
|
4886
|
-
flowSwitchTags?: string;
|
|
4887
|
-
authUrlInfo?: {
|
|
4888
|
-
appIdentifier?: string;
|
|
4889
|
-
applinkUrl?: string;
|
|
4890
|
-
normalUrl?: string;
|
|
4891
|
-
schemeUrl?: string;
|
|
4892
|
-
authUrl?: string;
|
|
4893
|
-
};
|
|
4894
|
-
paymentSessionFactor?: {
|
|
4895
|
-
externalRiskTimeout?: number;
|
|
4896
|
-
extendInfo?: {
|
|
4897
|
-
merchantCapabilities?: string[];
|
|
4898
|
-
supportedNetworks?: string[];
|
|
4899
|
-
requiredBillingContactFields: IApplePayContactField[];
|
|
4900
|
-
requiredShippingContactFields: IApplePayContactField[];
|
|
4901
|
-
};
|
|
4902
|
-
merchantInfo?: {
|
|
4903
|
-
registeredCountry?: string;
|
|
4904
|
-
partnerId?: string;
|
|
4905
|
-
merchantName?: string;
|
|
4906
|
-
};
|
|
4907
|
-
order?: {
|
|
4908
|
-
orderDescription: string;
|
|
4909
|
-
};
|
|
4910
|
-
paymentAmount?: {
|
|
4911
|
-
value?: string;
|
|
4912
|
-
currency?: string;
|
|
4913
|
-
};
|
|
4914
|
-
paymentMethodInfo?: {
|
|
4915
|
-
paymentMethodType?: string;
|
|
4916
|
-
};
|
|
4917
|
-
paymentMethodViewMetaData?: any;
|
|
4918
|
-
paymentRequestId?: string;
|
|
4919
|
-
supportedLanguages?: any;
|
|
4920
|
-
/**
|
|
4921
|
-
* 当前为苹果分期场景的信息
|
|
4922
|
-
*/
|
|
4923
|
-
recurringInfo?: {
|
|
4924
|
-
/**
|
|
4925
|
-
* 代扣协议开始日期 不传为当前系统时间
|
|
4926
|
-
*/
|
|
4927
|
-
startDate?: number;
|
|
4928
|
-
/**
|
|
4929
|
-
* 代扣协议结束日期 不传不限制结束时间
|
|
4930
|
-
*/
|
|
4931
|
-
endDate?: number;
|
|
4932
|
-
/**
|
|
4933
|
-
* 付款时间间隔单位,支持:"year" "month" "day" "hour" "minute" 不传默认month
|
|
4934
|
-
*/
|
|
4935
|
-
intervalUnit?: string;
|
|
4936
|
-
/**
|
|
4937
|
-
* 付款时间间隔。比如每过6个月付款一次,intervalCount就是6, 不传默认为1
|
|
4938
|
-
*/
|
|
4939
|
-
intervalCount?: number;
|
|
4940
|
-
/**
|
|
4941
|
-
* 分期标题信息
|
|
4942
|
-
*/
|
|
4943
|
-
title?: string;
|
|
4944
|
-
/**
|
|
4945
|
-
* 分期管理页面
|
|
4946
|
-
*/
|
|
4947
|
-
managementURL?: string;
|
|
4948
|
-
/**
|
|
4949
|
-
* 苹果通知ipay MAPN信息变更的地址
|
|
4950
|
-
*/
|
|
4951
|
-
tokenNotificationURL?: string;
|
|
4952
|
-
/**
|
|
4953
|
-
* 分期协议描述
|
|
4954
|
-
*/
|
|
4955
|
-
agreementDescription?: string;
|
|
4956
|
-
};
|
|
4957
|
-
frontModulesToBeLoaded?: FrontModulesToBeLoadedInterface[];
|
|
4958
|
-
};
|
|
4959
|
-
connectFactor?: {
|
|
4960
|
-
enableConnect?: boolean;
|
|
4961
|
-
};
|
|
4962
|
-
skipRenderPaymentMethod?: boolean;
|
|
4963
|
-
needAccountConfirmPage?: boolean;
|
|
4964
|
-
}
|
|
4965
|
-
|
|
4966
4520
|
declare interface ISystemInfo {
|
|
4967
4521
|
readonly pixelRatio: number;
|
|
4968
4522
|
readonly windowWidth: number;
|
|
@@ -7462,68 +7016,6 @@ declare interface OneAccountInfo {
|
|
|
7462
7016
|
accountStatus?: string;
|
|
7463
7017
|
}
|
|
7464
7018
|
|
|
7465
|
-
/**
|
|
7466
|
-
* @description one account 账户信息查询结果
|
|
7467
|
-
*/
|
|
7468
|
-
declare interface OneAccountQueryResult {
|
|
7469
|
-
/**
|
|
7470
|
-
* @description 是否业务处理成功
|
|
7471
|
-
*/
|
|
7472
|
-
success?: boolean;
|
|
7473
|
-
/**
|
|
7474
|
-
* @description 错误上下文
|
|
7475
|
-
*/
|
|
7476
|
-
errorContext?: ErrorContext;
|
|
7477
|
-
/**
|
|
7478
|
-
* @description 返回结果码
|
|
7479
|
-
*/
|
|
7480
|
-
resultCode?: string;
|
|
7481
|
-
/**
|
|
7482
|
-
* @description 返回结果信息
|
|
7483
|
-
*/
|
|
7484
|
-
resultMessage?: string;
|
|
7485
|
-
/**
|
|
7486
|
-
* @description error actions
|
|
7487
|
-
*/
|
|
7488
|
-
errorActions?: Record<string, string>;
|
|
7489
|
-
/**
|
|
7490
|
-
* @description error code
|
|
7491
|
-
*/
|
|
7492
|
-
errorCode?: string;
|
|
7493
|
-
/**
|
|
7494
|
-
* @description error status
|
|
7495
|
-
*/
|
|
7496
|
-
errorStatus?: string;
|
|
7497
|
-
/**
|
|
7498
|
-
* @description error message
|
|
7499
|
-
*/
|
|
7500
|
-
errorMessage?: string;
|
|
7501
|
-
/**
|
|
7502
|
-
* @description extend info
|
|
7503
|
-
*/
|
|
7504
|
-
extendInfo?: Record<string, string>;
|
|
7505
|
-
/**
|
|
7506
|
-
* @description one account 账户信息
|
|
7507
|
-
*/
|
|
7508
|
-
accountInfo?: OneAccountInfo;
|
|
7509
|
-
/**
|
|
7510
|
-
* @description action form 下一步动作
|
|
7511
|
-
*/
|
|
7512
|
-
actionForm?: OtpChallengeActionForm;
|
|
7513
|
-
/**
|
|
7514
|
-
* @description 支付方式列表
|
|
7515
|
-
*/
|
|
7516
|
-
paymentMethods?: PaymentMethodView[];
|
|
7517
|
-
/**
|
|
7518
|
-
* @description 物流信息
|
|
7519
|
-
*/
|
|
7520
|
-
shippings?: ShippingInfo_2[];
|
|
7521
|
-
/**
|
|
7522
|
-
* @description 支付金额 (订单金额 + 物流费)
|
|
7523
|
-
*/
|
|
7524
|
-
paymentAmount?: MobileMoneyView;
|
|
7525
|
-
}
|
|
7526
|
-
|
|
7527
7019
|
/**
|
|
7528
7020
|
* @description OpenModal的返回值类型
|
|
7529
7021
|
*/
|
|
@@ -7730,56 +7222,6 @@ declare interface OSInfo {
|
|
|
7730
7222
|
osVer?: string;
|
|
7731
7223
|
}
|
|
7732
7224
|
|
|
7733
|
-
declare interface OtpChallengeActionForm {
|
|
7734
|
-
/**
|
|
7735
|
-
* @description action form type
|
|
7736
|
-
*/
|
|
7737
|
-
actionFormType?: string;
|
|
7738
|
-
/**
|
|
7739
|
-
* @description type of challenge
|
|
7740
|
-
*/
|
|
7741
|
-
challengeType?: string;
|
|
7742
|
-
/**
|
|
7743
|
-
* @description The actual render value
|
|
7744
|
-
*/
|
|
7745
|
-
challengeRenderValue?: string;
|
|
7746
|
-
/**
|
|
7747
|
-
* @description Describe the challenge is required by AAC or external party
|
|
7748
|
-
*/
|
|
7749
|
-
triggerSource?: string;
|
|
7750
|
-
/**
|
|
7751
|
-
* @description is support retry challenge
|
|
7752
|
-
* @default true
|
|
7753
|
-
*/
|
|
7754
|
-
isChallengeRetrySupported?: boolean;
|
|
7755
|
-
/**
|
|
7756
|
-
* @description is fist otp auto triggered
|
|
7757
|
-
* @default false
|
|
7758
|
-
*/
|
|
7759
|
-
isChallengeAutoTriggered?: boolean;
|
|
7760
|
-
/**
|
|
7761
|
-
* @description estimated challenge response duration
|
|
7762
|
-
* @default 0
|
|
7763
|
-
*/
|
|
7764
|
-
estimatedDuration?: number;
|
|
7765
|
-
/**
|
|
7766
|
-
* @description url - like h5 sdk challenge need to call back url
|
|
7767
|
-
*/
|
|
7768
|
-
challengeUrl?: string;
|
|
7769
|
-
/**
|
|
7770
|
-
* @description extend information
|
|
7771
|
-
*/
|
|
7772
|
-
extendInfo?: string;
|
|
7773
|
-
/**
|
|
7774
|
-
* @description verify Id
|
|
7775
|
-
*/
|
|
7776
|
-
verifyId?: string;
|
|
7777
|
-
/**
|
|
7778
|
-
* @description 重发次数
|
|
7779
|
-
*/
|
|
7780
|
-
resendLeftTimes?: number;
|
|
7781
|
-
}
|
|
7782
|
-
|
|
7783
7225
|
declare type PartialSpeKey<T, V> = Partial<T extends infer K extends string ? Record<K, V> : Record<string, V>>;
|
|
7784
7226
|
|
|
7785
7227
|
declare interface PayByLinkInfo {
|
|
@@ -7801,99 +7243,6 @@ declare interface PayByLinkInfo {
|
|
|
7801
7243
|
linkVersion?: number;
|
|
7802
7244
|
}
|
|
7803
7245
|
|
|
7804
|
-
/**
|
|
7805
|
-
* @description Payment element app config type
|
|
7806
|
-
*/
|
|
7807
|
-
export declare interface PaymentAppConfig extends BaseAppearance<PaymentAppearance>, BaseElementAppConfig {
|
|
7808
|
-
/**
|
|
7809
|
-
* @description sessionData,无法通过updateConfig更新
|
|
7810
|
-
*/
|
|
7811
|
-
sessionData?: string;
|
|
7812
|
-
/**
|
|
7813
|
-
* @internal sdk所在hostname
|
|
7814
|
-
*/
|
|
7815
|
-
merchantDomain?: string;
|
|
7816
|
-
/**
|
|
7817
|
-
* @internal 渲染数据
|
|
7818
|
-
*/
|
|
7819
|
-
renderData?: CashierSdkActionQueryResult;
|
|
7820
|
-
/**
|
|
7821
|
-
* @internal connect时有这个数据
|
|
7822
|
-
*/
|
|
7823
|
-
connectAccount?: OneAccountQueryResult;
|
|
7824
|
-
/**
|
|
7825
|
-
* @internal sessionData解析后的数据
|
|
7826
|
-
*/
|
|
7827
|
-
sessionMetaData?: IPaymentSessionMetaData;
|
|
7828
|
-
/**
|
|
7829
|
-
* @internal 渲染数据错误信息
|
|
7830
|
-
*/
|
|
7831
|
-
renderDataError?: ErrorPayload;
|
|
7832
|
-
/**
|
|
7833
|
-
* @internal sdk 版本号
|
|
7834
|
-
*/
|
|
7835
|
-
sdkVersion?: string;
|
|
7836
|
-
/**
|
|
7837
|
-
* @internal 内部联调使用,生产环境传递无效
|
|
7838
|
-
*/
|
|
7839
|
-
_requestConfig?: Partial<Omit<RequestOptions, 'scope' | 'tracker'>>;
|
|
7840
|
-
/**
|
|
7841
|
-
* @internal 内部使用,无需用户传递,用于log日志原数据
|
|
7842
|
-
*/
|
|
7843
|
-
logMetaData?: {
|
|
7844
|
-
paymentMethodCategoryType?: PaymentSessionConfig['paymentMethodCategoryType'];
|
|
7845
|
-
productSceneVersion?: PaymentSessionConfig['productSceneVersion'];
|
|
7846
|
-
trackId: string;
|
|
7847
|
-
merchantId?: string;
|
|
7848
|
-
paymentMethodType?: string;
|
|
7849
|
-
};
|
|
7850
|
-
/**
|
|
7851
|
-
* @internal 内部使用,无需用户传递,高度信息
|
|
7852
|
-
*/
|
|
7853
|
-
heightOfVisible?: number;
|
|
7854
|
-
}
|
|
7855
|
-
|
|
7856
|
-
/**
|
|
7857
|
-
* @description Payment element appearance type
|
|
7858
|
-
*/
|
|
7859
|
-
export declare type PaymentAppearance = PickAppearance<{
|
|
7860
|
-
displaySetting: 'showPaymentMethodListWhenSingleOption' | 'showCardBrandIcon' | 'showRadioWhenAccordionLayout' | 'showCardCVV';
|
|
7861
|
-
theme: AntomTheme;
|
|
7862
|
-
variables: AntomVariables;
|
|
7863
|
-
layout: AntomLayouts;
|
|
7864
|
-
}>;
|
|
7865
|
-
|
|
7866
|
-
/**
|
|
7867
|
-
* @description Payment element
|
|
7868
|
-
*/
|
|
7869
|
-
export declare class PaymentElement extends BaseMainElement<PaymentElementConfig, PaymentElementEvents> {
|
|
7870
|
-
static elementType: string;
|
|
7871
|
-
constructor(name: string, config: PaymentElementConfig);
|
|
7872
|
-
/**
|
|
7873
|
-
* @internal
|
|
7874
|
-
*/
|
|
7875
|
-
setup(): Promise<Partial<PaymentAppConfig> | undefined>;
|
|
7876
|
-
/**
|
|
7877
|
-
* @internal
|
|
7878
|
-
*/
|
|
7879
|
-
submit(data?: PaymentSubmitParams): Promise<PaymentSubmitResult>;
|
|
7880
|
-
protected focus(): void;
|
|
7881
|
-
protected blur(): void;
|
|
7882
|
-
protected clear(): void;
|
|
7883
|
-
}
|
|
7884
|
-
|
|
7885
|
-
/**
|
|
7886
|
-
* @description Payment element config type
|
|
7887
|
-
*/
|
|
7888
|
-
declare interface PaymentElementConfig extends BaseElementConfig<PaymentAppConfig> {
|
|
7889
|
-
}
|
|
7890
|
-
|
|
7891
|
-
/**
|
|
7892
|
-
* @description Payment element events
|
|
7893
|
-
*/
|
|
7894
|
-
export declare interface PaymentElementEvents extends AntomBridgeWithNativeEventMap<PaymentAppConfig, PaymentSubmitParams, PaymentSubmitResult> {
|
|
7895
|
-
}
|
|
7896
|
-
|
|
7897
7246
|
declare interface PaymentElementView {
|
|
7898
7247
|
/**
|
|
7899
7248
|
* @description payment element key
|
|
@@ -7995,36 +7344,6 @@ declare interface PaymentEvaluationResult {
|
|
|
7995
7344
|
paymentBalanceInfo?: DanaSofPayMethodView[];
|
|
7996
7345
|
}
|
|
7997
7346
|
|
|
7998
|
-
/**
|
|
7999
|
-
* @description Payment guidance information (CKP scenario)
|
|
8000
|
-
*
|
|
8001
|
-
* <p>Displays payment guide buttons on the checkout page, including: - Deep link: For launching the
|
|
8002
|
-
* bank application (required) - Copy configuration: Divider text, button labels, etc. (extensible
|
|
8003
|
-
* via Map, dynamically addable)
|
|
8004
|
-
*/
|
|
8005
|
-
declare interface PaymentGuideInfo {
|
|
8006
|
-
/**
|
|
8007
|
-
* @description The deep link (from iexpprod, used to launch the bank app) The frontend only displays the
|
|
8008
|
-
* payment guide button when this field is populated
|
|
8009
|
-
*/
|
|
8010
|
-
appLinkUrlForWeb?: string;
|
|
8011
|
-
/**
|
|
8012
|
-
* @description Copy configuration (from the config center) Stored in a Map to support dynamic extension of
|
|
8013
|
-
* text fields
|
|
8014
|
-
*
|
|
8015
|
-
* <p>Example configuration:
|
|
8016
|
-
*
|
|
8017
|
-
* <pre>
|
|
8018
|
-
* {
|
|
8019
|
-
* "dividerText": "or pay using",
|
|
8020
|
-
* "directPayButtonText": "Pay directly with online banking",
|
|
8021
|
-
* "ctoPButtonText": "Continue to payment"
|
|
8022
|
-
* }
|
|
8023
|
-
* </pre>
|
|
8024
|
-
*/
|
|
8025
|
-
copyWriting?: Record<string, any>;
|
|
8026
|
-
}
|
|
8027
|
-
|
|
8028
7347
|
/**
|
|
8029
7348
|
* @description 支付方式余额检查结果信息
|
|
8030
7349
|
*/
|
|
@@ -8087,10 +7406,6 @@ declare interface PaymentMethodView {
|
|
|
8087
7406
|
* @description icon
|
|
8088
7407
|
*/
|
|
8089
7408
|
icon?: string;
|
|
8090
|
-
/**
|
|
8091
|
-
* @description adaptive icon for PAYME payment method
|
|
8092
|
-
*/
|
|
8093
|
-
adaptiveIcon?: string;
|
|
8094
7409
|
/**
|
|
8095
7410
|
* @description icon对应的名称
|
|
8096
7411
|
*/
|
|
@@ -8099,10 +7414,6 @@ declare interface PaymentMethodView {
|
|
|
8099
7414
|
* @description 支付方式描述
|
|
8100
7415
|
*/
|
|
8101
7416
|
description?: string;
|
|
8102
|
-
/**
|
|
8103
|
-
* @description 支付方式点击后的描述
|
|
8104
|
-
*/
|
|
8105
|
-
descriptionAfterClick?: string;
|
|
8106
7417
|
/**
|
|
8107
7418
|
* @description category
|
|
8108
7419
|
*/
|
|
@@ -8237,10 +7548,6 @@ declare interface PaymentMethodView {
|
|
|
8237
7548
|
* @description 账单地址收集模式
|
|
8238
7549
|
*/
|
|
8239
7550
|
billingAddressCollectionMode?: string;
|
|
8240
|
-
/**
|
|
8241
|
-
* @description 分期银行信息列表
|
|
8242
|
-
*/
|
|
8243
|
-
supportIppBankList?: FrontSupportIppBank[];
|
|
8244
7551
|
}
|
|
8245
7552
|
|
|
8246
7553
|
declare interface PaymentOption {
|
|
@@ -8308,10 +7615,6 @@ declare interface PaymentOption {
|
|
|
8308
7615
|
* @description 支付选项Logo信息
|
|
8309
7616
|
*/
|
|
8310
7617
|
logo?: Logo;
|
|
8311
|
-
/**
|
|
8312
|
-
* @description 支付描述多语言列表。如果入参有locale,且入参的locale有对应语言,则这里只返回locale对应的语言。
|
|
8313
|
-
*/
|
|
8314
|
-
description?: Record<string, string>;
|
|
8315
7618
|
/**
|
|
8316
7619
|
* @description extendInfo extendInfo information
|
|
8317
7620
|
*/
|
|
@@ -8379,13 +7682,6 @@ declare interface PaymentQuoteInfo {
|
|
|
8379
7682
|
* @description payment amount view
|
|
8380
7683
|
*/
|
|
8381
7684
|
paymentAmountView?: PaymentView;
|
|
8382
|
-
/**
|
|
8383
|
-
* @description Display exchange rate from FX domain Quote, direction-adjusted and formatted to 2 decimal
|
|
8384
|
-
* places. - BID direction: value = 1/price, setScale(2, HALF_UP) - OFFER direction: value =
|
|
8385
|
-
* price, setScale(2, HALF_UP) Used for direct frontend access to exchange rate. Example: 3.16 for
|
|
8386
|
-
* MYR/SGD currency pair
|
|
8387
|
-
*/
|
|
8388
|
-
quotePrice?: any;
|
|
8389
7685
|
}
|
|
8390
7686
|
|
|
8391
7687
|
/**
|
|
@@ -8495,45 +7791,6 @@ declare interface PaymentSessionConfig {
|
|
|
8495
7791
|
productSceneVersion?: string;
|
|
8496
7792
|
}
|
|
8497
7793
|
|
|
8498
|
-
/**
|
|
8499
|
-
* @description The submit params
|
|
8500
|
-
*/
|
|
8501
|
-
export declare interface PaymentSubmitParams extends SubmitParams {
|
|
8502
|
-
/**
|
|
8503
|
-
* @description 是否由antom sdk自动处理唤端逻辑,默认为true,由sdk自动处理。
|
|
8504
|
-
* 如果antom sdk唤起客户端失败,建议设置为false,商家自行唤端
|
|
8505
|
-
*/
|
|
8506
|
-
handleActions?: boolean;
|
|
8507
|
-
/**
|
|
8508
|
-
* @description 收件地址信息
|
|
8509
|
-
*/
|
|
8510
|
-
shippingInfo?: ShippingInfo;
|
|
8511
|
-
/**
|
|
8512
|
-
* @description 集成用户自定义信息(如 cardHolderName)
|
|
8513
|
-
*/
|
|
8514
|
-
params?: Record<string, unknown>;
|
|
8515
|
-
}
|
|
8516
|
-
|
|
8517
|
-
/**
|
|
8518
|
-
* @description Payment element submit result
|
|
8519
|
-
*/
|
|
8520
|
-
export declare interface PaymentSubmitResult extends SubmitResult {
|
|
8521
|
-
paymentSession?: {
|
|
8522
|
-
/**
|
|
8523
|
-
* @description 回调页面的url链接,使用浏览器可直接打开,比如 http://xxx.app.com/xxx
|
|
8524
|
-
*/
|
|
8525
|
-
returnUrl: string;
|
|
8526
|
-
/**
|
|
8527
|
-
* @description 回调页面唤起app的url链接,使用浏览器可直接打开,比如 http://xxx.app.com/xxx
|
|
8528
|
-
*/
|
|
8529
|
-
returnAppUrl?: string;
|
|
8530
|
-
/**
|
|
8531
|
-
* @description 回调页面唤起app的scheme链接,比如 alipay://xxx
|
|
8532
|
-
*/
|
|
8533
|
-
returnAppScheme?: string;
|
|
8534
|
-
};
|
|
8535
|
-
}
|
|
8536
|
-
|
|
8537
7794
|
declare interface PaymentView {
|
|
8538
7795
|
/**
|
|
8539
7796
|
* @description 金额,以元为单位的金额
|
|
@@ -8652,11 +7909,6 @@ declare interface PeriodRule {
|
|
|
8652
7909
|
periodCount?: number;
|
|
8653
7910
|
}
|
|
8654
7911
|
|
|
8655
|
-
/**
|
|
8656
|
-
* @description 工具类型,仅从 Appearance 中拾取与 Props 类型匹配的属性。
|
|
8657
|
-
* 返回受 Props 中存在的键约束的部分外观对象。
|
|
8658
|
-
* @template Props - 要从 Appearance 中拾取的自定义外观属性类型。
|
|
8659
|
-
*/
|
|
8660
7912
|
declare type PickAppearance<Props extends Partial<DefaultAppearanceProps>> = Partial<Pick<Appearance<Props>, keyof Props extends infer k extends keyof Partial<Appearance> ? k : keyof Partial<Appearance>>>;
|
|
8661
7913
|
|
|
8662
7914
|
declare interface PluginContext {
|
|
@@ -10629,24 +9881,6 @@ TValue extends Array<infer AValue> ? Array<AValue extends infer TUnpacked & {} ?
|
|
|
10629
9881
|
|
|
10630
9882
|
declare type Pseudos = AdvancedPseudos | SimplePseudos;
|
|
10631
9883
|
|
|
10632
|
-
/**
|
|
10633
|
-
* @description QR code configuration for code form view
|
|
10634
|
-
*/
|
|
10635
|
-
declare interface QrCodeConfig {
|
|
10636
|
-
/**
|
|
10637
|
-
* @description QR code render style, e.g. "rounded"
|
|
10638
|
-
*/
|
|
10639
|
-
renderStyle?: string;
|
|
10640
|
-
/**
|
|
10641
|
-
* @description QR code center icon, can be URL or Base64 format
|
|
10642
|
-
*/
|
|
10643
|
-
centerIcon?: string;
|
|
10644
|
-
/**
|
|
10645
|
-
* @description QR code corner icon, can be URL or Base64 format
|
|
10646
|
-
*/
|
|
10647
|
-
cornerIcon?: string;
|
|
10648
|
-
}
|
|
10649
|
-
|
|
10650
9884
|
declare interface Rate {
|
|
10651
9885
|
/**
|
|
10652
9886
|
* @description rate label value
|
|
@@ -10716,31 +9950,13 @@ declare class ReceivePort {
|
|
|
10716
9950
|
}): Promise<Record<string, any> | undefined>;
|
|
10717
9951
|
}
|
|
10718
9952
|
|
|
10719
|
-
/**
|
|
10720
|
-
* @description 从webapp重定向到新URL的配置项。
|
|
10721
|
-
* 支持浏览器重定向、app link唤端及schema唤端。
|
|
10722
|
-
*/
|
|
10723
9953
|
declare interface RedirectOption {
|
|
10724
|
-
/**
|
|
10725
|
-
* @description 浏览器重定向到兜底的url,通常在唤端失败时会走这个,或者你不需要唤端,只需要跳转到某个url
|
|
10726
|
-
*/
|
|
10727
9954
|
url: string;
|
|
10728
|
-
/**
|
|
10729
|
-
* @description 唤端到url地址,http或https的地址
|
|
10730
|
-
*/
|
|
10731
|
-
appLinkUrl?: string;
|
|
10732
|
-
/**
|
|
10733
|
-
* @description 唤端到schema地址, schema://的地址
|
|
10734
|
-
*/
|
|
10735
|
-
schemaUrl?: string;
|
|
10736
|
-
/**
|
|
10737
|
-
* @description 重定向模式,默认为redirect
|
|
10738
|
-
*/
|
|
10739
9955
|
mode?: 'redirect' | 'replace';
|
|
10740
9956
|
/**
|
|
10741
9957
|
* @description 是否重定向后销毁实例,默认为true
|
|
10742
9958
|
*/
|
|
10743
|
-
|
|
9959
|
+
destory?: boolean;
|
|
10744
9960
|
}
|
|
10745
9961
|
|
|
10746
9962
|
declare type ReportData = {
|
|
@@ -10971,25 +10187,7 @@ declare interface SharePayInfo {
|
|
|
10971
10187
|
securityText?: string;
|
|
10972
10188
|
}
|
|
10973
10189
|
|
|
10974
|
-
|
|
10975
|
-
shippingName: {
|
|
10976
|
-
firstName: string;
|
|
10977
|
-
lastName: string;
|
|
10978
|
-
middleName?: string;
|
|
10979
|
-
fullName?: string;
|
|
10980
|
-
};
|
|
10981
|
-
shippingPhoneNo: string;
|
|
10982
|
-
shippingAddress: {
|
|
10983
|
-
region: string;
|
|
10984
|
-
address1: string;
|
|
10985
|
-
address2: string;
|
|
10986
|
-
city?: string;
|
|
10987
|
-
state?: string;
|
|
10988
|
-
zipCode: string;
|
|
10989
|
-
};
|
|
10990
|
-
}
|
|
10991
|
-
|
|
10992
|
-
declare interface ShippingInfo_2 {
|
|
10190
|
+
declare interface ShippingInfo {
|
|
10993
10191
|
/**
|
|
10994
10192
|
* @description The unique ID to identify the shipping info
|
|
10995
10193
|
*/
|
|
@@ -24907,14 +24105,14 @@ declare interface StandardShorthandPropertiesHyphen<TLength = (string & {}) | 0,
|
|
|
24907
24105
|
|
|
24908
24106
|
declare type StandardShorthandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<StandardShorthandPropertiesHyphen<TLength, TTime>>;
|
|
24909
24107
|
|
|
24910
|
-
export declare type SubmitParams = {
|
|
24911
|
-
redirect?: 'always' | 'if_required';
|
|
24912
|
-
};
|
|
24913
|
-
|
|
24914
24108
|
/**
|
|
24915
|
-
* @description
|
|
24109
|
+
* @description 成功时的data数据类型
|
|
24916
24110
|
*/
|
|
24917
24111
|
export declare type SubmitResult = {
|
|
24112
|
+
/**
|
|
24113
|
+
* 查询到的状态
|
|
24114
|
+
*/
|
|
24115
|
+
status: 'SUCCESS' | 'CANCELLED' | 'FAIL' | 'PROCESSING';
|
|
24918
24116
|
/**
|
|
24919
24117
|
* 查询到的结果码或者错误码, 在SUCCESS无该字段
|
|
24920
24118
|
* @deprecated 已废弃请读取error中的code
|
|
@@ -24927,10 +24125,6 @@ export declare type SubmitResult = {
|
|
|
24927
24125
|
* @internal
|
|
24928
24126
|
*/
|
|
24929
24127
|
message?: string;
|
|
24930
|
-
/**
|
|
24931
|
-
* 查询到的状态
|
|
24932
|
-
*/
|
|
24933
|
-
status: 'SUCCESS' | 'CANCELLED' | 'FAIL' | 'PROCESSING';
|
|
24934
24128
|
/**
|
|
24935
24129
|
* @description 对结果的详细结果码和结果信息,在status为SUCCESS时无该字段
|
|
24936
24130
|
*/
|
|
@@ -24943,10 +24137,6 @@ export declare type SubmitResult = {
|
|
|
24943
24137
|
* 查询到的结果消息
|
|
24944
24138
|
*/
|
|
24945
24139
|
message?: string;
|
|
24946
|
-
/**
|
|
24947
|
-
* @description 是否需要更换 session 重试
|
|
24948
|
-
*/
|
|
24949
|
-
needChangeSessionForRetry?: boolean;
|
|
24950
24140
|
};
|
|
24951
24141
|
/**
|
|
24952
24142
|
* 是否是用户手动取消3D
|
|
@@ -25405,16 +24595,6 @@ declare interface TerminalTypeAction {
|
|
|
25405
24595
|
interactionType?: string;
|
|
25406
24596
|
}
|
|
25407
24597
|
|
|
25408
|
-
/**
|
|
25409
|
-
* 主题色映射表 — 将 AntomTheme 映射到 loading 阶段的明暗模式和背景色。
|
|
25410
|
-
* 被 antom.ts(老架构入口)和 modernElementController(新架构入口)共用,
|
|
25411
|
-
* 确保两条路径的弹窗 loading 表现一致。
|
|
25412
|
-
*/
|
|
25413
|
-
export declare const themeColorMap: Record<AntomTheme, {
|
|
25414
|
-
theme: 'dark' | 'light';
|
|
25415
|
-
backgroundColor: string;
|
|
25416
|
-
}>;
|
|
25417
|
-
|
|
25418
24598
|
declare class Tracker {
|
|
25419
24599
|
protected requesterCacheWrapper?: RequesterCacheWrapper;
|
|
25420
24600
|
private initPromise;
|
|
@@ -25759,8 +24939,7 @@ export declare type VaultingAppearance = PickAppearance<VaultingAppearanceProps>
|
|
|
25759
24939
|
export declare type VaultingAppearanceProps = {
|
|
25760
24940
|
displaySetting: 'showCardBrandIcon';
|
|
25761
24941
|
theme: AntomTheme;
|
|
25762
|
-
variables:
|
|
25763
|
-
fonts?: FontSource[];
|
|
24942
|
+
variables: 'background-secondary' | 'radius-module' | 'wrapper-padding' | 'content-primary' | 'border-primary' | 'action-hover' | 'border-disable' | 'content-tertiary' | 'background-primary' | 'background-disable' | 'radius-component' | 'state-failure' | 'action-normal' | 'content-secondary';
|
|
25764
24943
|
};
|
|
25765
24944
|
|
|
25766
24945
|
/**
|
|
@@ -25789,7 +24968,7 @@ export declare class VaultingElement extends BaseMainElement<VaultingElementConf
|
|
|
25789
24968
|
declare interface VaultingElementConfig extends BaseElementConfig<VaultingAppConfig> {
|
|
25790
24969
|
}
|
|
25791
24970
|
|
|
25792
|
-
export declare interface VaultingElementEvents extends
|
|
24971
|
+
export declare interface VaultingElementEvents extends AntomBridgeEventMap<VaultingAppConfig, VaultingSubmitParams> {
|
|
25793
24972
|
}
|
|
25794
24973
|
|
|
25795
24974
|
/**
|