@alipay/ams-checkout 2.0.28 → 2.0.29
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 -3
- package/dist/ams-checkout.min.js +1 -1
- package/esm/config/index.js +1 -1
- package/esm/core/component/element/modernElementController/index.d.ts +4 -1
- package/esm/core/component/element/modernElementController/index.js +184 -132
- package/esm/modern/index.js +1 -1
- package/esm/modern/loadAntomTracker.d.ts +7 -0
- package/esm/modern/loadAntomTracker.js +64 -0
- package/esm/modern/tools.js +1 -1
- package/esm/tsdoc-metadata.json +1 -1
- package/esm/util/logger.js +1 -1
- package/esm/util/timezone.d.ts +1 -0
- package/esm/util/timezone.js +8 -0
- package/package.json +1 -1
- package/types.d.ts +256 -11
- package/types.untrimmed.d.ts +273 -11
package/types.untrimmed.d.ts
CHANGED
|
@@ -290,8 +290,10 @@ export declare interface AntomOpenModalConfig extends OpenModalParams {
|
|
|
290
290
|
export declare class AntomSDK extends BaseElementsFactory {
|
|
291
291
|
static version: string;
|
|
292
292
|
private stopModalMessageMonitor;
|
|
293
|
+
private readonly apiTracker;
|
|
293
294
|
constructor(config?: AntomSDKConfig);
|
|
294
295
|
protected canUseElements(): Array<ElementListItemType>;
|
|
296
|
+
init(): Promise<this>;
|
|
295
297
|
/**
|
|
296
298
|
* @description 更新配置
|
|
297
299
|
*/
|
|
@@ -315,17 +317,34 @@ export declare class AntomSDK extends BaseElementsFactory {
|
|
|
315
317
|
createElement(elementType: 'vaulting', options?: VaultingAppConfig): VaultingElement;
|
|
316
318
|
createElement(elementType: 'CVV', options: CVVAppConfig): CVVElement;
|
|
317
319
|
createElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
|
|
320
|
+
createElement(elementType: 'expressVaulting', options?: ExpressVaultingAppConfig): ExpressVaultingElement;
|
|
318
321
|
getElement(elementType: 'payment', options?: PaymentAppConfig): PaymentElement;
|
|
319
322
|
getElement(elementType: 'vaulting', options?: VaultingAppConfig): VaultingElement;
|
|
320
323
|
getElement(elementType: 'CVV', options?: CVVAppConfig): CVVElement;
|
|
321
324
|
getElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
|
|
325
|
+
getElement(elementType: 'expressVaulting', options?: ExpressVaultingAppConfig): ExpressVaultingElement;
|
|
322
326
|
/**
|
|
323
327
|
* 从 elements 容器或直接传入的 MainElement 中提取指定类型的主元素
|
|
324
328
|
* @throws {AntomSDKError} 当无法找到有效的主元素时抛出错误
|
|
325
329
|
*/
|
|
326
330
|
private extractMainElement;
|
|
327
331
|
confirmCardSetup(options: ConfirmCardSetupOptions): Promise<SubmitResult>;
|
|
332
|
+
private runConfirmCardSetup;
|
|
328
333
|
confirmPayment(options: ConfirmPaymentOptions): Promise<SubmitResult>;
|
|
334
|
+
private runConfirmPayment;
|
|
335
|
+
/**
|
|
336
|
+
* 触发 Express Vaulting element 的 PayPal 绑卡提交流程。
|
|
337
|
+
*
|
|
338
|
+
* iframe 收到 OPENSDK@CONFIRM_VAULTING 后执行 submitPay + 单次 inquiry 兜底,
|
|
339
|
+
* 完成后通过 OPENSDK@CONFIRM_VAULTING_RESULT 回包,Promise resolve。
|
|
340
|
+
*
|
|
341
|
+
* @param options.elements 已挂载的 ExpressVaultingElement 或包含它的 Elements 实例
|
|
342
|
+
* @param options.redirect 跳转策略,默认 'always',透传给 iframe
|
|
343
|
+
*/
|
|
344
|
+
confirmVaulting(options: {
|
|
345
|
+
elements: BaseMainElement | BaseElements;
|
|
346
|
+
redirect?: 'always' | 'if_required';
|
|
347
|
+
}): Promise<ExpressVaultingResult>;
|
|
329
348
|
}
|
|
330
349
|
|
|
331
350
|
/**
|
|
@@ -2747,6 +2766,9 @@ export declare type CVVAppearanceProps = {
|
|
|
2747
2766
|
export declare class CVVElement extends BaseMainElement<CVVElementConfig, CVVElementEvents> {
|
|
2748
2767
|
static elementType: string;
|
|
2749
2768
|
private readonly sessionData;
|
|
2769
|
+
private readonly elementTracker;
|
|
2770
|
+
private _mountInProgress;
|
|
2771
|
+
private _destroyInProgress;
|
|
2750
2772
|
constructor(name: string, config: CVVElementConfig);
|
|
2751
2773
|
/**
|
|
2752
2774
|
* @internal
|
|
@@ -2763,6 +2785,10 @@ export declare class CVVElement extends BaseMainElement<CVVElementConfig, CVVEle
|
|
|
2763
2785
|
* @internal
|
|
2764
2786
|
*/
|
|
2765
2787
|
submit(data?: CVVSubmitParams): Promise<SubmitResult>;
|
|
2788
|
+
mount(container: HTMLElement): Promise<void>;
|
|
2789
|
+
on<T extends keyof CVVElementEvents>(event: T, handler: (payload: CVVElementEvents[T]) => void): void;
|
|
2790
|
+
unmount(): void;
|
|
2791
|
+
destroy(): void;
|
|
2766
2792
|
protected focus(): void;
|
|
2767
2793
|
protected blur(): void;
|
|
2768
2794
|
protected clear(): void;
|
|
@@ -3503,8 +3529,12 @@ declare interface ElementPluginChangeStates {
|
|
|
3503
3529
|
declare type ElementPluginNameEnum = 'SET_STATE' | 'PASSIVE_SET_STATE';
|
|
3504
3530
|
|
|
3505
3531
|
declare class Elements extends BaseElements {
|
|
3532
|
+
private readonly apiTracker;
|
|
3506
3533
|
protected canUseElements(): Array<ElementListItemType>;
|
|
3507
3534
|
constructor(config: BaseElementsConfig);
|
|
3535
|
+
init(): Promise<this>;
|
|
3536
|
+
updateConfig(config: Partial<BaseElementsConfig>): void;
|
|
3537
|
+
destroy(): void;
|
|
3508
3538
|
createElement(elementType: 'vaulting', options?: VaultingAppConfig): VaultingElement;
|
|
3509
3539
|
createElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
|
|
3510
3540
|
getElement(elementType: 'vaulting', options?: VaultingAppConfig): VaultingElement;
|
|
@@ -3722,6 +3752,17 @@ export declare interface ExpressClickEvent {
|
|
|
3722
3752
|
expressPaymentType: string;
|
|
3723
3753
|
}
|
|
3724
3754
|
|
|
3755
|
+
declare type ExpressCompletePaymentResult = {
|
|
3756
|
+
success: boolean;
|
|
3757
|
+
result?: any;
|
|
3758
|
+
error?: {
|
|
3759
|
+
code: string;
|
|
3760
|
+
message: string;
|
|
3761
|
+
};
|
|
3762
|
+
userCanceled3D?: boolean;
|
|
3763
|
+
status?: 'SUCCESS' | 'CANCELLED' | 'FAIL' | 'PROCESSING';
|
|
3764
|
+
};
|
|
3765
|
+
|
|
3725
3766
|
/** confirm 事件负载(统一终态,替代 approve) */
|
|
3726
3767
|
export declare interface ExpressConfirmData {
|
|
3727
3768
|
expressPaymentType: string;
|
|
@@ -3768,6 +3809,10 @@ export declare interface ExpressConfirmData {
|
|
|
3768
3809
|
*/
|
|
3769
3810
|
export declare class ExpressElement extends BaseMainElement<ExpressElementConfig, ExpressElementEvents> {
|
|
3770
3811
|
static elementType: string;
|
|
3812
|
+
private readonly elementTracker;
|
|
3813
|
+
private _mountInProgress;
|
|
3814
|
+
private _destroyInProgress;
|
|
3815
|
+
private _registeringInternalListeners;
|
|
3771
3816
|
/**
|
|
3772
3817
|
* Store all function-type callbacks locally, not involved in postMessage serialization
|
|
3773
3818
|
*/
|
|
@@ -3786,6 +3831,12 @@ export declare class ExpressElement extends BaseMainElement<ExpressElementConfig
|
|
|
3786
3831
|
private _localHandlers;
|
|
3787
3832
|
/** 支付流程进行中标志(click → confirm/error/cancel 之间) */
|
|
3788
3833
|
private _paymentInProgress;
|
|
3834
|
+
/**
|
|
3835
|
+
* confirm 窗口超时标志:iframe 在 20s onTimeout 发 error(MERCHANT_CONFIRM_TIMEOUT) 时置位,
|
|
3836
|
+
* completePayment 入口据此立即返失败(不发 COMPLETE_PAYMENT,不进 5min 兜底)。
|
|
3837
|
+
* 每新一轮 confirm 事件到达时复位(见 on() 重写)。
|
|
3838
|
+
*/
|
|
3839
|
+
private _confirmWindowTimedOut;
|
|
3789
3840
|
/**
|
|
3790
3841
|
* 是否已收到 iframe 业务层 ready 事件(app.tsx sendReady)。
|
|
3791
3842
|
* 注意:与 host `status='ready'`(由 HANDSHAKE_ACK 触发,bridge.js:450 同步回发,与 amount 解析无关)不同。
|
|
@@ -3808,6 +3859,7 @@ export declare class ExpressElement extends BaseMainElement<ExpressElementConfig
|
|
|
3808
3859
|
*/
|
|
3809
3860
|
private _emit;
|
|
3810
3861
|
updateConfig(newConfig: ExpressAppConfig): Promise<ExpressElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
|
|
3862
|
+
private runUpdateConfig;
|
|
3811
3863
|
private updateConfigTransaction;
|
|
3812
3864
|
private updateAmountConfigWithSanitizedDebug;
|
|
3813
3865
|
private getAmountValidationReason;
|
|
@@ -3823,19 +3875,13 @@ export declare class ExpressElement extends BaseMainElement<ExpressElementConfig
|
|
|
3823
3875
|
* iframe 收到 OPENSDK@COMPLETE_PAYMENT 后执行 submitPay / polling 等,
|
|
3824
3876
|
* 完成后通过 OPENSDK@COMPLETE_PAYMENT_RESULT 回包,Promise resolve。
|
|
3825
3877
|
*/
|
|
3826
|
-
completePayment(redirect?: 'always' | 'if_required'): Promise<
|
|
3827
|
-
|
|
3828
|
-
result?: any;
|
|
3829
|
-
error?: {
|
|
3830
|
-
code: string;
|
|
3831
|
-
message: string;
|
|
3832
|
-
};
|
|
3833
|
-
/** 用户是否手动关闭 3D 弹窗(透传 webapp COMPLETE_PAYMENT_RESULT.userCanceled3D) */
|
|
3834
|
-
userCanceled3D?: boolean;
|
|
3835
|
-
status?: 'SUCCESS' | 'CANCELLED' | 'FAIL' | 'PROCESSING';
|
|
3836
|
-
}>;
|
|
3878
|
+
completePayment(redirect?: 'always' | 'if_required'): Promise<ExpressCompletePaymentResult>;
|
|
3879
|
+
private runCompletePayment;
|
|
3837
3880
|
setup(): Promise<Partial<ExpressAppConfig> | undefined>;
|
|
3838
3881
|
private registerInternalListeners;
|
|
3882
|
+
mount(container: HTMLElement): Promise<void>;
|
|
3883
|
+
unmount(): void;
|
|
3884
|
+
destroy(): void;
|
|
3839
3885
|
protected focus(): void;
|
|
3840
3886
|
protected blur(): void;
|
|
3841
3887
|
protected clear(): void;
|
|
@@ -3944,6 +3990,201 @@ declare type ExpressSetupError = ErrorPayload & {
|
|
|
3944
3990
|
mulityLanguageMapping?: boolean;
|
|
3945
3991
|
};
|
|
3946
3992
|
|
|
3993
|
+
/**
|
|
3994
|
+
* @public
|
|
3995
|
+
* @description Express Vaulting element app config type
|
|
3996
|
+
*/
|
|
3997
|
+
export declare interface ExpressVaultingAppConfig extends BaseElementAppConfig {
|
|
3998
|
+
/**
|
|
3999
|
+
* @description payment sessionData,无法通过 updateConfig 更新
|
|
4000
|
+
*/
|
|
4001
|
+
sessionData?: string;
|
|
4002
|
+
/**
|
|
4003
|
+
* @description 开通的支付方式列表,本期固定为 ['PAYPAL_DIRECTDEBIT']
|
|
4004
|
+
*/
|
|
4005
|
+
paymentMethods?: string[];
|
|
4006
|
+
/** PayPal 按钮配置 */
|
|
4007
|
+
paypal?: ExpressVaultingPayPalConfig;
|
|
4008
|
+
/** PayPal 按钮文案类型 */
|
|
4009
|
+
buttonType?: {
|
|
4010
|
+
paypal?: 'paypal' | 'checkout' | 'buynow' | 'pay';
|
|
4011
|
+
};
|
|
4012
|
+
/** 按钮统一高度(px) */
|
|
4013
|
+
buttonHeight?: number;
|
|
4014
|
+
/** PayPal 按钮主题色 */
|
|
4015
|
+
buttonTheme?: {
|
|
4016
|
+
paypal?: 'gold' | 'blue' | 'silver' | 'white' | 'black';
|
|
4017
|
+
};
|
|
4018
|
+
}
|
|
4019
|
+
|
|
4020
|
+
/**
|
|
4021
|
+
* @public
|
|
4022
|
+
* @description cancel 事件负载
|
|
4023
|
+
*/
|
|
4024
|
+
export declare interface ExpressVaultingCancelEvent {
|
|
4025
|
+
paymentMethodType: ExpressVaultingMethod;
|
|
4026
|
+
data?: unknown;
|
|
4027
|
+
}
|
|
4028
|
+
|
|
4029
|
+
/**
|
|
4030
|
+
* @public
|
|
4031
|
+
* @description click 事件负载
|
|
4032
|
+
*/
|
|
4033
|
+
export declare interface ExpressVaultingClickEvent {
|
|
4034
|
+
paymentMethodType: ExpressVaultingMethod;
|
|
4035
|
+
}
|
|
4036
|
+
|
|
4037
|
+
/**
|
|
4038
|
+
* @public
|
|
4039
|
+
* @description confirm 事件负载(PayPal onApprove 成功后触发,商户可在回调中调 confirmVaulting)
|
|
4040
|
+
*/
|
|
4041
|
+
export declare interface ExpressVaultingConfirmEvent {
|
|
4042
|
+
paymentMethodType: ExpressVaultingMethod;
|
|
4043
|
+
payerInfo?: ExpressVaultingPayerInfo;
|
|
4044
|
+
}
|
|
4045
|
+
|
|
4046
|
+
/**
|
|
4047
|
+
* @public
|
|
4048
|
+
* @description Express Vaulting element - PayPal 绑卡 Element
|
|
4049
|
+
*
|
|
4050
|
+
* Host 侧只保留 Element 生命周期与 bridge 连接;PayPal 按钮渲染、Braintree SDK
|
|
4051
|
+
* 加载、submit/inquiry 都由 express_vaulting webapp 承接。
|
|
4052
|
+
*
|
|
4053
|
+
* setup 阶段调 sdkActionQuery 拿 paypalClientToken,握手时下发给 iframe(系分
|
|
4054
|
+
* 4.1 节 BR-007:client token 必须来自握手,iframe 不自调 sdkActionQuery)。
|
|
4055
|
+
*/
|
|
4056
|
+
export declare class ExpressVaultingElement extends BaseMainElement<ExpressVaultingElementConfig, ExpressVaultingElementEvents> {
|
|
4057
|
+
static elementType: string;
|
|
4058
|
+
/**
|
|
4059
|
+
* Host-side fullscreen overlay shown while the PayPal popup is open.
|
|
4060
|
+
*
|
|
4061
|
+
* PayPal Braintree vault flow renders its own popup + backdrop inside the
|
|
4062
|
+
* iframe body, so without a host overlay the backdrop only masks the tiny
|
|
4063
|
+
* button area. Mirrors ExpressElement: show on `click`, hide on
|
|
4064
|
+
* `confirm` / `cancel` / `error`.
|
|
4065
|
+
*/
|
|
4066
|
+
private _paypalOverlay;
|
|
4067
|
+
constructor(name: string, config: ExpressVaultingElementConfig);
|
|
4068
|
+
/**
|
|
4069
|
+
* @internal
|
|
4070
|
+
* 握手前调 sdkActionQuery 拿 paypalClientToken,连同按钮样式一起打包下发给 iframe。
|
|
4071
|
+
* 失败时以 setupError 形式返回,iframe 侧读取后透传 error 事件。
|
|
4072
|
+
*/
|
|
4073
|
+
setup(): Promise<Partial<ExpressVaultingAppConfig> | undefined>;
|
|
4074
|
+
/**
|
|
4075
|
+
* @internal
|
|
4076
|
+
* Host-side bridge listeners. Only the PayPal overlay lifecycle here —
|
|
4077
|
+
* show when the PayPal popup opens (click), hide when it closes
|
|
4078
|
+
* (confirm / cancel / error). Mirrors ExpressElement's overlay handling.
|
|
4079
|
+
*/
|
|
4080
|
+
private registerInternalListeners;
|
|
4081
|
+
protected focus(): void;
|
|
4082
|
+
protected blur(): void;
|
|
4083
|
+
protected clear(): void;
|
|
4084
|
+
/**
|
|
4085
|
+
* @internal
|
|
4086
|
+
* 由 SDK 容器(antom.ts.confirmVaulting)调用,向 iframe 发送 CONFIRM_VAULTING
|
|
4087
|
+
* 指令并等待 CONFIRM_VAULTING_RESULT 回包。iframe 侧执行 submitPay + 单次 inquiry
|
|
4088
|
+
* 兜底后回包终态结果。
|
|
4089
|
+
*/
|
|
4090
|
+
_confirmVaulting(redirect?: 'always' | 'if_required'): Promise<ExpressVaultingResult>;
|
|
4091
|
+
}
|
|
4092
|
+
|
|
4093
|
+
/**
|
|
4094
|
+
* @public
|
|
4095
|
+
* @description Express Vaulting element config type
|
|
4096
|
+
*/
|
|
4097
|
+
export declare interface ExpressVaultingElementConfig extends BaseElementConfig<ExpressVaultingAppConfig> {
|
|
4098
|
+
}
|
|
4099
|
+
|
|
4100
|
+
/**
|
|
4101
|
+
* @public
|
|
4102
|
+
* @description Express Vaulting element 事件类型
|
|
4103
|
+
*/
|
|
4104
|
+
export declare interface ExpressVaultingElementEvents extends AntomBridgeWithNativeEventMap<ExpressVaultingAppConfig> {
|
|
4105
|
+
ready: ExpressVaultingReadyEvent;
|
|
4106
|
+
click: ExpressVaultingClickEvent;
|
|
4107
|
+
confirm: ExpressVaultingConfirmEvent;
|
|
4108
|
+
cancel: ExpressVaultingCancelEvent;
|
|
4109
|
+
error: ExpressVaultingErrorEvent;
|
|
4110
|
+
'OPENSDK@CONFIRM_VAULTING': {
|
|
4111
|
+
requestId: string;
|
|
4112
|
+
redirect?: 'always' | 'if_required';
|
|
4113
|
+
};
|
|
4114
|
+
'OPENSDK@CONFIRM_VAULTING_RESULT': {
|
|
4115
|
+
requestId: string;
|
|
4116
|
+
result: ExpressVaultingResult;
|
|
4117
|
+
};
|
|
4118
|
+
}
|
|
4119
|
+
|
|
4120
|
+
/**
|
|
4121
|
+
* @public
|
|
4122
|
+
* @description error 事件负载
|
|
4123
|
+
*/
|
|
4124
|
+
export declare interface ExpressVaultingErrorEvent extends ErrorPayload<string> {
|
|
4125
|
+
paymentMethodType: ExpressVaultingMethod;
|
|
4126
|
+
}
|
|
4127
|
+
|
|
4128
|
+
/**
|
|
4129
|
+
* Supported express vaulting payment methods. All bridge event payloads carry
|
|
4130
|
+
* `paymentMethodType` — use this enum instead of硬编码 strings so adding a
|
|
4131
|
+
* new wallet only needs one entry here. Must match the iframe-side enum in
|
|
4132
|
+
* elements2/express_vaulting/interface.ts.
|
|
4133
|
+
*/
|
|
4134
|
+
declare enum ExpressVaultingMethod {
|
|
4135
|
+
PAYPAL_DIRECTDEBIT = "PAYPAL_DIRECTDEBIT"
|
|
4136
|
+
}
|
|
4137
|
+
|
|
4138
|
+
/**
|
|
4139
|
+
* @public
|
|
4140
|
+
* @description Braintree tokenizePayment 返回的 payer 信息,随 confirm 事件透传给商户
|
|
4141
|
+
*/
|
|
4142
|
+
export declare interface ExpressVaultingPayerInfo {
|
|
4143
|
+
payerId?: string;
|
|
4144
|
+
email?: string;
|
|
4145
|
+
firstName?: string;
|
|
4146
|
+
lastName?: string;
|
|
4147
|
+
countryCode?: string;
|
|
4148
|
+
phone?: string;
|
|
4149
|
+
}
|
|
4150
|
+
|
|
4151
|
+
/**
|
|
4152
|
+
* MERCHANT_CONFIRM_TIMEOUT is owned by the iframe side (mirrors express_element:
|
|
4153
|
+
* iframe starts a 20s timer on the `confirm` event and sends
|
|
4154
|
+
* `error(MERCHANT_CONFIRM_TIMEOUT)` if the merchant never calls confirmVaulting).
|
|
4155
|
+
* See elements2/express_vaulting/app.tsx + tools/error.ts.
|
|
4156
|
+
*/
|
|
4157
|
+
/**
|
|
4158
|
+
* @public
|
|
4159
|
+
* @description PayPal 按钮配置
|
|
4160
|
+
*/
|
|
4161
|
+
export declare interface ExpressVaultingPayPalConfig {
|
|
4162
|
+
/** 按钮形状 */
|
|
4163
|
+
buttonShape?: 'pill' | 'rect' | 'sharp';
|
|
4164
|
+
}
|
|
4165
|
+
|
|
4166
|
+
/**
|
|
4167
|
+
* @public
|
|
4168
|
+
* @description ready 事件负载
|
|
4169
|
+
*/
|
|
4170
|
+
export declare interface ExpressVaultingReadyEvent {
|
|
4171
|
+
availablePaymentMethods: Partial<Record<ExpressVaultingMethod, boolean>>;
|
|
4172
|
+
}
|
|
4173
|
+
|
|
4174
|
+
/**
|
|
4175
|
+
* @public
|
|
4176
|
+
* @description confirmVaulting 返回结果
|
|
4177
|
+
*/
|
|
4178
|
+
export declare interface ExpressVaultingResult {
|
|
4179
|
+
status: 'SUCCESS' | 'PROCESSING' | 'FAIL' | 'CANCELLED';
|
|
4180
|
+
paymentMethodId?: string;
|
|
4181
|
+
payerId?: string;
|
|
4182
|
+
error?: {
|
|
4183
|
+
code: string;
|
|
4184
|
+
message: string;
|
|
4185
|
+
};
|
|
4186
|
+
}
|
|
4187
|
+
|
|
3947
4188
|
declare interface ExpSupportBank {
|
|
3948
4189
|
/**
|
|
3949
4190
|
* @description 银行名称
|
|
@@ -7648,12 +7889,18 @@ export declare type PaymentAppearanceProps = {
|
|
|
7648
7889
|
export declare class PaymentElement extends BaseMainElement<PaymentElementConfig, PaymentElementEvents> {
|
|
7649
7890
|
static elementType: string;
|
|
7650
7891
|
private _paymentInProgress;
|
|
7892
|
+
private readonly paymentTracker;
|
|
7893
|
+
private _mountStartedAt;
|
|
7894
|
+
private _mountInProgress;
|
|
7895
|
+
private _mountPhase;
|
|
7896
|
+
private _destroyInProgress;
|
|
7651
7897
|
private readonly walletLogger;
|
|
7652
7898
|
constructor(name: string, config: PaymentElementConfig);
|
|
7653
7899
|
/**
|
|
7654
7900
|
* @internal
|
|
7655
7901
|
*/
|
|
7656
7902
|
setup(): Promise<Partial<PaymentAppConfig> | undefined>;
|
|
7903
|
+
mount(container: HTMLElement): Promise<void>;
|
|
7657
7904
|
/**
|
|
7658
7905
|
* @description Update payment element configuration with amount validation and appearance Rules support
|
|
7659
7906
|
*/
|
|
@@ -7662,6 +7909,9 @@ export declare class PaymentElement extends BaseMainElement<PaymentElementConfig
|
|
|
7662
7909
|
* @internal
|
|
7663
7910
|
*/
|
|
7664
7911
|
submit(data?: PaymentSubmitParams): Promise<PaymentSubmitResult>;
|
|
7912
|
+
on<T extends keyof PaymentElementEvents>(event: T, handler: (payload: PaymentElementEvents[T]) => void): void;
|
|
7913
|
+
unmount(): void;
|
|
7914
|
+
destroy(): void;
|
|
7665
7915
|
protected focus(): void;
|
|
7666
7916
|
protected blur(): void;
|
|
7667
7917
|
protected clear(): void;
|
|
@@ -7691,6 +7941,11 @@ export declare interface PaymentElementEvents extends AntomBridgeWithNativeEvent
|
|
|
7691
7941
|
'OPENSDK@GET_GOOGLE_PAY_TOKEN': GetGooglePayTokenRequest;
|
|
7692
7942
|
/** host 完成 Google Pay token 获取后回包给 webapp */
|
|
7693
7943
|
'OPENSDK@GET_GOOGLE_PAY_TOKEN_REPLY': GetGooglePayTokenReply;
|
|
7944
|
+
/** WebApp notifies the host when the selected payment method changes. */
|
|
7945
|
+
paymentMethodChanged: {
|
|
7946
|
+
type: string;
|
|
7947
|
+
name?: string;
|
|
7948
|
+
};
|
|
7694
7949
|
}
|
|
7695
7950
|
|
|
7696
7951
|
declare interface PaymentElementView {
|
|
@@ -25162,6 +25417,9 @@ export declare type VaultingAppearanceProps = {
|
|
|
25162
25417
|
*/
|
|
25163
25418
|
export declare class VaultingElement extends BaseMainElement<VaultingElementConfig, VaultingElementEvents> {
|
|
25164
25419
|
static elementType: string;
|
|
25420
|
+
private readonly elementTracker;
|
|
25421
|
+
private _mountInProgress;
|
|
25422
|
+
private _destroyInProgress;
|
|
25165
25423
|
constructor(name: string, config: VaultingElementConfig);
|
|
25166
25424
|
/**
|
|
25167
25425
|
* @internal
|
|
@@ -25177,6 +25435,10 @@ export declare class VaultingElement extends BaseMainElement<VaultingElementConf
|
|
|
25177
25435
|
* @internal
|
|
25178
25436
|
*/
|
|
25179
25437
|
submit(data?: VaultingSubmitParams): Promise<SubmitResult>;
|
|
25438
|
+
mount(container: HTMLElement): Promise<void>;
|
|
25439
|
+
on<T extends keyof VaultingElementEvents>(event: T, handler: (payload: VaultingElementEvents[T]) => void): void;
|
|
25440
|
+
unmount(): void;
|
|
25441
|
+
destroy(): void;
|
|
25180
25442
|
protected focus(): void;
|
|
25181
25443
|
protected blur(): void;
|
|
25182
25444
|
protected clear(): void;
|