@alipay/ams-checkout 0.0.1783323899-dev.0 → 0.0.1783403875-dev.1
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/core/component/ckp/index.d.ts +1 -1
- package/esm/core/component/ckp/index.js +5 -2
- package/esm/core/component/element/elementController/index.d.ts +3 -3
- package/esm/core/component/element/elementController/index.js +57 -41
- package/esm/core/component/element/elementProcessor/baseElementProcessor.d.ts +1 -0
- package/esm/core/component/element/elementProcessor/baseElementProcessor.js +1 -0
- package/esm/core/component/element/elementProcessor/convertPaymentMethods.d.ts +22 -0
- package/esm/core/component/element/elementProcessor/convertPaymentMethods.js +159 -0
- package/esm/core/component/element/elementProcessor/paymentProcessor.d.ts +5 -0
- package/esm/core/component/element/elementProcessor/paymentProcessor.js +107 -29
- package/esm/core/component/element/index.d.ts +1 -4
- package/esm/core/component/element/index.js +4 -19
- package/esm/core/component/element/mock.js +1 -1
- package/esm/core/component/element/type.d.ts +77 -16
- package/esm/core/component/element/util.d.ts +9 -2
- package/esm/core/component/element/util.js +3 -2
- package/esm/foundation/service/event-center.js +1 -1
- 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/types/index.d.ts +4 -2
- package/esm/util/beforeConfirm.d.ts +4 -2
- package/esm/util/beforeConfirm.js +15 -14
- package/esm/util/logger.js +2 -1
- package/package.json +9 -15
- package/types.d.ts +94 -784
- package/types.untrimmed.d.ts +108 -931
- 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 -133
- package/esm/core/component/element/modernElementController/index.js +0 -1542
- package/esm/modern/global.d.ts +0 -3
- package/esm/modern/tools.js +0 -1
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
|
/**
|
|
@@ -1039,9 +899,9 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
|
|
|
1039
899
|
*/
|
|
1040
900
|
setup(): Promise<Partial<BaseElementAppConfig> | undefined>;
|
|
1041
901
|
/**
|
|
1042
|
-
* @param {HTMLElement}
|
|
902
|
+
* @param {string | HTMLElement} containerId 如果给字符串id不要带#号
|
|
1043
903
|
*/
|
|
1044
|
-
mount(
|
|
904
|
+
mount(containerId: HTMLElement): Promise<void>;
|
|
1045
905
|
/**
|
|
1046
906
|
* @description 内部使用,挂载iframe
|
|
1047
907
|
* @internal 外部不能直接调用
|
|
@@ -1051,7 +911,7 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
|
|
|
1051
911
|
* 更新webapp配置
|
|
1052
912
|
* @param {Partial<BaseElementAppConfig>} newConfig
|
|
1053
913
|
*/
|
|
1054
|
-
updateConfig(newConfig: Partial<Config['appConfig']>):
|
|
914
|
+
updateConfig(newConfig: Partial<Config['appConfig']>): void;
|
|
1055
915
|
/**
|
|
1056
916
|
* 卸载元素
|
|
1057
917
|
*/
|
|
@@ -1115,28 +975,20 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
|
|
|
1115
975
|
}
|
|
1116
976
|
|
|
1117
977
|
declare interface BaseElementAppConfig {
|
|
1118
|
-
/**
|
|
1119
|
-
* @internal 不透出给商户,统一从loadAntom获取
|
|
1120
|
-
*/
|
|
1121
978
|
locale?: string;
|
|
1122
979
|
/**
|
|
1123
|
-
* @internal
|
|
980
|
+
* @internal 不透出给商户
|
|
1124
981
|
*/
|
|
1125
982
|
env?: 'sandbox' | 'prod';
|
|
1126
983
|
/**
|
|
1127
|
-
* @description
|
|
984
|
+
* @description 商户的唯一标识
|
|
1128
985
|
* @internal 不透出到用户
|
|
1129
986
|
*/
|
|
1130
987
|
merchantId?: string;
|
|
1131
988
|
[key: string]: any;
|
|
1132
989
|
}
|
|
1133
990
|
|
|
1134
|
-
declare interface BaseElementConfig<T extends BaseElementAppConfig =
|
|
1135
|
-
/**
|
|
1136
|
-
* @description Session id forwarded to the iframe as the track_id query parameter.
|
|
1137
|
-
* @internal Internal element config only.
|
|
1138
|
-
*/
|
|
1139
|
-
trackId?: string;
|
|
991
|
+
declare interface BaseElementConfig<T extends BaseElementAppConfig = Record<string, any>> extends BaseConfig {
|
|
1140
992
|
appConfig: T;
|
|
1141
993
|
elementMode: ElementMode;
|
|
1142
994
|
}
|
|
@@ -1232,7 +1084,6 @@ declare abstract class BaseFactory {
|
|
|
1232
1084
|
*/
|
|
1233
1085
|
constructor(config: BaseFactoryConfig);
|
|
1234
1086
|
protected openModal(payload: BaseBridgeEventMap['OPENSDK@OPEN_MODAL']): Promise<OpenModalHandle>;
|
|
1235
|
-
protected redirect(payload: BaseBridgeEventMap['OPENSDK@REDIRECT']): void | Promise<void>;
|
|
1236
1087
|
/**
|
|
1237
1088
|
* @description 子类必须实现此方法,返回工厂可用的元素类列表
|
|
1238
1089
|
* @internal
|
|
@@ -1358,10 +1209,6 @@ declare abstract class BaseMainElement<Config extends BaseElementConfig = BaseEl
|
|
|
1358
1209
|
_submit(data?: EventMap['OPENSDK@SUBMIT'] | undefined): Promise<EventMap['OPENSDK@SUBMIT_REPLY']>;
|
|
1359
1210
|
}
|
|
1360
1211
|
|
|
1361
|
-
/**
|
|
1362
|
-
* @description 打开模态框的配置项。
|
|
1363
|
-
* 包含显示选项、关闭行为、外观设置及初始化数据。
|
|
1364
|
-
*/
|
|
1365
1212
|
declare interface BaseOpenModalConfig {
|
|
1366
1213
|
/**
|
|
1367
1214
|
* 无需手动传递,app的唯一scope
|
|
@@ -1385,21 +1232,10 @@ declare interface BaseOpenModalConfig {
|
|
|
1385
1232
|
onClose?: () => void;
|
|
1386
1233
|
url: string;
|
|
1387
1234
|
/**
|
|
1388
|
-
*
|
|
1235
|
+
* 关闭时,是否需要app页面二次确认,默认为false,即直接关闭
|
|
1389
1236
|
*/
|
|
1390
1237
|
closeConfirm?: boolean;
|
|
1391
|
-
/**
|
|
1392
|
-
* @description 需要同步的外观配置
|
|
1393
|
-
*/
|
|
1394
1238
|
appearance?: Appearance;
|
|
1395
|
-
/**
|
|
1396
|
-
* @description 需要传递的初始化数据
|
|
1397
|
-
*/
|
|
1398
|
-
initialData?: Record<string, any>;
|
|
1399
|
-
/**
|
|
1400
|
-
* @description 无需手动传递, 模态框的唯一标识
|
|
1401
|
-
*/
|
|
1402
|
-
modalId?: string;
|
|
1403
1239
|
}
|
|
1404
1240
|
|
|
1405
1241
|
declare type BehaviorConfig = {
|
|
@@ -1497,42 +1333,6 @@ declare interface C2PProps {
|
|
|
1497
1333
|
merchantTransactionId?: string;
|
|
1498
1334
|
}
|
|
1499
1335
|
|
|
1500
|
-
/**
|
|
1501
|
-
* @description native回调错误信息格式
|
|
1502
|
-
* @internal
|
|
1503
|
-
*/
|
|
1504
|
-
export declare interface CallbackErrorInfo {
|
|
1505
|
-
code: string;
|
|
1506
|
-
message?: string;
|
|
1507
|
-
needChangeSessionForRetry?: boolean;
|
|
1508
|
-
traceId?: string;
|
|
1509
|
-
context?: string;
|
|
1510
|
-
}
|
|
1511
|
-
|
|
1512
|
-
/**
|
|
1513
|
-
* @description native回调返回数据
|
|
1514
|
-
* @internal
|
|
1515
|
-
*/
|
|
1516
|
-
export declare interface CallbackReturnData {
|
|
1517
|
-
status?: string;
|
|
1518
|
-
userCanceled3D?: boolean;
|
|
1519
|
-
isExposed?: boolean;
|
|
1520
|
-
error?: CallbackErrorInfo;
|
|
1521
|
-
session?: {
|
|
1522
|
-
nextAction?: CallbackSessionNextAction;
|
|
1523
|
-
};
|
|
1524
|
-
}
|
|
1525
|
-
|
|
1526
|
-
/**
|
|
1527
|
-
* @description native回调会话下一步操作,包含了回调的url
|
|
1528
|
-
* @internal
|
|
1529
|
-
*/
|
|
1530
|
-
export declare interface CallbackSessionNextAction {
|
|
1531
|
-
normalUrl?: string;
|
|
1532
|
-
schemeUrl?: string;
|
|
1533
|
-
applinkUrl?: string;
|
|
1534
|
-
}
|
|
1535
|
-
|
|
1536
1336
|
declare interface CardIssuerAuthentication {
|
|
1537
1337
|
/**
|
|
1538
1338
|
* @description 卡售卖单元
|
|
@@ -1950,7 +1750,7 @@ declare interface CashierSdkActionQueryResult {
|
|
|
1950
1750
|
/**
|
|
1951
1751
|
* @description 物流信息, 包含物流地址和物流费
|
|
1952
1752
|
*/
|
|
1953
|
-
shippingInfo?:
|
|
1753
|
+
shippingInfo?: ShippingInfo;
|
|
1954
1754
|
/**
|
|
1955
1755
|
* @description 用户已绑资产信息
|
|
1956
1756
|
*/
|
|
@@ -1983,6 +1783,28 @@ declare interface ChargeInfo {
|
|
|
1983
1783
|
chargeActualAmountView?: PaymentView;
|
|
1984
1784
|
}
|
|
1985
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
|
+
|
|
1986
1808
|
declare interface CodeFormView {
|
|
1987
1809
|
/**
|
|
1988
1810
|
* @description title
|
|
@@ -2008,11 +1830,6 @@ declare interface CodeFormView {
|
|
|
2008
1830
|
* @description label
|
|
2009
1831
|
*/
|
|
2010
1832
|
label?: string;
|
|
2011
|
-
/**
|
|
2012
|
-
* @description Payment guidance information (CKP scenario) The frontend only displays the payment guide button
|
|
2013
|
-
* when appLinkUrlForWeb is populated
|
|
2014
|
-
*/
|
|
2015
|
-
paymentGuideInfo?: PaymentGuideInfo;
|
|
2016
1833
|
/**
|
|
2017
1834
|
* @description 提醒事项
|
|
2018
1835
|
*/
|
|
@@ -2029,10 +1846,6 @@ declare interface CodeFormView {
|
|
|
2029
1846
|
* @description 码过期时间
|
|
2030
1847
|
*/
|
|
2031
1848
|
codeExpireTime?: string;
|
|
2032
|
-
/**
|
|
2033
|
-
* @description QR code configuration including renderStyle, centerIcon and cornerIcon
|
|
2034
|
-
*/
|
|
2035
|
-
qrcodeConfig?: QrCodeConfig;
|
|
2036
1849
|
}
|
|
2037
1850
|
|
|
2038
1851
|
/**
|
|
@@ -2589,14 +2402,10 @@ export declare interface ConfirmCardSetupOptions {
|
|
|
2589
2402
|
export declare interface ConfirmPaymentOptions extends Omit<ConfirmCardSetupOptions, 'elements'> {
|
|
2590
2403
|
sessionData: string;
|
|
2591
2404
|
/**
|
|
2592
|
-
* @description 传入已挂载的 CVVElement
|
|
2405
|
+
* @description 传入已挂载的 CVVElement 或 Elements 实例,不传则使用无 UI 自动提交模式
|
|
2593
2406
|
*/
|
|
2594
2407
|
elements?: BaseMainElement | BaseElements;
|
|
2595
2408
|
appearance?: CVVAppearance;
|
|
2596
|
-
/**
|
|
2597
|
-
* @description 集成用户自定义信息(如 cardHolderName)
|
|
2598
|
-
*/
|
|
2599
|
-
params?: Record<string, unknown>;
|
|
2600
2409
|
}
|
|
2601
2410
|
|
|
2602
2411
|
/**
|
|
@@ -2668,13 +2477,6 @@ declare namespace CSS_2 {
|
|
|
2668
2477
|
}
|
|
2669
2478
|
}
|
|
2670
2479
|
|
|
2671
|
-
/**
|
|
2672
|
-
* CSS 字体源 — 通过 <link> 标签加载外部 CSS(如 Google Fonts)
|
|
2673
|
-
*/
|
|
2674
|
-
declare interface CssFontSource {
|
|
2675
|
-
cssSrc: string;
|
|
2676
|
-
}
|
|
2677
|
-
|
|
2678
2480
|
declare interface CurrencyInfo {
|
|
2679
2481
|
/**
|
|
2680
2482
|
* @description Getter method for property <tt>currencyCode</tt>.
|
|
@@ -2719,17 +2521,6 @@ declare interface CustomerFxInfo {
|
|
|
2719
2521
|
useMarketPrice?: boolean;
|
|
2720
2522
|
}
|
|
2721
2523
|
|
|
2722
|
-
/**
|
|
2723
|
-
* 自定义字体源 — 通过 @font-face 加载自托管字体
|
|
2724
|
-
*/
|
|
2725
|
-
declare interface CustomFontSource {
|
|
2726
|
-
family: string;
|
|
2727
|
-
src: string;
|
|
2728
|
-
weight?: string;
|
|
2729
|
-
style?: string;
|
|
2730
|
-
unicodeRange?: string;
|
|
2731
|
-
}
|
|
2732
|
-
|
|
2733
2524
|
/**
|
|
2734
2525
|
* CustomizedPerformanceKey 是给业务使用的自定义指标,共 20 个,页面之间互相独立
|
|
2735
2526
|
*/
|
|
@@ -2739,7 +2530,7 @@ declare type CustomizedPerformanceKey = 'm1' | 'm2' | 'm3' | 'm4' | 'm5' | 'm6'
|
|
|
2739
2530
|
* @public
|
|
2740
2531
|
* @description CVV element app config type
|
|
2741
2532
|
*/
|
|
2742
|
-
export declare interface CVVAppConfig extends BaseAppearance<CVVAppearance
|
|
2533
|
+
export declare interface CVVAppConfig extends BaseAppearance<CVVAppearance> {
|
|
2743
2534
|
/**
|
|
2744
2535
|
* @description sessionData
|
|
2745
2536
|
*/
|
|
@@ -2777,8 +2568,7 @@ export declare type CVVAppearance = PickAppearance<CVVAppearanceProps>;
|
|
|
2777
2568
|
|
|
2778
2569
|
export declare type CVVAppearanceProps = {
|
|
2779
2570
|
theme: AntomTheme;
|
|
2780
|
-
variables:
|
|
2781
|
-
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';
|
|
2782
2572
|
};
|
|
2783
2573
|
|
|
2784
2574
|
/**
|
|
@@ -2870,10 +2660,6 @@ export declare interface CVVSubmitParams {
|
|
|
2870
2660
|
* 重定向策略
|
|
2871
2661
|
*/
|
|
2872
2662
|
redirect?: 'always' | 'if_required';
|
|
2873
|
-
/**
|
|
2874
|
-
* 集成用户自定义信息(如 cardHolderName)
|
|
2875
|
-
*/
|
|
2876
|
-
params?: Record<string, unknown>;
|
|
2877
2663
|
}
|
|
2878
2664
|
|
|
2879
2665
|
declare interface DanaSofCouponInfo {
|
|
@@ -3592,7 +3378,7 @@ declare class Elements extends BaseElements {
|
|
|
3592
3378
|
getElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
|
|
3593
3379
|
}
|
|
3594
3380
|
|
|
3595
|
-
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';
|
|
3596
3382
|
|
|
3597
3383
|
declare type Env = 'local' | 'dev' | 'sit' | 'pre' | 'prod';
|
|
3598
3384
|
|
|
@@ -3683,22 +3469,6 @@ declare interface ExpCardPlan {
|
|
|
3683
3469
|
* @description 每个月分期利息
|
|
3684
3470
|
*/
|
|
3685
3471
|
monthlyInterest?: ComIpayIexpprodServiceFacadeCommonAmount;
|
|
3686
|
-
/**
|
|
3687
|
-
* @description 分期有效期开始时间
|
|
3688
|
-
*/
|
|
3689
|
-
validStartTime?: string;
|
|
3690
|
-
/**
|
|
3691
|
-
* @description 分期有效期结束时间
|
|
3692
|
-
*/
|
|
3693
|
-
validEndTime?: string;
|
|
3694
|
-
/**
|
|
3695
|
-
* @description 支持的银行信息
|
|
3696
|
-
*
|
|
3697
|
-
* 包含该分期计划支持的银行详细信息,包括银行简称、logo等。
|
|
3698
|
-
* 该字段从 installmentBanks 数据中通过 bankShortName 关联而来,
|
|
3699
|
-
* 若分期计划无银行限制或未匹配到银行信息,该字段可能为null。@see ExpSupportIppBank
|
|
3700
|
-
*/
|
|
3701
|
-
supportedBank?: ExpSupportIppBank;
|
|
3702
3472
|
}
|
|
3703
3473
|
|
|
3704
3474
|
declare interface ExpInstallmentInfo {
|
|
@@ -3723,18 +3493,12 @@ declare interface ExpPaymentOptionDetail {
|
|
|
3723
3493
|
* @public
|
|
3724
3494
|
* @description Express element app config type
|
|
3725
3495
|
*/
|
|
3726
|
-
export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetting
|
|
3496
|
+
export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetting> {
|
|
3727
3497
|
/** payment SessionData */
|
|
3728
3498
|
sessionData?: string;
|
|
3729
3499
|
/** Business division (country/region) */
|
|
3730
3500
|
businessDivision?: string;
|
|
3731
|
-
/**
|
|
3732
|
-
* Amount & Currency
|
|
3733
|
-
*
|
|
3734
|
-
* Only effective via `updateConfig({ amount })` at runtime.
|
|
3735
|
-
* Passing amount at creation time is ignored; the initial amount
|
|
3736
|
-
* comes from the server-side sdkQuery result (renderData.paymentAmount).
|
|
3737
|
-
*/
|
|
3501
|
+
/** Amount & Currency */
|
|
3738
3502
|
amount?: {
|
|
3739
3503
|
currency: string;
|
|
3740
3504
|
value: string;
|
|
@@ -3743,20 +3507,20 @@ export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetti
|
|
|
3743
3507
|
paypal?: PayPalConfig;
|
|
3744
3508
|
/**
|
|
3745
3509
|
* Button text type (following Stripe Express Checkout Element design)
|
|
3746
|
-
* 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
|
|
3747
3512
|
*/
|
|
3748
3513
|
buttonType?: {
|
|
3749
3514
|
/** PayPal: paypal | checkout | buynow | pay */
|
|
3750
3515
|
paypal?: 'paypal' | 'checkout' | 'buynow' | 'pay';
|
|
3751
3516
|
[method: string]: string | undefined;
|
|
3752
3517
|
};
|
|
3753
|
-
/**
|
|
3754
|
-
* Unified height for all buttons (px)
|
|
3755
|
-
*/
|
|
3518
|
+
/** Unified height for all buttons (px) */
|
|
3756
3519
|
buttonHeight?: number;
|
|
3757
3520
|
/**
|
|
3758
3521
|
* Button color theme (following Stripe Express Checkout Element design)
|
|
3759
|
-
* 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
|
|
3760
3524
|
*/
|
|
3761
3525
|
buttonTheme?: {
|
|
3762
3526
|
/** PayPal: gold | blue | silver | white | black */
|
|
@@ -3777,15 +3541,6 @@ export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetti
|
|
|
3777
3541
|
* Locale for internationalization, passed from entry params (loadAntom), default to en_US
|
|
3778
3542
|
*/
|
|
3779
3543
|
locale?: string;
|
|
3780
|
-
/**
|
|
3781
|
-
* 是否运行在 Native App 的 WebView 中。
|
|
3782
|
-
* 为 true 时,跳转通过 onRedirect 事件委托给 Native 端处理。
|
|
3783
|
-
*/
|
|
3784
|
-
isNativeAppWebview?: boolean;
|
|
3785
|
-
/** @internal SDK host 侧商户域名,供 Apple Pay merchant validation 使用 */
|
|
3786
|
-
merchantDomain?: string;
|
|
3787
|
-
/** @internal Elements2 历史协议字段,含义同 merchantDomain */
|
|
3788
|
-
doMain?: string;
|
|
3789
3544
|
}
|
|
3790
3545
|
|
|
3791
3546
|
/** cancel 事件负载 */
|
|
@@ -3794,54 +3549,24 @@ export declare interface ExpressCancelEvent {
|
|
|
3794
3549
|
data?: any;
|
|
3795
3550
|
}
|
|
3796
3551
|
|
|
3797
|
-
/** click
|
|
3552
|
+
/** click 事件负载 */
|
|
3798
3553
|
export declare interface ExpressClickEvent {
|
|
3799
3554
|
expressPaymentType: string;
|
|
3555
|
+
resolve: (options: ClickResolveOptions) => void;
|
|
3800
3556
|
}
|
|
3801
3557
|
|
|
3802
3558
|
/** confirm 事件负载(统一终态,替代 approve) */
|
|
3803
3559
|
export declare interface ExpressConfirmData {
|
|
3804
3560
|
expressPaymentType: string;
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
address?: {
|
|
3810
|
-
line1?: string;
|
|
3811
|
-
line2?: string;
|
|
3812
|
-
city?: string;
|
|
3813
|
-
state?: string;
|
|
3814
|
-
postalCode?: string;
|
|
3815
|
-
country?: string;
|
|
3816
|
-
};
|
|
3817
|
-
};
|
|
3818
|
-
shippingAddress?: {
|
|
3819
|
-
name?: string;
|
|
3820
|
-
phone?: string;
|
|
3821
|
-
address?: {
|
|
3822
|
-
line1?: string;
|
|
3823
|
-
line2?: string;
|
|
3824
|
-
city?: string;
|
|
3825
|
-
state?: string;
|
|
3826
|
-
postalCode?: string;
|
|
3827
|
-
country?: string;
|
|
3828
|
-
};
|
|
3829
|
-
};
|
|
3830
|
-
/** 支付方式返回的原始支付数据(如 alipayCn、applePay 等) */
|
|
3831
|
-
paymentData?: unknown;
|
|
3832
|
-
/**
|
|
3833
|
-
* 商户主动拒绝本次支付(如库存不足、价格变动等)。
|
|
3834
|
-
* 调用后 SDK 立即取消支付流程,confirmPayment() 无需调用。
|
|
3835
|
-
*/
|
|
3836
|
-
paymentFailed: () => void;
|
|
3561
|
+
paymentData: any;
|
|
3562
|
+
billingDetails?: any;
|
|
3563
|
+
shippingAddress?: any;
|
|
3564
|
+
sessionData?: string;
|
|
3837
3565
|
}
|
|
3838
3566
|
|
|
3839
3567
|
/**
|
|
3840
3568
|
* @public
|
|
3841
3569
|
* @description Express element - express checkout element, supports PayPal / Apple Pay / Google Pay
|
|
3842
|
-
*
|
|
3843
|
-
* Host 侧只保留 Element 生命周期、商户事件包装和 bridge 连接。
|
|
3844
|
-
* AP/GP/AlipayCN 的 submit、2DS/3DS、polling 结果处理都由 express_element webapp 承接。
|
|
3845
3570
|
*/
|
|
3846
3571
|
export declare class ExpressElement extends BaseMainElement<ExpressElementConfig, ExpressElementEvents> {
|
|
3847
3572
|
static elementType: string;
|
|
@@ -3849,44 +3574,15 @@ export declare class ExpressElement extends BaseMainElement<ExpressElementConfig
|
|
|
3849
3574
|
* Store all function-type callbacks locally, not involved in postMessage serialization
|
|
3850
3575
|
*/
|
|
3851
3576
|
private _callbacks;
|
|
3852
|
-
/** setup 阶段的 renderData,仅供非 Safari PC Apple Pay host-token 路径读取 paymentRequest。 */
|
|
3853
|
-
private _renderData;
|
|
3854
|
-
private _hostSign;
|
|
3855
|
-
/**
|
|
3856
|
-
* 本地事件处理器(绕过 bridge 的 host→webapp 方向限制)。
|
|
3857
|
-
* bridge.on 只能监听 iframe 发来的消息;SDK host 主动推送事件给商户时走 _emit → _localHandlers。
|
|
3858
|
-
*/
|
|
3859
|
-
private _localHandlers;
|
|
3860
|
-
/** 支付流程进行中标志(click → confirm/error/cancel 之间) */
|
|
3861
|
-
private _paymentInProgress;
|
|
3862
|
-
private _paypalOverlay;
|
|
3863
3577
|
constructor(name: string, config: ExpressElementConfig);
|
|
3578
|
+
setup(): Promise<Partial<ExpressAppConfig> | undefined>;
|
|
3864
3579
|
/**
|
|
3865
|
-
*
|
|
3866
|
-
* 1. 对 confirm 事件拦截,在商户回调执行前注入 paymentFailed()
|
|
3867
|
-
* 2. 对 onRedirect 事件同步注册到 _localHandlers(SDK host 主动推送时商户能收到)
|
|
3868
|
-
*/
|
|
3869
|
-
on(event: string, handler: (...args: any[]) => void): void;
|
|
3870
|
-
/**
|
|
3871
|
-
* SDK host 主动推送事件给商户(不走 bridge postMessage,直接调用本地注册的 handler)。
|
|
3872
|
-
* 用于 Native WebView 场景下 SDK 需要向商户透传跳转信息等。
|
|
3873
|
-
*/
|
|
3874
|
-
private _emit;
|
|
3875
|
-
updateConfig(newConfig: Pick<ExpressAppConfig, 'amount'>): Promise<ExpressElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
|
|
3876
|
-
/**
|
|
3877
|
-
* 商户在 confirm 回调内调用,触发实际支付提交。
|
|
3878
|
-
* iframe 收到 OPENSDK@COMPLETE_PAYMENT 后执行 submitPay / polling 等,
|
|
3879
|
-
* 完成后通过 OPENSDK@COMPLETE_PAYMENT_RESULT 回包,Promise resolve。
|
|
3580
|
+
* Register internal event listeners (iframe communication)
|
|
3880
3581
|
*/
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
code: string;
|
|
3886
|
-
message: string;
|
|
3887
|
-
};
|
|
3888
|
-
}>;
|
|
3889
|
-
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;
|
|
3890
3586
|
private registerInternalListeners;
|
|
3891
3587
|
protected focus(): void;
|
|
3892
3588
|
protected blur(): void;
|
|
@@ -3904,83 +3600,84 @@ export declare interface ExpressElementConfig extends BaseElementConfig<ExpressA
|
|
|
3904
3600
|
* @public
|
|
3905
3601
|
* @description Express element events type
|
|
3906
3602
|
*/
|
|
3907
|
-
export declare interface ExpressElementEvents extends
|
|
3603
|
+
export declare interface ExpressElementEvents extends AntomBridgeEventMap<ExpressAppConfig> {
|
|
3604
|
+
/**
|
|
3605
|
+
* @description Element ready event — 上报可用支付方式
|
|
3606
|
+
*/
|
|
3908
3607
|
ready: {
|
|
3909
3608
|
availablePaymentMethods: Record<string, boolean>;
|
|
3910
3609
|
};
|
|
3610
|
+
/**
|
|
3611
|
+
* @description 用户点击按钮 — 商户必须调用 event.resolve() 后 sheet 才弹出
|
|
3612
|
+
* 对 PayPal: resolve 为 no-op(PayPal 自行弹出 popup)
|
|
3613
|
+
*/
|
|
3911
3614
|
click: ExpressClickEvent;
|
|
3615
|
+
/**
|
|
3616
|
+
* @description 统一支付完成事件(替代 approve)
|
|
3617
|
+
* 用户授权完成后触发,通过 expressPaymentType 区分钱包类型
|
|
3618
|
+
*/
|
|
3912
3619
|
confirm: ExpressConfirmData;
|
|
3620
|
+
/**
|
|
3621
|
+
* @description 支付错误事件(扩展基类 ErrorPayload,新增 expressPaymentType)
|
|
3622
|
+
*/
|
|
3913
3623
|
error: ErrorPayload & {
|
|
3914
3624
|
expressPaymentType: string;
|
|
3915
3625
|
};
|
|
3626
|
+
/**
|
|
3627
|
+
* @description 用户取消支付
|
|
3628
|
+
*/
|
|
3916
3629
|
cancel: ExpressCancelEvent;
|
|
3630
|
+
/**
|
|
3631
|
+
* @description 用户在 sheet 内变更收货地址(AP/GP only,PayPal 不触发)
|
|
3632
|
+
*/
|
|
3917
3633
|
shippingaddresschange: {
|
|
3918
3634
|
expressPaymentType: string;
|
|
3919
3635
|
address: any;
|
|
3920
3636
|
resolve: (options: ShippingResolveOptions) => void;
|
|
3921
3637
|
reject: (reason: string) => void;
|
|
3922
3638
|
};
|
|
3639
|
+
/**
|
|
3640
|
+
* @description 用户在 sheet 内变更配送方式(AP/GP only,PayPal 不触发)
|
|
3641
|
+
*/
|
|
3923
3642
|
shippingratechange: {
|
|
3924
3643
|
expressPaymentType: string;
|
|
3925
3644
|
shippingRate: any;
|
|
3926
3645
|
resolve: (options: RateResolveOptions) => void;
|
|
3927
3646
|
};
|
|
3647
|
+
/** @internal iframe 内容高度变化 */
|
|
3928
3648
|
contentHeightChanged: {
|
|
3929
3649
|
height: number;
|
|
3930
3650
|
};
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
};
|
|
3934
|
-
'OPENSDK@CLICK_RESOLVE': Record<string, never>;
|
|
3935
|
-
'OPENSDK@PAYPAL_CREATE_ORDER': {
|
|
3651
|
+
/** @internal PayPal 请求商户创建订单 */
|
|
3652
|
+
'paypal:createOrder': {
|
|
3936
3653
|
requestId: string;
|
|
3937
3654
|
};
|
|
3938
|
-
|
|
3655
|
+
/** @internal PayPal createOrder 响应 */
|
|
3656
|
+
'paypal:createOrder:reply': {
|
|
3939
3657
|
requestId: string;
|
|
3940
3658
|
sessionData?: string;
|
|
3941
3659
|
error?: string;
|
|
3942
3660
|
};
|
|
3943
|
-
|
|
3661
|
+
/** @internal PayPal 用户变更收货地址 */
|
|
3662
|
+
'paypal:onShippingAddressChange': {
|
|
3944
3663
|
requestId: string;
|
|
3945
3664
|
shippingData: any;
|
|
3946
3665
|
};
|
|
3947
|
-
|
|
3666
|
+
/** @internal PayPal 收货地址变更响应 */
|
|
3667
|
+
'paypal:onShippingAddressChange:reply': {
|
|
3948
3668
|
requestId: string;
|
|
3949
3669
|
error?: string;
|
|
3950
3670
|
};
|
|
3951
|
-
|
|
3671
|
+
/** @internal PayPal 用户变更配送方式 */
|
|
3672
|
+
'paypal:onShippingOptionsChange': {
|
|
3952
3673
|
requestId: string;
|
|
3953
3674
|
shippingData: any;
|
|
3954
3675
|
};
|
|
3955
|
-
|
|
3676
|
+
/** @internal PayPal 配送方式变更响应 */
|
|
3677
|
+
'paypal:onShippingOptionsChange:reply': {
|
|
3956
3678
|
requestId: string;
|
|
3957
3679
|
error?: string;
|
|
3958
3680
|
};
|
|
3959
|
-
'OPENSDK@GET_APPLE_PAY_TOKEN': {
|
|
3960
|
-
requestId: string;
|
|
3961
|
-
expressPaymentType: string;
|
|
3962
|
-
};
|
|
3963
|
-
/** host 完成 Apple Pay token 获取后回包给 iframe,submit/3DS/polling 均由 webapp 完成 */
|
|
3964
|
-
'OPENSDK@GET_APPLE_PAY_TOKEN_REPLY': {
|
|
3965
|
-
requestId: string;
|
|
3966
|
-
success: boolean;
|
|
3967
|
-
result?: any;
|
|
3968
|
-
errorCode?: string;
|
|
3969
|
-
errorMessage?: string;
|
|
3970
|
-
billingDetails?: any;
|
|
3971
|
-
shippingAddress?: any;
|
|
3972
|
-
};
|
|
3973
|
-
'OPENSDK@UPDATE_CONFIG_REPLY': {
|
|
3974
|
-
error?: ErrorPayload<string>;
|
|
3975
|
-
};
|
|
3976
|
-
'OPENSDK@COMPLETE_PAYMENT_REJECT': Record<string, never>;
|
|
3977
|
-
onRedirect: {
|
|
3978
|
-
normalUrl: string;
|
|
3979
|
-
applinkUrl?: string;
|
|
3980
|
-
schemaUrl?: string;
|
|
3981
|
-
isDestroy: boolean;
|
|
3982
|
-
needReset: boolean;
|
|
3983
|
-
};
|
|
3984
3681
|
}
|
|
3985
3682
|
|
|
3986
3683
|
declare interface ExpSupportBank {
|
|
@@ -4005,24 +3702,6 @@ declare interface ExpSupportCardBrand {
|
|
|
4005
3702
|
logo?: Logo;
|
|
4006
3703
|
}
|
|
4007
3704
|
|
|
4008
|
-
/**
|
|
4009
|
-
* @description 支持的分期银行信息
|
|
4010
|
-
*/
|
|
4011
|
-
declare interface ExpSupportIppBank {
|
|
4012
|
-
/**
|
|
4013
|
-
* @description bank short name or bank code
|
|
4014
|
-
*/
|
|
4015
|
-
bankShortName?: string;
|
|
4016
|
-
/**
|
|
4017
|
-
* @description logo
|
|
4018
|
-
*/
|
|
4019
|
-
logo?: Logo;
|
|
4020
|
-
/**
|
|
4021
|
-
* @description bins
|
|
4022
|
-
*/
|
|
4023
|
-
bins?: string[];
|
|
4024
|
-
}
|
|
4025
|
-
|
|
4026
3705
|
declare type Fallback<T> = { [P in keyof T]: T[P] | readonly NonNullable<T[P]>[] };
|
|
4027
3706
|
|
|
4028
3707
|
declare interface FirstPhaseSubscriptionDetail {
|
|
@@ -4040,27 +3719,6 @@ declare interface FirstPhaseSubscriptionDetail {
|
|
|
4040
3719
|
promotionDetails?: PromotionDetail[];
|
|
4041
3720
|
}
|
|
4042
3721
|
|
|
4043
|
-
declare type FontSource = CssFontSource | CustomFontSource;
|
|
4044
|
-
|
|
4045
|
-
declare interface FrontModulesToBeLoadedInterface {
|
|
4046
|
-
acquirerName: string;
|
|
4047
|
-
scriptUrl: string;
|
|
4048
|
-
}
|
|
4049
|
-
|
|
4050
|
-
/**
|
|
4051
|
-
* @description 分期银行展示模型
|
|
4052
|
-
*/
|
|
4053
|
-
declare interface FrontSupportIppBank {
|
|
4054
|
-
/**
|
|
4055
|
-
* @description bank short name or bank code
|
|
4056
|
-
*/
|
|
4057
|
-
bankShortName?: string;
|
|
4058
|
-
/**
|
|
4059
|
-
* @description logo
|
|
4060
|
-
*/
|
|
4061
|
-
logo?: Logo;
|
|
4062
|
-
}
|
|
4063
|
-
|
|
4064
3722
|
declare type GetI18nQueryParam = string | {
|
|
4065
3723
|
/**
|
|
4066
3724
|
* 多语言文案的 key
|
|
@@ -4692,14 +4350,6 @@ declare interface HTTPErrorCallbackOptions {
|
|
|
4692
4350
|
aborted?: 0 | 1;
|
|
4693
4351
|
}
|
|
4694
4352
|
|
|
4695
|
-
declare interface IApplePayContactField {
|
|
4696
|
-
email: string;
|
|
4697
|
-
name: string;
|
|
4698
|
-
phone: string;
|
|
4699
|
-
postalAddress: string;
|
|
4700
|
-
phoneticName: string;
|
|
4701
|
-
}
|
|
4702
|
-
|
|
4703
4353
|
declare interface iBaseElementClass {
|
|
4704
4354
|
new (name: string, config: BaseElementConfig): BaseElement;
|
|
4705
4355
|
elementType: string;
|
|
@@ -4867,100 +4517,6 @@ declare interface IOptions {
|
|
|
4867
4517
|
stayTime?: number;
|
|
4868
4518
|
}
|
|
4869
4519
|
|
|
4870
|
-
declare interface IPaymentSessionMetaData {
|
|
4871
|
-
clientId?: string;
|
|
4872
|
-
renderDisplayType?: string;
|
|
4873
|
-
paymentSessionConfig?: PaymentSessionConfig;
|
|
4874
|
-
securityConfig?: SessionSecurityConfig;
|
|
4875
|
-
moneyView?: any;
|
|
4876
|
-
extendInfo?: string;
|
|
4877
|
-
paymentMethodInfoView?: any;
|
|
4878
|
-
paymentView?: any;
|
|
4879
|
-
modernWeb?: boolean;
|
|
4880
|
-
action?: PaymentSessionAction;
|
|
4881
|
-
/**
|
|
4882
|
-
* @description 是一个string,灰度开关,格式为 flag1,flag2,flag3
|
|
4883
|
-
*/
|
|
4884
|
-
flowSwitchTags?: string;
|
|
4885
|
-
authUrlInfo?: {
|
|
4886
|
-
appIdentifier?: string;
|
|
4887
|
-
applinkUrl?: string;
|
|
4888
|
-
normalUrl?: string;
|
|
4889
|
-
schemeUrl?: string;
|
|
4890
|
-
authUrl?: string;
|
|
4891
|
-
};
|
|
4892
|
-
paymentSessionFactor?: {
|
|
4893
|
-
externalRiskTimeout?: number;
|
|
4894
|
-
extendInfo?: {
|
|
4895
|
-
merchantCapabilities?: string[];
|
|
4896
|
-
supportedNetworks?: string[];
|
|
4897
|
-
requiredBillingContactFields: IApplePayContactField[];
|
|
4898
|
-
requiredShippingContactFields: IApplePayContactField[];
|
|
4899
|
-
};
|
|
4900
|
-
merchantInfo?: {
|
|
4901
|
-
registeredCountry?: string;
|
|
4902
|
-
partnerId?: string;
|
|
4903
|
-
merchantName?: string;
|
|
4904
|
-
};
|
|
4905
|
-
order?: {
|
|
4906
|
-
orderDescription: string;
|
|
4907
|
-
};
|
|
4908
|
-
paymentAmount?: {
|
|
4909
|
-
value?: string;
|
|
4910
|
-
currency?: string;
|
|
4911
|
-
};
|
|
4912
|
-
paymentMethodInfo?: {
|
|
4913
|
-
paymentMethodType?: string;
|
|
4914
|
-
};
|
|
4915
|
-
paymentMethodViewMetaData?: any;
|
|
4916
|
-
paymentRequestId?: string;
|
|
4917
|
-
supportedLanguages?: any;
|
|
4918
|
-
/**
|
|
4919
|
-
* 当前为苹果分期场景的信息
|
|
4920
|
-
*/
|
|
4921
|
-
recurringInfo?: {
|
|
4922
|
-
/**
|
|
4923
|
-
* 代扣协议开始日期 不传为当前系统时间
|
|
4924
|
-
*/
|
|
4925
|
-
startDate?: number;
|
|
4926
|
-
/**
|
|
4927
|
-
* 代扣协议结束日期 不传不限制结束时间
|
|
4928
|
-
*/
|
|
4929
|
-
endDate?: number;
|
|
4930
|
-
/**
|
|
4931
|
-
* 付款时间间隔单位,支持:"year" "month" "day" "hour" "minute" 不传默认month
|
|
4932
|
-
*/
|
|
4933
|
-
intervalUnit?: string;
|
|
4934
|
-
/**
|
|
4935
|
-
* 付款时间间隔。比如每过6个月付款一次,intervalCount就是6, 不传默认为1
|
|
4936
|
-
*/
|
|
4937
|
-
intervalCount?: number;
|
|
4938
|
-
/**
|
|
4939
|
-
* 分期标题信息
|
|
4940
|
-
*/
|
|
4941
|
-
title?: string;
|
|
4942
|
-
/**
|
|
4943
|
-
* 分期管理页面
|
|
4944
|
-
*/
|
|
4945
|
-
managementURL?: string;
|
|
4946
|
-
/**
|
|
4947
|
-
* 苹果通知ipay MAPN信息变更的地址
|
|
4948
|
-
*/
|
|
4949
|
-
tokenNotificationURL?: string;
|
|
4950
|
-
/**
|
|
4951
|
-
* 分期协议描述
|
|
4952
|
-
*/
|
|
4953
|
-
agreementDescription?: string;
|
|
4954
|
-
};
|
|
4955
|
-
frontModulesToBeLoaded?: FrontModulesToBeLoadedInterface[];
|
|
4956
|
-
};
|
|
4957
|
-
connectFactor?: {
|
|
4958
|
-
enableConnect?: boolean;
|
|
4959
|
-
};
|
|
4960
|
-
skipRenderPaymentMethod?: boolean;
|
|
4961
|
-
needAccountConfirmPage?: boolean;
|
|
4962
|
-
}
|
|
4963
|
-
|
|
4964
4520
|
declare interface ISystemInfo {
|
|
4965
4521
|
readonly pixelRatio: number;
|
|
4966
4522
|
readonly windowWidth: number;
|
|
@@ -7460,68 +7016,6 @@ declare interface OneAccountInfo {
|
|
|
7460
7016
|
accountStatus?: string;
|
|
7461
7017
|
}
|
|
7462
7018
|
|
|
7463
|
-
/**
|
|
7464
|
-
* @description one account 账户信息查询结果
|
|
7465
|
-
*/
|
|
7466
|
-
declare interface OneAccountQueryResult {
|
|
7467
|
-
/**
|
|
7468
|
-
* @description 是否业务处理成功
|
|
7469
|
-
*/
|
|
7470
|
-
success?: boolean;
|
|
7471
|
-
/**
|
|
7472
|
-
* @description 错误上下文
|
|
7473
|
-
*/
|
|
7474
|
-
errorContext?: ErrorContext;
|
|
7475
|
-
/**
|
|
7476
|
-
* @description 返回结果码
|
|
7477
|
-
*/
|
|
7478
|
-
resultCode?: string;
|
|
7479
|
-
/**
|
|
7480
|
-
* @description 返回结果信息
|
|
7481
|
-
*/
|
|
7482
|
-
resultMessage?: string;
|
|
7483
|
-
/**
|
|
7484
|
-
* @description error actions
|
|
7485
|
-
*/
|
|
7486
|
-
errorActions?: Record<string, string>;
|
|
7487
|
-
/**
|
|
7488
|
-
* @description error code
|
|
7489
|
-
*/
|
|
7490
|
-
errorCode?: string;
|
|
7491
|
-
/**
|
|
7492
|
-
* @description error status
|
|
7493
|
-
*/
|
|
7494
|
-
errorStatus?: string;
|
|
7495
|
-
/**
|
|
7496
|
-
* @description error message
|
|
7497
|
-
*/
|
|
7498
|
-
errorMessage?: string;
|
|
7499
|
-
/**
|
|
7500
|
-
* @description extend info
|
|
7501
|
-
*/
|
|
7502
|
-
extendInfo?: Record<string, string>;
|
|
7503
|
-
/**
|
|
7504
|
-
* @description one account 账户信息
|
|
7505
|
-
*/
|
|
7506
|
-
accountInfo?: OneAccountInfo;
|
|
7507
|
-
/**
|
|
7508
|
-
* @description action form 下一步动作
|
|
7509
|
-
*/
|
|
7510
|
-
actionForm?: OtpChallengeActionForm;
|
|
7511
|
-
/**
|
|
7512
|
-
* @description 支付方式列表
|
|
7513
|
-
*/
|
|
7514
|
-
paymentMethods?: PaymentMethodView[];
|
|
7515
|
-
/**
|
|
7516
|
-
* @description 物流信息
|
|
7517
|
-
*/
|
|
7518
|
-
shippings?: ShippingInfo_2[];
|
|
7519
|
-
/**
|
|
7520
|
-
* @description 支付金额 (订单金额 + 物流费)
|
|
7521
|
-
*/
|
|
7522
|
-
paymentAmount?: MobileMoneyView;
|
|
7523
|
-
}
|
|
7524
|
-
|
|
7525
7019
|
/**
|
|
7526
7020
|
* @description OpenModal的返回值类型
|
|
7527
7021
|
*/
|
|
@@ -7728,56 +7222,6 @@ declare interface OSInfo {
|
|
|
7728
7222
|
osVer?: string;
|
|
7729
7223
|
}
|
|
7730
7224
|
|
|
7731
|
-
declare interface OtpChallengeActionForm {
|
|
7732
|
-
/**
|
|
7733
|
-
* @description action form type
|
|
7734
|
-
*/
|
|
7735
|
-
actionFormType?: string;
|
|
7736
|
-
/**
|
|
7737
|
-
* @description type of challenge
|
|
7738
|
-
*/
|
|
7739
|
-
challengeType?: string;
|
|
7740
|
-
/**
|
|
7741
|
-
* @description The actual render value
|
|
7742
|
-
*/
|
|
7743
|
-
challengeRenderValue?: string;
|
|
7744
|
-
/**
|
|
7745
|
-
* @description Describe the challenge is required by AAC or external party
|
|
7746
|
-
*/
|
|
7747
|
-
triggerSource?: string;
|
|
7748
|
-
/**
|
|
7749
|
-
* @description is support retry challenge
|
|
7750
|
-
* @default true
|
|
7751
|
-
*/
|
|
7752
|
-
isChallengeRetrySupported?: boolean;
|
|
7753
|
-
/**
|
|
7754
|
-
* @description is fist otp auto triggered
|
|
7755
|
-
* @default false
|
|
7756
|
-
*/
|
|
7757
|
-
isChallengeAutoTriggered?: boolean;
|
|
7758
|
-
/**
|
|
7759
|
-
* @description estimated challenge response duration
|
|
7760
|
-
* @default 0
|
|
7761
|
-
*/
|
|
7762
|
-
estimatedDuration?: number;
|
|
7763
|
-
/**
|
|
7764
|
-
* @description url - like h5 sdk challenge need to call back url
|
|
7765
|
-
*/
|
|
7766
|
-
challengeUrl?: string;
|
|
7767
|
-
/**
|
|
7768
|
-
* @description extend information
|
|
7769
|
-
*/
|
|
7770
|
-
extendInfo?: string;
|
|
7771
|
-
/**
|
|
7772
|
-
* @description verify Id
|
|
7773
|
-
*/
|
|
7774
|
-
verifyId?: string;
|
|
7775
|
-
/**
|
|
7776
|
-
* @description 重发次数
|
|
7777
|
-
*/
|
|
7778
|
-
resendLeftTimes?: number;
|
|
7779
|
-
}
|
|
7780
|
-
|
|
7781
7225
|
declare type PartialSpeKey<T, V> = Partial<T extends infer K extends string ? Record<K, V> : Record<string, V>>;
|
|
7782
7226
|
|
|
7783
7227
|
declare interface PayByLinkInfo {
|
|
@@ -7799,103 +7243,6 @@ declare interface PayByLinkInfo {
|
|
|
7799
7243
|
linkVersion?: number;
|
|
7800
7244
|
}
|
|
7801
7245
|
|
|
7802
|
-
/**
|
|
7803
|
-
* @description Payment element app config type
|
|
7804
|
-
*/
|
|
7805
|
-
export declare interface PaymentAppConfig extends BaseAppearance<PaymentAppearance>, BaseElementAppConfig {
|
|
7806
|
-
/**
|
|
7807
|
-
* @description sessionData,无法通过updateConfig更新
|
|
7808
|
-
*/
|
|
7809
|
-
sessionData?: string;
|
|
7810
|
-
/**
|
|
7811
|
-
* @internal sdk所在hostname
|
|
7812
|
-
*/
|
|
7813
|
-
merchantDomain?: string;
|
|
7814
|
-
/**
|
|
7815
|
-
* @internal 渲染数据
|
|
7816
|
-
*/
|
|
7817
|
-
renderData?: CashierSdkActionQueryResult;
|
|
7818
|
-
/**
|
|
7819
|
-
* @internal connect时有这个数据
|
|
7820
|
-
*/
|
|
7821
|
-
connectAccount?: OneAccountQueryResult;
|
|
7822
|
-
/**
|
|
7823
|
-
* @internal sessionData解析后的数据
|
|
7824
|
-
*/
|
|
7825
|
-
sessionMetaData?: IPaymentSessionMetaData;
|
|
7826
|
-
/**
|
|
7827
|
-
* @internal 渲染数据错误信息
|
|
7828
|
-
*/
|
|
7829
|
-
renderDataError?: ErrorPayload;
|
|
7830
|
-
/**
|
|
7831
|
-
* @internal sdk 版本号
|
|
7832
|
-
*/
|
|
7833
|
-
sdkVersion?: string;
|
|
7834
|
-
/**
|
|
7835
|
-
* @internal 内部联调使用,生产环境传递无效
|
|
7836
|
-
*/
|
|
7837
|
-
_requestConfig?: Partial<Omit<RequestOptions, 'scope' | 'tracker'>>;
|
|
7838
|
-
/**
|
|
7839
|
-
* @internal 内部使用,无需用户传递,用于log日志原数据
|
|
7840
|
-
*/
|
|
7841
|
-
logMetaData?: {
|
|
7842
|
-
paymentMethodCategoryType?: PaymentSessionConfig['paymentMethodCategoryType'];
|
|
7843
|
-
productSceneVersion?: PaymentSessionConfig['productSceneVersion'];
|
|
7844
|
-
trackId: string;
|
|
7845
|
-
merchantId?: string;
|
|
7846
|
-
paymentMethodType?: string;
|
|
7847
|
-
};
|
|
7848
|
-
/**
|
|
7849
|
-
* @internal 内部使用,无需用户传递,高度信息
|
|
7850
|
-
*/
|
|
7851
|
-
heightOfVisible?: number;
|
|
7852
|
-
}
|
|
7853
|
-
|
|
7854
|
-
/**
|
|
7855
|
-
* @description Payment element appearance type
|
|
7856
|
-
*/
|
|
7857
|
-
export declare type PaymentAppearance = PickAppearance<{
|
|
7858
|
-
displaySetting: 'showPaymentMethodListWhenSingleOption' | 'showCardBrandIcon' | 'showRadioWhenAccordionLayout' | 'showCardCVV';
|
|
7859
|
-
theme: AntomTheme;
|
|
7860
|
-
variables: AntomVariables;
|
|
7861
|
-
layout: AntomLayouts;
|
|
7862
|
-
}>;
|
|
7863
|
-
|
|
7864
|
-
/**
|
|
7865
|
-
* @description Payment element
|
|
7866
|
-
*/
|
|
7867
|
-
export declare class PaymentElement extends BaseMainElement<PaymentElementConfig, PaymentElementEvents> {
|
|
7868
|
-
static elementType: string;
|
|
7869
|
-
/**
|
|
7870
|
-
* @internal 提交中标记,防止提交过程中重复操作
|
|
7871
|
-
*/
|
|
7872
|
-
private _submitting;
|
|
7873
|
-
constructor(name: string, config: PaymentElementConfig);
|
|
7874
|
-
/**
|
|
7875
|
-
* @internal
|
|
7876
|
-
*/
|
|
7877
|
-
setup(): Promise<Partial<PaymentAppConfig> | undefined>;
|
|
7878
|
-
/**
|
|
7879
|
-
* @internal
|
|
7880
|
-
*/
|
|
7881
|
-
submit(data?: PaymentSubmitParams): Promise<PaymentSubmitResult>;
|
|
7882
|
-
protected focus(): void;
|
|
7883
|
-
protected blur(): void;
|
|
7884
|
-
protected clear(): void;
|
|
7885
|
-
}
|
|
7886
|
-
|
|
7887
|
-
/**
|
|
7888
|
-
* @description Payment element config type
|
|
7889
|
-
*/
|
|
7890
|
-
declare interface PaymentElementConfig extends BaseElementConfig<PaymentAppConfig> {
|
|
7891
|
-
}
|
|
7892
|
-
|
|
7893
|
-
/**
|
|
7894
|
-
* @description Payment element events
|
|
7895
|
-
*/
|
|
7896
|
-
export declare interface PaymentElementEvents extends AntomBridgeWithNativeEventMap<PaymentAppConfig, PaymentSubmitParams, PaymentSubmitResult> {
|
|
7897
|
-
}
|
|
7898
|
-
|
|
7899
7246
|
declare interface PaymentElementView {
|
|
7900
7247
|
/**
|
|
7901
7248
|
* @description payment element key
|
|
@@ -7997,36 +7344,6 @@ declare interface PaymentEvaluationResult {
|
|
|
7997
7344
|
paymentBalanceInfo?: DanaSofPayMethodView[];
|
|
7998
7345
|
}
|
|
7999
7346
|
|
|
8000
|
-
/**
|
|
8001
|
-
* @description Payment guidance information (CKP scenario)
|
|
8002
|
-
*
|
|
8003
|
-
* <p>Displays payment guide buttons on the checkout page, including: - Deep link: For launching the
|
|
8004
|
-
* bank application (required) - Copy configuration: Divider text, button labels, etc. (extensible
|
|
8005
|
-
* via Map, dynamically addable)
|
|
8006
|
-
*/
|
|
8007
|
-
declare interface PaymentGuideInfo {
|
|
8008
|
-
/**
|
|
8009
|
-
* @description The deep link (from iexpprod, used to launch the bank app) The frontend only displays the
|
|
8010
|
-
* payment guide button when this field is populated
|
|
8011
|
-
*/
|
|
8012
|
-
appLinkUrlForWeb?: string;
|
|
8013
|
-
/**
|
|
8014
|
-
* @description Copy configuration (from the config center) Stored in a Map to support dynamic extension of
|
|
8015
|
-
* text fields
|
|
8016
|
-
*
|
|
8017
|
-
* <p>Example configuration:
|
|
8018
|
-
*
|
|
8019
|
-
* <pre>
|
|
8020
|
-
* {
|
|
8021
|
-
* "dividerText": "or pay using",
|
|
8022
|
-
* "directPayButtonText": "Pay directly with online banking",
|
|
8023
|
-
* "ctoPButtonText": "Continue to payment"
|
|
8024
|
-
* }
|
|
8025
|
-
* </pre>
|
|
8026
|
-
*/
|
|
8027
|
-
copyWriting?: Record<string, any>;
|
|
8028
|
-
}
|
|
8029
|
-
|
|
8030
7347
|
/**
|
|
8031
7348
|
* @description 支付方式余额检查结果信息
|
|
8032
7349
|
*/
|
|
@@ -8089,10 +7406,6 @@ declare interface PaymentMethodView {
|
|
|
8089
7406
|
* @description icon
|
|
8090
7407
|
*/
|
|
8091
7408
|
icon?: string;
|
|
8092
|
-
/**
|
|
8093
|
-
* @description adaptive icon for PAYME payment method
|
|
8094
|
-
*/
|
|
8095
|
-
adaptiveIcon?: string;
|
|
8096
7409
|
/**
|
|
8097
7410
|
* @description icon对应的名称
|
|
8098
7411
|
*/
|
|
@@ -8101,10 +7414,6 @@ declare interface PaymentMethodView {
|
|
|
8101
7414
|
* @description 支付方式描述
|
|
8102
7415
|
*/
|
|
8103
7416
|
description?: string;
|
|
8104
|
-
/**
|
|
8105
|
-
* @description 支付方式点击后的描述
|
|
8106
|
-
*/
|
|
8107
|
-
descriptionAfterClick?: string;
|
|
8108
7417
|
/**
|
|
8109
7418
|
* @description category
|
|
8110
7419
|
*/
|
|
@@ -8239,10 +7548,6 @@ declare interface PaymentMethodView {
|
|
|
8239
7548
|
* @description 账单地址收集模式
|
|
8240
7549
|
*/
|
|
8241
7550
|
billingAddressCollectionMode?: string;
|
|
8242
|
-
/**
|
|
8243
|
-
* @description 分期银行信息列表
|
|
8244
|
-
*/
|
|
8245
|
-
supportIppBankList?: FrontSupportIppBank[];
|
|
8246
7551
|
}
|
|
8247
7552
|
|
|
8248
7553
|
declare interface PaymentOption {
|
|
@@ -8310,10 +7615,6 @@ declare interface PaymentOption {
|
|
|
8310
7615
|
* @description 支付选项Logo信息
|
|
8311
7616
|
*/
|
|
8312
7617
|
logo?: Logo;
|
|
8313
|
-
/**
|
|
8314
|
-
* @description 支付描述多语言列表。如果入参有locale,且入参的locale有对应语言,则这里只返回locale对应的语言。
|
|
8315
|
-
*/
|
|
8316
|
-
description?: Record<string, string>;
|
|
8317
7618
|
/**
|
|
8318
7619
|
* @description extendInfo extendInfo information
|
|
8319
7620
|
*/
|
|
@@ -8381,13 +7682,6 @@ declare interface PaymentQuoteInfo {
|
|
|
8381
7682
|
* @description payment amount view
|
|
8382
7683
|
*/
|
|
8383
7684
|
paymentAmountView?: PaymentView;
|
|
8384
|
-
/**
|
|
8385
|
-
* @description Display exchange rate from FX domain Quote, direction-adjusted and formatted to 2 decimal
|
|
8386
|
-
* places. - BID direction: value = 1/price, setScale(2, HALF_UP) - OFFER direction: value =
|
|
8387
|
-
* price, setScale(2, HALF_UP) Used for direct frontend access to exchange rate. Example: 3.16 for
|
|
8388
|
-
* MYR/SGD currency pair
|
|
8389
|
-
*/
|
|
8390
|
-
quotePrice?: any;
|
|
8391
7685
|
}
|
|
8392
7686
|
|
|
8393
7687
|
/**
|
|
@@ -8497,45 +7791,6 @@ declare interface PaymentSessionConfig {
|
|
|
8497
7791
|
productSceneVersion?: string;
|
|
8498
7792
|
}
|
|
8499
7793
|
|
|
8500
|
-
/**
|
|
8501
|
-
* @description The submit params
|
|
8502
|
-
*/
|
|
8503
|
-
export declare interface PaymentSubmitParams extends SubmitParams {
|
|
8504
|
-
/**
|
|
8505
|
-
* @description 是否由antom sdk自动处理唤端逻辑,默认为true,由sdk自动处理。
|
|
8506
|
-
* 如果antom sdk唤起客户端失败,建议设置为false,商家自行唤端
|
|
8507
|
-
*/
|
|
8508
|
-
handleActions?: boolean;
|
|
8509
|
-
/**
|
|
8510
|
-
* @description 收件地址信息
|
|
8511
|
-
*/
|
|
8512
|
-
shippingInfo?: ShippingInfo;
|
|
8513
|
-
/**
|
|
8514
|
-
* @description 集成用户自定义信息(如 cardHolderName)
|
|
8515
|
-
*/
|
|
8516
|
-
params?: Record<string, unknown>;
|
|
8517
|
-
}
|
|
8518
|
-
|
|
8519
|
-
/**
|
|
8520
|
-
* @description Payment element submit result
|
|
8521
|
-
*/
|
|
8522
|
-
export declare interface PaymentSubmitResult extends SubmitResult {
|
|
8523
|
-
paymentSession?: {
|
|
8524
|
-
/**
|
|
8525
|
-
* @description 回调页面的url链接,使用浏览器可直接打开,比如 http://xxx.app.com/xxx
|
|
8526
|
-
*/
|
|
8527
|
-
returnUrl: string;
|
|
8528
|
-
/**
|
|
8529
|
-
* @description 回调页面唤起app的url链接,使用浏览器可直接打开,比如 http://xxx.app.com/xxx
|
|
8530
|
-
*/
|
|
8531
|
-
returnAppUrl?: string;
|
|
8532
|
-
/**
|
|
8533
|
-
* @description 回调页面唤起app的scheme链接,比如 alipay://xxx
|
|
8534
|
-
*/
|
|
8535
|
-
returnAppScheme?: string;
|
|
8536
|
-
};
|
|
8537
|
-
}
|
|
8538
|
-
|
|
8539
7794
|
declare interface PaymentView {
|
|
8540
7795
|
/**
|
|
8541
7796
|
* @description 金额,以元为单位的金额
|
|
@@ -8654,11 +7909,6 @@ declare interface PeriodRule {
|
|
|
8654
7909
|
periodCount?: number;
|
|
8655
7910
|
}
|
|
8656
7911
|
|
|
8657
|
-
/**
|
|
8658
|
-
* @description 工具类型,仅从 Appearance 中拾取与 Props 类型匹配的属性。
|
|
8659
|
-
* 返回受 Props 中存在的键约束的部分外观对象。
|
|
8660
|
-
* @template Props - 要从 Appearance 中拾取的自定义外观属性类型。
|
|
8661
|
-
*/
|
|
8662
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>>>;
|
|
8663
7913
|
|
|
8664
7914
|
declare interface PluginContext {
|
|
@@ -10631,24 +9881,6 @@ TValue extends Array<infer AValue> ? Array<AValue extends infer TUnpacked & {} ?
|
|
|
10631
9881
|
|
|
10632
9882
|
declare type Pseudos = AdvancedPseudos | SimplePseudos;
|
|
10633
9883
|
|
|
10634
|
-
/**
|
|
10635
|
-
* @description QR code configuration for code form view
|
|
10636
|
-
*/
|
|
10637
|
-
declare interface QrCodeConfig {
|
|
10638
|
-
/**
|
|
10639
|
-
* @description QR code render style, e.g. "rounded"
|
|
10640
|
-
*/
|
|
10641
|
-
renderStyle?: string;
|
|
10642
|
-
/**
|
|
10643
|
-
* @description QR code center icon, can be URL or Base64 format
|
|
10644
|
-
*/
|
|
10645
|
-
centerIcon?: string;
|
|
10646
|
-
/**
|
|
10647
|
-
* @description QR code corner icon, can be URL or Base64 format
|
|
10648
|
-
*/
|
|
10649
|
-
cornerIcon?: string;
|
|
10650
|
-
}
|
|
10651
|
-
|
|
10652
9884
|
declare interface Rate {
|
|
10653
9885
|
/**
|
|
10654
9886
|
* @description rate label value
|
|
@@ -10718,31 +9950,13 @@ declare class ReceivePort {
|
|
|
10718
9950
|
}): Promise<Record<string, any> | undefined>;
|
|
10719
9951
|
}
|
|
10720
9952
|
|
|
10721
|
-
/**
|
|
10722
|
-
* @description 从webapp重定向到新URL的配置项。
|
|
10723
|
-
* 支持浏览器重定向、app link唤端及schema唤端。
|
|
10724
|
-
*/
|
|
10725
9953
|
declare interface RedirectOption {
|
|
10726
|
-
/**
|
|
10727
|
-
* @description 浏览器重定向到兜底的url,通常在唤端失败时会走这个,或者你不需要唤端,只需要跳转到某个url
|
|
10728
|
-
*/
|
|
10729
9954
|
url: string;
|
|
10730
|
-
/**
|
|
10731
|
-
* @description 唤端到url地址,http或https的地址
|
|
10732
|
-
*/
|
|
10733
|
-
appLinkUrl?: string;
|
|
10734
|
-
/**
|
|
10735
|
-
* @description 唤端到schema地址, schema://的地址
|
|
10736
|
-
*/
|
|
10737
|
-
schemaUrl?: string;
|
|
10738
|
-
/**
|
|
10739
|
-
* @description 重定向模式,默认为redirect
|
|
10740
|
-
*/
|
|
10741
9955
|
mode?: 'redirect' | 'replace';
|
|
10742
9956
|
/**
|
|
10743
9957
|
* @description 是否重定向后销毁实例,默认为true
|
|
10744
9958
|
*/
|
|
10745
|
-
|
|
9959
|
+
destory?: boolean;
|
|
10746
9960
|
}
|
|
10747
9961
|
|
|
10748
9962
|
declare type ReportData = {
|
|
@@ -10973,25 +10187,7 @@ declare interface SharePayInfo {
|
|
|
10973
10187
|
securityText?: string;
|
|
10974
10188
|
}
|
|
10975
10189
|
|
|
10976
|
-
|
|
10977
|
-
shippingName: {
|
|
10978
|
-
firstName: string;
|
|
10979
|
-
lastName: string;
|
|
10980
|
-
middleName?: string;
|
|
10981
|
-
fullName?: string;
|
|
10982
|
-
};
|
|
10983
|
-
shippingPhoneNo: string;
|
|
10984
|
-
shippingAddress: {
|
|
10985
|
-
region: string;
|
|
10986
|
-
address1: string;
|
|
10987
|
-
address2: string;
|
|
10988
|
-
city?: string;
|
|
10989
|
-
state?: string;
|
|
10990
|
-
zipCode: string;
|
|
10991
|
-
};
|
|
10992
|
-
}
|
|
10993
|
-
|
|
10994
|
-
declare interface ShippingInfo_2 {
|
|
10190
|
+
declare interface ShippingInfo {
|
|
10995
10191
|
/**
|
|
10996
10192
|
* @description The unique ID to identify the shipping info
|
|
10997
10193
|
*/
|
|
@@ -24909,14 +24105,14 @@ declare interface StandardShorthandPropertiesHyphen<TLength = (string & {}) | 0,
|
|
|
24909
24105
|
|
|
24910
24106
|
declare type StandardShorthandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<StandardShorthandPropertiesHyphen<TLength, TTime>>;
|
|
24911
24107
|
|
|
24912
|
-
export declare type SubmitParams = {
|
|
24913
|
-
redirect?: 'always' | 'if_required';
|
|
24914
|
-
};
|
|
24915
|
-
|
|
24916
24108
|
/**
|
|
24917
|
-
* @description
|
|
24109
|
+
* @description 成功时的data数据类型
|
|
24918
24110
|
*/
|
|
24919
24111
|
export declare type SubmitResult = {
|
|
24112
|
+
/**
|
|
24113
|
+
* 查询到的状态
|
|
24114
|
+
*/
|
|
24115
|
+
status: 'SUCCESS' | 'CANCELLED' | 'FAIL' | 'PROCESSING';
|
|
24920
24116
|
/**
|
|
24921
24117
|
* 查询到的结果码或者错误码, 在SUCCESS无该字段
|
|
24922
24118
|
* @deprecated 已废弃请读取error中的code
|
|
@@ -24929,10 +24125,6 @@ export declare type SubmitResult = {
|
|
|
24929
24125
|
* @internal
|
|
24930
24126
|
*/
|
|
24931
24127
|
message?: string;
|
|
24932
|
-
/**
|
|
24933
|
-
* 查询到的状态
|
|
24934
|
-
*/
|
|
24935
|
-
status: 'SUCCESS' | 'CANCELLED' | 'FAIL' | 'PROCESSING';
|
|
24936
24128
|
/**
|
|
24937
24129
|
* @description 对结果的详细结果码和结果信息,在status为SUCCESS时无该字段
|
|
24938
24130
|
*/
|
|
@@ -24945,10 +24137,6 @@ export declare type SubmitResult = {
|
|
|
24945
24137
|
* 查询到的结果消息
|
|
24946
24138
|
*/
|
|
24947
24139
|
message?: string;
|
|
24948
|
-
/**
|
|
24949
|
-
* @description 是否需要更换 session 重试
|
|
24950
|
-
*/
|
|
24951
|
-
needChangeSessionForRetry?: boolean;
|
|
24952
24140
|
};
|
|
24953
24141
|
/**
|
|
24954
24142
|
* 是否是用户手动取消3D
|
|
@@ -25407,16 +24595,6 @@ declare interface TerminalTypeAction {
|
|
|
25407
24595
|
interactionType?: string;
|
|
25408
24596
|
}
|
|
25409
24597
|
|
|
25410
|
-
/**
|
|
25411
|
-
* 主题色映射表 — 将 AntomTheme 映射到 loading 阶段的明暗模式和背景色。
|
|
25412
|
-
* 被 antom.ts(老架构入口)和 modernElementController(新架构入口)共用,
|
|
25413
|
-
* 确保两条路径的弹窗 loading 表现一致。
|
|
25414
|
-
*/
|
|
25415
|
-
export declare const themeColorMap: Record<AntomTheme, {
|
|
25416
|
-
theme: 'dark' | 'light';
|
|
25417
|
-
backgroundColor: string;
|
|
25418
|
-
}>;
|
|
25419
|
-
|
|
25420
24598
|
declare class Tracker {
|
|
25421
24599
|
protected requesterCacheWrapper?: RequesterCacheWrapper;
|
|
25422
24600
|
private initPromise;
|
|
@@ -25761,8 +24939,7 @@ export declare type VaultingAppearance = PickAppearance<VaultingAppearanceProps>
|
|
|
25761
24939
|
export declare type VaultingAppearanceProps = {
|
|
25762
24940
|
displaySetting: 'showCardBrandIcon';
|
|
25763
24941
|
theme: AntomTheme;
|
|
25764
|
-
variables:
|
|
25765
|
-
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';
|
|
25766
24943
|
};
|
|
25767
24944
|
|
|
25768
24945
|
/**
|
|
@@ -25791,7 +24968,7 @@ export declare class VaultingElement extends BaseMainElement<VaultingElementConf
|
|
|
25791
24968
|
declare interface VaultingElementConfig extends BaseElementConfig<VaultingAppConfig> {
|
|
25792
24969
|
}
|
|
25793
24970
|
|
|
25794
|
-
export declare interface VaultingElementEvents extends
|
|
24971
|
+
export declare interface VaultingElementEvents extends AntomBridgeEventMap<VaultingAppConfig, VaultingSubmitParams> {
|
|
25795
24972
|
}
|
|
25796
24973
|
|
|
25797
24974
|
/**
|