@alipay/ams-checkout 0.0.1788166152-dev.6 → 0.0.1788166152-dev.7
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/dist/ams-checkout.min.js.map +1 -1
- package/esm/config/index.js +1 -1
- package/esm/core/component/element/modernElementController/index.d.ts +1 -1
- package/esm/core/component/element/modernElementController/index.js +9 -9
- package/esm/modern/{modern/index.d.ts → index.d.ts} +1 -1
- package/esm/modern/index.js +1 -1
- package/esm/modern/tools.js +1 -1
- package/esm/util/logger.js +1 -1
- package/package.json +1 -2
- package/types.d.ts +2 -17
- package/types.untrimmed.d.ts +2 -35
- package/esm/modern/component/channel.d.ts +0 -21
- package/esm/modern/component/component.inline.style.d.ts +0 -10
- package/esm/modern/component/component.popup.style.d.ts +0 -26
- package/esm/modern/component/popupWindow.style.d.ts +0 -27
- package/esm/modern/config/index.d.ts +0 -23
- package/esm/modern/config/request.d.ts +0 -21
- package/esm/modern/constant/auto-debit.d.ts +0 -12
- package/esm/modern/constant/easysafepay.d.ts +0 -16
- package/esm/modern/constant/element.d.ts +0 -27
- package/esm/modern/constant/index.d.ts +0 -331
- package/esm/modern/core/bus/ability/callback.d.ts +0 -9
- package/esm/modern/core/bus/ability/security.d.ts +0 -10
- package/esm/modern/core/bus/ability/tracker.d.ts +0 -9
- package/esm/modern/core/bus/index.d.ts +0 -125
- package/esm/modern/core/bus/interface.d.ts +0 -36
- package/esm/modern/core/component/address.d.ts +0 -8
- package/esm/modern/core/component/appPreloadProcessing.d.ts +0 -1
- package/esm/modern/core/component/ckp/index.d.ts +0 -29
- package/esm/modern/core/component/element/EventCenter/index.d.ts +0 -41
- package/esm/modern/core/component/element/config.d.ts +0 -10
- package/esm/modern/core/component/element/elementContainerService/containerService.d.ts +0 -34
- package/esm/modern/core/component/element/elementContainerService/index.d.ts +0 -20
- package/esm/modern/core/component/element/elementController/index.d.ts +0 -54
- package/esm/modern/core/component/element/elementProcessor/addressProcessor.d.ts +0 -20
- package/esm/modern/core/component/element/elementProcessor/authProcessor.d.ts +0 -20
- package/esm/modern/core/component/element/elementProcessor/baseElementProcessor.d.ts +0 -42
- package/esm/modern/core/component/element/elementProcessor/convertPaymentMethods.d.ts +0 -22
- package/esm/modern/core/component/element/elementProcessor/paymentProcessor.d.ts +0 -37
- package/esm/modern/core/component/element/index.d.ts +0 -17
- package/esm/modern/core/component/element/mock.d.ts +0 -10
- package/esm/modern/core/component/element/modernElementController/adapter.d.ts +0 -19
- package/esm/modern/core/component/element/modernElementController/index.d.ts +0 -172
- package/esm/modern/core/component/element/type.d.ts +0 -586
- package/esm/modern/core/component/element/util.d.ts +0 -93
- package/esm/modern/core/component/index.d.ts +0 -58
- package/esm/modern/core/instance/index.d.ts +0 -97
- package/esm/modern/core/utils/connectConfig.d.ts +0 -11
- package/esm/modern/foundation/core/index.d.ts +0 -36
- package/esm/modern/foundation/index.d.ts +0 -93
- package/esm/modern/foundation/product-processor/autoDebit/deps.d.ts +0 -14
- package/esm/modern/foundation/product-processor/autoDebit/index.d.ts +0 -48
- package/esm/modern/foundation/product-processor/easysafepay/deps.d.ts +0 -20
- package/esm/modern/foundation/product-processor/easysafepay/index.d.ts +0 -29
- package/esm/modern/foundation/product-processor/element/index.d.ts +0 -7
- package/esm/modern/foundation/service/api-bus/ability/globalData.d.ts +0 -10
- package/esm/modern/foundation/service/api-bus/ability/request.d.ts +0 -10
- package/esm/modern/foundation/service/api-bus/ability/security.d.ts +0 -12
- package/esm/modern/foundation/service/api-bus/ability/tracker.d.ts +0 -9
- package/esm/modern/foundation/service/api-bus/busManager.d.ts +0 -127
- package/esm/modern/foundation/service/api-bus/index.d.ts +0 -20
- package/esm/modern/foundation/service/api-bus/interface.d.ts +0 -48
- package/esm/modern/foundation/service/container/index.d.ts +0 -42
- package/esm/modern/foundation/service/container/popup.d.ts +0 -31
- package/esm/modern/foundation/service/container/utils.d.ts +0 -7
- package/esm/modern/foundation/service/event-center.d.ts +0 -82
- package/esm/modern/foundation/service/global-data/index.d.ts +0 -11
- package/esm/modern/foundation/service/index.d.ts +0 -19
- package/esm/modern/foundation/service/log/index.d.ts +0 -44
- package/esm/modern/foundation/service/log/keys.d.ts +0 -13
- package/esm/modern/foundation/service/log/processor.d.ts +0 -9
- package/esm/modern/foundation/service/log/types.d.ts +0 -33
- package/esm/modern/foundation/service/requester/deps.d.ts +0 -17
- package/esm/modern/foundation/service/requester/requester.d.ts +0 -22
- package/esm/modern/foundation/service/security/index.d.ts +0 -33
- package/esm/modern/foundation/service/security/security.d.ts +0 -54
- package/esm/modern/foundation/utils/gray_scale_utils.d.ts +0 -7
- package/esm/modern/foundation/utils/payment_context_utils.d.ts +0 -13
- package/esm/modern/foundation/utils/payment_product_utils.d.ts +0 -13
- package/esm/modern/foundation/utils/preload_helper.d.ts +0 -24
- package/esm/modern/foundation/utils/redirect_utils.d.ts +0 -11
- package/esm/modern/foundation/utils/system_events.d.ts +0 -4
- package/esm/modern/foundation/utils/web_app_url_utils.d.ts +0 -114
- package/esm/modern/loader/constant.d.ts +0 -36
- package/esm/modern/loader/utils/proxyPerformance.d.ts +0 -20
- package/esm/modern/main.d.ts +0 -54
- package/esm/modern/modern/loadAntomTracker.d.ts +0 -7
- package/esm/modern/modern/preload/antomManifestAdapter.d.ts +0 -11
- package/esm/modern/modern/preload/config.d.ts +0 -10
- package/esm/modern/modern/preload/gatewayPreconnection.d.ts +0 -53
- package/esm/modern/modern/preload/preloadAntomElements.d.ts +0 -9
- package/esm/modern/modern/preload/startAntomPreload.d.ts +0 -2
- package/esm/modern/modern/sdk/applepay-core/ApplePayHostService.d.ts +0 -102
- package/esm/modern/modern/sdk/elements/CVVElement.d.ts +0 -144
- package/esm/modern/modern/sdk/elements/PaymentElement.d.ts +0 -204
- package/esm/modern/modern/sdk/elements/appearanceRules.d.ts +0 -59
- package/esm/modern/modern/sdk/elements/appearanceRulesDefaults.d.ts +0 -2
- package/esm/modern/modern/sdk/eventsMap.d.ts +0 -135
- package/esm/modern/modern/sdk/oneapi/iexpfront/PaymentSessionService.d.ts +0 -69
- package/esm/modern/modern/sdk/oneapi/iexpfront/definitions.d.ts +0 -5311
- package/esm/modern/modern/sdk/oneapi/iexpfront/preConnection.d.ts +0 -6
- package/esm/modern/modern/sdk/stageName.d.ts +0 -3
- package/esm/modern/modern/sdk/tools/awaitWrap.d.ts +0 -14
- package/esm/modern/modern/sdk/tools/buildPageUrl.d.ts +0 -4
- package/esm/modern/modern/sdk/tools/checkSessionData.d.ts +0 -1
- package/esm/modern/modern/sdk/tools/expressElement/applePay.d.ts +0 -9
- package/esm/modern/modern/sdk/tools/expressElement/applePayHostToken.d.ts +0 -32
- package/esm/modern/modern/sdk/tools/expressElement/types.d.ts +0 -277
- package/esm/modern/modern/sdk/tools/getDevReqConfig.d.ts +0 -2
- package/esm/modern/modern/sdk/tools/getLocaleFromRenderData.d.ts +0 -6
- package/esm/modern/modern/sdk/tools/getMetaData.d.ts +0 -126
- package/esm/modern/modern/sdk/tools/modalMessageMonitor.d.ts +0 -41
- package/esm/modern/modern/sdk/tools/openModal.d.ts +0 -20
- package/esm/modern/modern/sdk/tools/paymentElement/applePayHostToken.d.ts +0 -38
- package/esm/modern/modern/sdk/tools/paymentElement/googlePayHostToken.d.ts +0 -38
- package/esm/modern/modern/sdk/tools/paymentElement/tracker.d.ts +0 -16
- package/esm/modern/modern/sdk/tools/paymentElement/walletHostListeners.d.ts +0 -19
- package/esm/modern/modern/sdk/tools/preloadTracking.d.ts +0 -5
- package/esm/modern/modern/sdk/tools/showToast.d.ts +0 -33
- package/esm/modern/modern/sdk/tools/validatePaymentAmount.d.ts +0 -19
- package/esm/modern/modern/sdk/tracking/elementTracker.d.ts +0 -65
- package/esm/modern/modern/sdk/types.d.ts +0 -310
- package/esm/modern/modern/tools.d.ts +0 -26
- package/esm/modern/plugin/applepay/component.d.ts +0 -50
- package/esm/modern/plugin/applepay/index.d.ts +0 -17
- package/esm/modern/plugin/applepay/interface.d.ts +0 -161
- package/esm/modern/plugin/applepay/service.d.ts +0 -54
- package/esm/modern/plugin/component/cashierApp.d.ts +0 -38
- package/esm/modern/plugin/component/channel.d.ts +0 -73
- package/esm/modern/plugin/component/component.inline.style.d.ts +0 -10
- package/esm/modern/plugin/component/component.popup.style.d.ts +0 -25
- package/esm/modern/plugin/component/index.d.ts +0 -133
- package/esm/modern/plugin/component/popupWindow.style.d.ts +0 -11
- package/esm/modern/plugin/const.d.ts +0 -2
- package/esm/modern/plugin/payment-element/utils.d.ts +0 -2
- package/esm/modern/plugin/paypal/index.d.ts +0 -20
- package/esm/modern/plugin/type.d.ts +0 -34
- package/esm/modern/plugin/utils.d.ts +0 -6
- package/esm/modern/preload/antomManifestAdapter.d.ts +0 -11
- package/esm/modern/preload/antomManifestAdapter.js +0 -117
- package/esm/modern/preload/config.d.ts +0 -10
- package/esm/modern/preload/config.js +0 -37
- package/esm/modern/preload/gatewayPreconnection.d.ts +0 -53
- package/esm/modern/preload/gatewayPreconnection.js +0 -213
- package/esm/modern/preload/preloadAntomElements.d.ts +0 -9
- package/esm/modern/preload/preloadAntomElements.js +0 -95
- package/esm/modern/preload/startAntomPreload.d.ts +0 -2
- package/esm/modern/preload/startAntomPreload.js +0 -9
- package/esm/modern/request/index.d.ts +0 -9
- package/esm/modern/request/utils.d.ts +0 -28
- package/esm/modern/service/index.d.ts +0 -13
- package/esm/modern/types/index.d.ts +0 -856
- package/esm/modern/util/beforeConfirm.d.ts +0 -14
- package/esm/modern/util/createIframeNode.d.ts +0 -6
- package/esm/modern/util/debug.d.ts +0 -1
- package/esm/modern/util/get.d.ts +0 -25
- package/esm/modern/util/getBackScheme.d.ts +0 -5
- package/esm/modern/util/index.d.ts +0 -61
- package/esm/modern/util/jshield-apdid/apdid-loader.d.ts +0 -89
- package/esm/modern/util/jshield-apdid/index.d.ts +0 -21
- package/esm/modern/util/logger.d.ts +0 -67
- package/esm/modern/util/mock.d.ts +0 -1
- package/esm/modern/util/redirect.d.ts +0 -6
- package/esm/modern/util/security-registry.d.ts +0 -72
- package/esm/modern/util/security.d.ts +0 -55
- package/esm/modern/util/spm-map.d.ts +0 -217
- package/esm/modern/util/storage.d.ts +0 -2
- package/esm/modern/util/timezone.d.ts +0 -1
- package/esm/modern/util/upgrade.d.ts +0 -39
- package/esm/modern/util/versionCompare.d.ts +0 -15
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 在window对象上记录商户初始化SDK的StartTime,加载结束时间
|
|
3
|
-
* 后续传递给Web应用,用于进行端到端渲染总耗时计算
|
|
4
|
-
* ***/
|
|
5
|
-
import { ProductSceneEnum } from "../../types";
|
|
6
|
-
import { EConstructorName } from '../constant';
|
|
7
|
-
type TimeObject = {
|
|
8
|
-
startTime: number;
|
|
9
|
-
endTime: number;
|
|
10
|
-
};
|
|
11
|
-
/*** 扩展 Window 接口,添加 _ANTOM_SDK_PROXY_TIME 属性*/
|
|
12
|
-
declare global {
|
|
13
|
-
interface Window {
|
|
14
|
-
_ANTOM_SDK_PROXY_TIME?: Partial<Record<EConstructorName, TimeObject>>;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
export declare function setProxyStartTime(constructorName: EConstructorName, startTime: number): number;
|
|
18
|
-
export declare function setProxyEndTime(constructorName: EConstructorName, endTime: number): number;
|
|
19
|
-
export declare const getProxyCostTime: (productScene: ProductSceneEnum) => number;
|
|
20
|
-
export {};
|
package/esm/modern/main.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { AddressComponent } from './core/component/address';
|
|
2
|
-
import { ElementComponent } from './core/component/element';
|
|
3
|
-
import { AMSComponent } from './core/component/index';
|
|
4
|
-
import { ComponentSignEnum, IcreateComponent, IElementOptions, IoptionsAddressParams, IoptionsParams, IPreloadOptions, ValidationResult } from './types';
|
|
5
|
-
export { AMSCheckoutPage } from './core/component/ckp';
|
|
6
|
-
export * from './types';
|
|
7
|
-
export declare class AMSCheckout extends AMSComponent {
|
|
8
|
-
constructor(_options: IoptionsParams, channelType?: ComponentSignEnum[], productSceneVersion?: string);
|
|
9
|
-
}
|
|
10
|
-
export declare class AMSAutoDebitPay extends AMSCheckout {
|
|
11
|
-
constructor(options: IoptionsParams);
|
|
12
|
-
static preload(options?: IPreloadOptions): void;
|
|
13
|
-
}
|
|
14
|
-
export declare class AMSCashierPayment extends AMSCheckout {
|
|
15
|
-
constructor(options: IoptionsParams);
|
|
16
|
-
static preload(options?: IPreloadOptions): void;
|
|
17
|
-
/**
|
|
18
|
-
* Form validation function
|
|
19
|
-
* If the form is currently displayed:
|
|
20
|
-
* - Successful validation: isValid is true
|
|
21
|
-
* - Failed validation: isValid is false, and error messages are displayed on the form page
|
|
22
|
-
* If not on the form display page, isValid returns false
|
|
23
|
-
* @returns {Promise<ValidationResult>} Returns a Promise containing the validation result
|
|
24
|
-
*/
|
|
25
|
-
validateFields(): Promise<ValidationResult>;
|
|
26
|
-
}
|
|
27
|
-
export declare class AMSVaulting extends AMSCheckout {
|
|
28
|
-
constructor(options: IoptionsParams);
|
|
29
|
-
static preload(options?: IPreloadOptions): void;
|
|
30
|
-
}
|
|
31
|
-
export declare class AntomElement extends AMSCheckout {
|
|
32
|
-
constructor(options: IoptionsParams);
|
|
33
|
-
}
|
|
34
|
-
export declare class AddressElement extends AddressComponent {
|
|
35
|
-
constructor(options: IoptionsAddressParams);
|
|
36
|
-
}
|
|
37
|
-
export declare class AMSElement extends ElementComponent {
|
|
38
|
-
constructor(options: IElementOptions);
|
|
39
|
-
}
|
|
40
|
-
export declare class AMSEasyPay {
|
|
41
|
-
private core;
|
|
42
|
-
constructor(options: IoptionsParams);
|
|
43
|
-
static preload(options?: IPreloadOptions): void;
|
|
44
|
-
createComponent(params: IcreateComponent): void;
|
|
45
|
-
unmount(): void;
|
|
46
|
-
}
|
|
47
|
-
export declare class AMSAutoDebit {
|
|
48
|
-
private core;
|
|
49
|
-
constructor(options: IoptionsParams);
|
|
50
|
-
createComponent(params: IcreateComponent): Promise<void>;
|
|
51
|
-
unmount(): void;
|
|
52
|
-
static preload(options?: IPreloadOptions): void;
|
|
53
|
-
}
|
|
54
|
-
export default AMSCheckout;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type PreloadManifest, type PreloadPlan, type ResourceRule } from '@antintl/opensdk-preload';
|
|
2
|
-
import { type AntomPreloadElement } from './config';
|
|
3
|
-
interface ResolveAntomPreloadPlanOptions {
|
|
4
|
-
elements: readonly AntomPreloadElement[];
|
|
5
|
-
manifestOrigin: string;
|
|
6
|
-
resourceRules: readonly ResourceRule[];
|
|
7
|
-
requireHttps: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare function resolveAntomPreloadPlan(options: ResolveAntomPreloadPlanOptions): Promise<PreloadPlan>;
|
|
10
|
-
export declare function adaptAntomManifest(manifest: PreloadManifest, elements: readonly AntomPreloadElement[], options: Pick<ResolveAntomPreloadPlanOptions, 'resourceRules' | 'requireHttps'>): PreloadPlan;
|
|
11
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ResourceRule } from '@antintl/opensdk-preload/types';
|
|
2
|
-
export declare const ANTOM_PRELOAD_MANIFEST = "/elements2/manifest.json";
|
|
3
|
-
export declare const ANTOM_PRELOAD_ELEMENTS: readonly ["payment", "express", "vaulting", "CVV"];
|
|
4
|
-
export type AntomPreloadElement = typeof ANTOM_PRELOAD_ELEMENTS[number];
|
|
5
|
-
export declare function getAntomPreloadRuntimeConfig(): {
|
|
6
|
-
manifestOrigin: string;
|
|
7
|
-
runnerUrl: string;
|
|
8
|
-
resourceRules: ResourceRule[];
|
|
9
|
-
requireHttps: boolean;
|
|
10
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
declare const PRECONNECTION_REGIONS: readonly ["SG", "US", "DE"];
|
|
2
|
-
export type PreconnectionRegion = (typeof PRECONNECTION_REGIONS)[number];
|
|
3
|
-
export type GatewayPreconnectionStatus = 'running' | 'completed' | 'partial_failed' | 'failed';
|
|
4
|
-
type RegionResult = {
|
|
5
|
-
status: 'completed' | 'failed';
|
|
6
|
-
endTime: number;
|
|
7
|
-
};
|
|
8
|
-
export interface GatewayPreconnectionSnapshot {
|
|
9
|
-
mode: 'configured' | 'regional';
|
|
10
|
-
preconnectedRegions: readonly PreconnectionRegion[];
|
|
11
|
-
failedRegions: PreconnectionRegion[];
|
|
12
|
-
regionResults: Partial<Record<PreconnectionRegion, RegionResult>>;
|
|
13
|
-
gatewayUrl?: string;
|
|
14
|
-
actualRegion?: string;
|
|
15
|
-
predictionResult?: 'hit' | 'miss';
|
|
16
|
-
status: GatewayPreconnectionStatus;
|
|
17
|
-
preconnectionStartTime: number;
|
|
18
|
-
preconnectionEndTime?: number;
|
|
19
|
-
firstRpcStartTime?: number;
|
|
20
|
-
firstRpcEndTime?: number;
|
|
21
|
-
firstRpcTotalMs?: number;
|
|
22
|
-
preconnectionLeadTimeMs?: number;
|
|
23
|
-
preconnectionReadyBeforeFirstRpc?: boolean;
|
|
24
|
-
dnsDurationMs?: number;
|
|
25
|
-
tcpDurationMs?: number;
|
|
26
|
-
tlsDurationMs?: number;
|
|
27
|
-
}
|
|
28
|
-
export declare function startGatewayPreconnection(env: 'sandbox' | 'prod'): Promise<GatewayPreconnectionSnapshot>;
|
|
29
|
-
export declare function recordActualRegion(region: string, env?: 'sandbox' | 'prod'): GatewayPreconnectionSnapshot | undefined;
|
|
30
|
-
export declare function recordFirstRpcStart(env?: 'sandbox' | 'prod'): GatewayPreconnectionSnapshot | undefined;
|
|
31
|
-
export declare function recordFirstRpcEnd(env?: 'sandbox' | 'prod'): GatewayPreconnectionSnapshot | undefined;
|
|
32
|
-
export declare function getGatewayPreconnectionSnapshot(env?: 'sandbox' | 'prod'): {
|
|
33
|
-
mode: "configured" | "regional";
|
|
34
|
-
preconnectedRegions: readonly PreconnectionRegion[];
|
|
35
|
-
failedRegions: PreconnectionRegion[];
|
|
36
|
-
regionResults: Partial<Record<PreconnectionRegion, RegionResult>>;
|
|
37
|
-
gatewayUrl?: string;
|
|
38
|
-
actualRegion?: string;
|
|
39
|
-
predictionResult?: "hit" | "miss";
|
|
40
|
-
status: GatewayPreconnectionStatus;
|
|
41
|
-
preconnectionStartTime: number;
|
|
42
|
-
preconnectionEndTime?: number;
|
|
43
|
-
firstRpcStartTime?: number;
|
|
44
|
-
firstRpcEndTime?: number;
|
|
45
|
-
firstRpcTotalMs?: number;
|
|
46
|
-
preconnectionLeadTimeMs?: number;
|
|
47
|
-
preconnectionReadyBeforeFirstRpc?: boolean;
|
|
48
|
-
dnsDurationMs?: number;
|
|
49
|
-
tcpDurationMs?: number;
|
|
50
|
-
tlsDurationMs?: number;
|
|
51
|
-
};
|
|
52
|
-
export declare function waitForGatewayPreconnection(env?: 'sandbox' | 'prod'): Promise<GatewayPreconnectionSnapshot>;
|
|
53
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { AntomPreloadElement } from './config';
|
|
2
|
-
export declare function preloadAntomElements(elements: readonly AntomPreloadElement[]): Promise<void>;
|
|
3
|
-
export declare function getAntomPreloadTelemetry(element: AntomPreloadElement): {
|
|
4
|
-
requested: boolean;
|
|
5
|
-
phaseAtElementCreate: "running" | "failed" | "resolving" | "critical_completed" | "skipped" | "not_requested";
|
|
6
|
-
leadTimeMs: number;
|
|
7
|
-
criticalDurationMs: number;
|
|
8
|
-
taskId: string;
|
|
9
|
-
};
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
interface Window {
|
|
3
|
-
ApplePaySession?: any;
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
export interface ApplePayHostPaymentRequest {
|
|
7
|
-
countryCode: string;
|
|
8
|
-
currencyCode: string;
|
|
9
|
-
merchantCapabilities: string[];
|
|
10
|
-
supportedNetworks: string[];
|
|
11
|
-
requiredBillingContactFields?: string[];
|
|
12
|
-
requiredShippingContactFields?: string[];
|
|
13
|
-
total: {
|
|
14
|
-
type: string;
|
|
15
|
-
label: string;
|
|
16
|
-
amount: string;
|
|
17
|
-
};
|
|
18
|
-
version: number;
|
|
19
|
-
lineItems?: any[];
|
|
20
|
-
recurringPaymentRequest?: any;
|
|
21
|
-
}
|
|
22
|
-
export interface ApplePayHostAuthorizedEvent {
|
|
23
|
-
token: any;
|
|
24
|
-
billingContact?: any;
|
|
25
|
-
shippingContact?: any;
|
|
26
|
-
}
|
|
27
|
-
export interface ApplePayHostAuthorizedResult {
|
|
28
|
-
/** true = ApplePaySession.completePayment(STATUS_SUCCESS),false = STATUS_FAILURE */
|
|
29
|
-
success: boolean;
|
|
30
|
-
/** 业务返回(由调用方在外部使用) */
|
|
31
|
-
result?: any;
|
|
32
|
-
/** 失败时的错误码 / 提示(由调用方决定如何上抛) */
|
|
33
|
-
errorCode?: string;
|
|
34
|
-
errorMessage?: string;
|
|
35
|
-
}
|
|
36
|
-
export interface ApplePayHostServiceCallbacks {
|
|
37
|
-
/**
|
|
38
|
-
* 商户验证:onvalidatemerchant 触发,调用商户验证 API,返回 merchantSession 对象(
|
|
39
|
-
* 已 parse 的 object;若调用方拿到的是 JSON string,自行 parse 后再 resolve)
|
|
40
|
-
* reject 时 ApplePayHostService 会 session.abort() 并 reject startPay Promise
|
|
41
|
-
*/
|
|
42
|
-
validateMerchant: (validationURL: string) => Promise<any>;
|
|
43
|
-
/**
|
|
44
|
-
* 用户授权完成:拿到 token + billing/shipping 后调商户的提交逻辑,返回结果
|
|
45
|
-
* 成功 → ApplePayHostService 调 completePayment(STATUS_SUCCESS) 并 resolve startPay Promise
|
|
46
|
-
* 失败 → ApplePayHostService 调 completePayment(STATUS_FAILURE) 并 reject startPay Promise
|
|
47
|
-
* 抛异常 → 视同失败
|
|
48
|
-
*/
|
|
49
|
-
onAuthorized: (event: ApplePayHostAuthorizedEvent) => Promise<ApplePayHostAuthorizedResult>;
|
|
50
|
-
}
|
|
51
|
-
export interface ApplePayHostServiceOptions {
|
|
52
|
-
/** Apple Pay sheet 请求参数;字段校验在 startPay 入口做 */
|
|
53
|
-
paymentRequest: ApplePayHostPaymentRequest;
|
|
54
|
-
/** Callbacks 集合 */
|
|
55
|
-
callbacks: ApplePayHostServiceCallbacks;
|
|
56
|
-
/**
|
|
57
|
-
* 是否开启 modal close shadow DOM listener(国内非标方案监听 .modal-close-button 点击)
|
|
58
|
-
* 普通 elements2 路径开启;Express 路径默认不开启(原 _handleApplePayAtHost 没用)
|
|
59
|
-
*/
|
|
60
|
-
enableModalCloseListener?: boolean;
|
|
61
|
-
}
|
|
62
|
-
export declare class ApplePayHostService {
|
|
63
|
-
private opts;
|
|
64
|
-
private session;
|
|
65
|
-
private settled;
|
|
66
|
-
/** session 生命周期阶段 */
|
|
67
|
-
private phase;
|
|
68
|
-
/**
|
|
69
|
-
* oncancel 原因标记:区分商户通过 onBeforeConfirm 中止 vs 其他。
|
|
70
|
-
* - null: 默认(非商户中止,即用户取消或其他原因)
|
|
71
|
-
* - 'MERCHANT_ABORT': 商户 onBeforeConfirm 返回 false 或异常导致中止
|
|
72
|
-
* - 'MERCHANT_TIMEOUT': 商户 onBeforeConfirm 超时导致中止
|
|
73
|
-
*/
|
|
74
|
-
private cancelReason;
|
|
75
|
-
private modalCloseHandler;
|
|
76
|
-
/**
|
|
77
|
-
* 实例级并发守卫:startPay 进行中时,再次调用复用同一个 Promise 而非新建,
|
|
78
|
-
* 避免覆盖共享 session/settled 导致 Promise 永久 pending。null 表示当前无进行中流程。
|
|
79
|
-
*/
|
|
80
|
-
private _activePay;
|
|
81
|
-
constructor(opts: ApplePayHostServiceOptions);
|
|
82
|
-
/**
|
|
83
|
-
* 启动 Apple Pay 流程。Promise 完成时机:
|
|
84
|
-
* - resolve():onAuthorized 返回 success=true,completePayment(SUCCESS) 已调
|
|
85
|
-
* - reject(err):onAuthorized 返回 success=false / 抛异常 / SDK 加载失败 / new session 失败 /
|
|
86
|
-
* oncancel / validateMerchant 失败
|
|
87
|
-
*/
|
|
88
|
-
startPay(): Promise<void>;
|
|
89
|
-
private _startPayInternal;
|
|
90
|
-
/**
|
|
91
|
-
* 构造 ApplePaySession 入参:从 paymentRequest 取字段,recurringPaymentRequest 若有则带上。
|
|
92
|
-
*/
|
|
93
|
-
private buildSessionParams;
|
|
94
|
-
private safeAbort;
|
|
95
|
-
private safeComplete;
|
|
96
|
-
/**
|
|
97
|
-
* 监听 apple-pay-modal 的 close button(shadow DOM,国内非标方案)。
|
|
98
|
-
* 来源:原 ApplePaySdk.addEventListener(plugin/component/channel.ts:528-542)。
|
|
99
|
-
*/
|
|
100
|
-
private attachModalCloseListener;
|
|
101
|
-
private clearModalCloseListener;
|
|
102
|
-
}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { type RequestOptions } from '@antintl/antom-toolset';
|
|
2
|
-
import { type FontSource } from '@antintl/opensdk-bridge';
|
|
3
|
-
import { type BaseElementAppConfig, type BaseElementConfig, BaseMainElement } from '@antintl/opensdk-core';
|
|
4
|
-
import type { CashierSdkActionQueryResult, PaymentSessionConfig } from '../oneapi/iexpfront/definitions';
|
|
5
|
-
import { type AntomBridgeEventMap, type AntomTheme, type AntomVariables, type AppearanceVariables, type PreloadTelemetryContext } from '../types';
|
|
6
|
-
import { type AppearanceRuleSelector, type PickAntomAppearance } from './appearanceRules';
|
|
7
|
-
export type CVVAppearanceProps = {
|
|
8
|
-
theme: AntomTheme;
|
|
9
|
-
variables: AppearanceVariables | AntomVariables;
|
|
10
|
-
fonts?: FontSource[];
|
|
11
|
-
rules: AppearanceRuleSelector<string>;
|
|
12
|
-
};
|
|
13
|
-
export type CVVAppearance = PickAntomAppearance<CVVAppearanceProps>;
|
|
14
|
-
/**
|
|
15
|
-
* @public
|
|
16
|
-
* @description CVV element app config type
|
|
17
|
-
*/
|
|
18
|
-
export interface CVVAppConfig extends BaseElementAppConfig {
|
|
19
|
-
/** CVV appearance configuration including optional alias-only Rules. */
|
|
20
|
-
appearance?: CVVAppearance;
|
|
21
|
-
/**
|
|
22
|
-
* @description 创建时必填的支付会话;不可通过 updateConfig 或 submit 替换
|
|
23
|
-
*/
|
|
24
|
-
sessionData: string;
|
|
25
|
-
/**
|
|
26
|
-
* @internal sessionConfig 渲染数据,内部使用,无需用户传递
|
|
27
|
-
*/
|
|
28
|
-
paymentSessionConfig?: PaymentSessionConfig;
|
|
29
|
-
/**
|
|
30
|
-
* @internal 渲染数据,内部使用,无需用户传递
|
|
31
|
-
*/
|
|
32
|
-
renderData?: CashierSdkActionQueryResult;
|
|
33
|
-
/**
|
|
34
|
-
* @internal sdk 版本号,内部使用,无需用户传递
|
|
35
|
-
*/
|
|
36
|
-
sdkVersion?: string;
|
|
37
|
-
/**
|
|
38
|
-
* @internal 内部联调使用,生产环境传递无效
|
|
39
|
-
*/
|
|
40
|
-
_requestConfig?: Partial<Omit<RequestOptions, 'scope' | 'tracker'>>;
|
|
41
|
-
/** @internal Elements2 preload grouping data. */
|
|
42
|
-
preloadTelemetryContext?: PreloadTelemetryContext;
|
|
43
|
-
/**
|
|
44
|
-
* @description 语言配置
|
|
45
|
-
*/
|
|
46
|
-
locale?: string;
|
|
47
|
-
/**
|
|
48
|
-
* 支付流程类型
|
|
49
|
-
* - 'automatic':无 UI,页面挂载后自动提交(无UI支付)
|
|
50
|
-
* - 'cvv':有 UI,展示 CVV 输入框,由用户手动输入后提交
|
|
51
|
-
* @internal paymentFlow 内部使用,无需用户传递
|
|
52
|
-
*/
|
|
53
|
-
paymentFlow?: 'automatic' | 'cvv';
|
|
54
|
-
}
|
|
55
|
-
export type CVVSubmitErrorCodes = 'NOT_FIND_MAINELEMENT' | 'SESSION_DATA_INVALID' | 'SDK_LAUNCH_PAYMENT_APP_ERROR' | string;
|
|
56
|
-
/**
|
|
57
|
-
* @description CVV 支付错误结果
|
|
58
|
-
*/
|
|
59
|
-
export interface CVVSubmitError {
|
|
60
|
-
/**
|
|
61
|
-
* 是否成功
|
|
62
|
-
*/
|
|
63
|
-
success: false;
|
|
64
|
-
/**
|
|
65
|
-
* 错误信息
|
|
66
|
-
*/
|
|
67
|
-
error: {
|
|
68
|
-
/**
|
|
69
|
-
* 错误码
|
|
70
|
-
*/
|
|
71
|
-
code: string;
|
|
72
|
-
/**
|
|
73
|
-
* 错误信息
|
|
74
|
-
*/
|
|
75
|
-
message: string;
|
|
76
|
-
/**
|
|
77
|
-
* 错误类型
|
|
78
|
-
*/
|
|
79
|
-
type?: string;
|
|
80
|
-
/**
|
|
81
|
-
* 错误详情
|
|
82
|
-
*/
|
|
83
|
-
detail?: any;
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* @description CVV 支付提交参数
|
|
88
|
-
*/
|
|
89
|
-
export interface CVVSubmitParams {
|
|
90
|
-
/**
|
|
91
|
-
* 重定向策略
|
|
92
|
-
*/
|
|
93
|
-
redirect?: 'always' | 'if_required';
|
|
94
|
-
/**
|
|
95
|
-
* 集成用户自定义信息(如 cardHolderName)
|
|
96
|
-
*/
|
|
97
|
-
params?: Record<string, unknown>;
|
|
98
|
-
}
|
|
99
|
-
export interface CVVElementEvents extends AntomBridgeEventMap<CVVAppConfig, CVVSubmitParams & Pick<CVVAppConfig, 'sessionData'>> {
|
|
100
|
-
/**
|
|
101
|
-
* @description Emitted when the element is destroy
|
|
102
|
-
*/
|
|
103
|
-
destroy: void;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* @public
|
|
107
|
-
* @description CVV element config type
|
|
108
|
-
*/
|
|
109
|
-
export interface CVVElementConfig extends BaseElementConfig<CVVAppConfig> {
|
|
110
|
-
appConfig: CVVAppConfig;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* @description CVV element
|
|
114
|
-
*/
|
|
115
|
-
export declare class CVVElement extends BaseMainElement<CVVElementConfig, CVVElementEvents> {
|
|
116
|
-
static elementType: string;
|
|
117
|
-
private readonly sessionData;
|
|
118
|
-
private readonly elementTracker;
|
|
119
|
-
private _mountInProgress;
|
|
120
|
-
private _destroyInProgress;
|
|
121
|
-
constructor(name: string, config: CVVElementConfig);
|
|
122
|
-
/**
|
|
123
|
-
* @internal
|
|
124
|
-
*/
|
|
125
|
-
setup(): Promise<Partial<CVVAppConfig> | undefined>;
|
|
126
|
-
/**
|
|
127
|
-
* @internal Not supported by the public CVV integration API.
|
|
128
|
-
* Updates appearance only, preserving the Rules clear semantics.
|
|
129
|
-
* @param newConfig Appearance configuration patch.
|
|
130
|
-
* @returns The WebApp update acknowledgement.
|
|
131
|
-
*/
|
|
132
|
-
updateConfig(newConfig: Pick<CVVAppConfig, 'appearance'>): Promise<CVVElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
|
|
133
|
-
/**
|
|
134
|
-
* @internal
|
|
135
|
-
*/
|
|
136
|
-
submit(data?: CVVSubmitParams): Promise<import("../types").SubmitResult>;
|
|
137
|
-
mount(container: HTMLElement): Promise<void>;
|
|
138
|
-
on<T extends keyof CVVElementEvents>(event: T, handler: (payload: CVVElementEvents[T]) => void): void;
|
|
139
|
-
unmount(): void;
|
|
140
|
-
destroy(): void;
|
|
141
|
-
protected focus(): void;
|
|
142
|
-
protected blur(): void;
|
|
143
|
-
protected clear(): void;
|
|
144
|
-
}
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import { type RequestOptions } from '@antintl/antom-toolset';
|
|
2
|
-
import { type BaseElementAppConfig, type BaseElementConfig, BaseMainElement, type ErrorPayload } from '@antintl/opensdk-core';
|
|
3
|
-
import type { CashierSdkActionQueryResult, OneAccountQueryResult, PaymentSessionConfig } from '../oneapi/iexpfront/definitions';
|
|
4
|
-
import { type IPaymentSessionMetaData } from '../tools/getMetaData';
|
|
5
|
-
import { type GetApplePayTokenReply, type GetApplePayTokenRequest } from '../tools/paymentElement/applePayHostToken';
|
|
6
|
-
import { type GetGooglePayTokenReply, type GetGooglePayTokenRequest } from '../tools/paymentElement/googlePayHostToken';
|
|
7
|
-
import { type AntomBridgeWithNativeEventMap, type AntomLayouts, type AntomTheme, type AntomVariables, type AppearanceVariables, type SubmitParams, type SubmitResult } from '../types';
|
|
8
|
-
import { type AppearanceRuleSelector, type PickAntomAppearance } from './appearanceRules';
|
|
9
|
-
/**
|
|
10
|
-
* @description Payment element appearance properties
|
|
11
|
-
*/
|
|
12
|
-
export type PaymentAppearanceProps = {
|
|
13
|
-
displaySetting: 'showPaymentMethodListWhenSingleOption' | 'showCardBrandIcon' | 'showRadioWhenAccordionLayout' | 'showCardCVV';
|
|
14
|
-
theme: AntomTheme;
|
|
15
|
-
variables: AppearanceVariables | AntomVariables;
|
|
16
|
-
layout: AntomLayouts;
|
|
17
|
-
rules: AppearanceRuleSelector<string>;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* @description Payment element appearance type
|
|
21
|
-
*/
|
|
22
|
-
export type PaymentAppearance = PickAntomAppearance<PaymentAppearanceProps>;
|
|
23
|
-
/**
|
|
24
|
-
* @description Payment element app config type
|
|
25
|
-
*/
|
|
26
|
-
export interface PaymentAppConfig extends BaseElementAppConfig {
|
|
27
|
-
/** Payment appearance configuration including optional alias-only Rules. */
|
|
28
|
-
appearance?: PaymentAppearance;
|
|
29
|
-
/**
|
|
30
|
-
* @description sessionData,无法通过updateConfig更新
|
|
31
|
-
*/
|
|
32
|
-
sessionData?: string;
|
|
33
|
-
/**
|
|
34
|
-
* @internal sdk所在hostname
|
|
35
|
-
*/
|
|
36
|
-
merchantDomain?: string;
|
|
37
|
-
doMain?: string;
|
|
38
|
-
/**
|
|
39
|
-
* @internal 渲染数据
|
|
40
|
-
*/
|
|
41
|
-
renderData?: CashierSdkActionQueryResult;
|
|
42
|
-
/**
|
|
43
|
-
* @internal connect时有这个数据
|
|
44
|
-
*/
|
|
45
|
-
connectAccount?: OneAccountQueryResult;
|
|
46
|
-
/**
|
|
47
|
-
* @internal sessionData解析后的数据
|
|
48
|
-
*/
|
|
49
|
-
sessionMetaData?: IPaymentSessionMetaData;
|
|
50
|
-
/**
|
|
51
|
-
* @internal 渲染数据错误信息
|
|
52
|
-
*/
|
|
53
|
-
renderDataError?: ErrorPayload;
|
|
54
|
-
/**
|
|
55
|
-
* @internal sdk 版本号
|
|
56
|
-
*/
|
|
57
|
-
sdkVersion?: string;
|
|
58
|
-
/**
|
|
59
|
-
* @internal 内部联调使用,生产环境传递无效
|
|
60
|
-
*/
|
|
61
|
-
_requestConfig?: Partial<Omit<RequestOptions, 'scope' | 'tracker'>>;
|
|
62
|
-
/**
|
|
63
|
-
* @internal 内部使用,无需用户传递,用于log日志原数据
|
|
64
|
-
*/
|
|
65
|
-
logMetaData?: {
|
|
66
|
-
paymentMethodCategoryType?: PaymentSessionConfig['paymentMethodCategoryType'];
|
|
67
|
-
productSceneVersion?: PaymentSessionConfig['productSceneVersion'];
|
|
68
|
-
trackId: string;
|
|
69
|
-
merchantId?: string;
|
|
70
|
-
paymentMethodType?: string;
|
|
71
|
-
};
|
|
72
|
-
/** @internal Elements2 preload grouping data. */
|
|
73
|
-
preloadTelemetryContext?: import('../types').PreloadTelemetryContext;
|
|
74
|
-
/**
|
|
75
|
-
* @internal 内部使用,无需用户传递,高度信息
|
|
76
|
-
*/
|
|
77
|
-
heightOfVisible?: number;
|
|
78
|
-
/**
|
|
79
|
-
* Amount & Currency
|
|
80
|
-
*
|
|
81
|
-
* Only effective via `updateConfig({ amount })` at runtime.
|
|
82
|
-
*/
|
|
83
|
-
amount?: {
|
|
84
|
-
currency: string;
|
|
85
|
-
value: string;
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
export interface ShippingInfo {
|
|
89
|
-
shippingName: {
|
|
90
|
-
firstName: string;
|
|
91
|
-
lastName: string;
|
|
92
|
-
middleName?: string;
|
|
93
|
-
fullName?: string;
|
|
94
|
-
};
|
|
95
|
-
shippingPhoneNo: string;
|
|
96
|
-
shippingAddress: {
|
|
97
|
-
region: string;
|
|
98
|
-
address1: string;
|
|
99
|
-
address2: string;
|
|
100
|
-
city?: string;
|
|
101
|
-
state?: string;
|
|
102
|
-
zipCode: string;
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* @description The submit params
|
|
107
|
-
*/
|
|
108
|
-
export interface PaymentSubmitParams extends SubmitParams {
|
|
109
|
-
/**
|
|
110
|
-
* @description 是否由antom sdk自动处理唤端逻辑,默认为true,由sdk自动处理。
|
|
111
|
-
* 如果antom sdk唤起客户端失败,建议设置为false,商家自行唤端
|
|
112
|
-
*/
|
|
113
|
-
handleActions?: boolean;
|
|
114
|
-
/**
|
|
115
|
-
* @description 收件地址信息
|
|
116
|
-
*/
|
|
117
|
-
shippingInfo?: ShippingInfo;
|
|
118
|
-
/**
|
|
119
|
-
* @description 集成用户自定义信息(如 cardHolderName)
|
|
120
|
-
*/
|
|
121
|
-
params?: Record<string, unknown>;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* @description Payment element submit result
|
|
125
|
-
*/
|
|
126
|
-
export interface PaymentSubmitResult extends SubmitResult {
|
|
127
|
-
paymentSession?: {
|
|
128
|
-
/**
|
|
129
|
-
* @description 回调页面的url链接,使用浏览器可直接打开,比如 http://xxx.app.com/xxx
|
|
130
|
-
*/
|
|
131
|
-
returnUrl: string;
|
|
132
|
-
/**
|
|
133
|
-
* @description 回调页面唤起app的url链接,使用浏览器可直接打开,比如 http://xxx.app.com/xxx
|
|
134
|
-
*/
|
|
135
|
-
returnAppUrl?: string;
|
|
136
|
-
/**
|
|
137
|
-
* @description 回调页面唤起app的scheme链接,比如 alipay://xxx
|
|
138
|
-
*/
|
|
139
|
-
returnAppScheme?: string;
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* @description Payment element events
|
|
144
|
-
*/
|
|
145
|
-
export interface PaymentElementEvents extends AntomBridgeWithNativeEventMap<PaymentAppConfig, PaymentSubmitParams, PaymentSubmitResult> {
|
|
146
|
-
/**
|
|
147
|
-
* webapp 委托 host(父 frame)拉起 Apple Pay 拿 token。
|
|
148
|
-
* payload 结构对齐 ModernElementController.GetApplePayTokenRequest(放 paymentMethod/shipping)。
|
|
149
|
-
*/
|
|
150
|
-
'OPENSDK@GET_APPLE_PAY_TOKEN': GetApplePayTokenRequest;
|
|
151
|
-
/** host 完成 Apple Pay token 获取后回包给 webapp */
|
|
152
|
-
'OPENSDK@GET_APPLE_PAY_TOKEN_REPLY': GetApplePayTokenReply;
|
|
153
|
-
/**
|
|
154
|
-
* webapp 委托 host(父 frame)拉起 Google Pay 拿 token。
|
|
155
|
-
* payload 结构对齐 ModernElementController.GetGooglePayTokenRequest(放 data.environment/paymentRequest)。
|
|
156
|
-
*/
|
|
157
|
-
'OPENSDK@GET_GOOGLE_PAY_TOKEN': GetGooglePayTokenRequest;
|
|
158
|
-
/** host 完成 Google Pay token 获取后回包给 webapp */
|
|
159
|
-
'OPENSDK@GET_GOOGLE_PAY_TOKEN_REPLY': GetGooglePayTokenReply;
|
|
160
|
-
/** WebApp notifies the host when the selected payment method changes. */
|
|
161
|
-
paymentMethodChanged: {
|
|
162
|
-
type: string;
|
|
163
|
-
name?: string;
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* @description Payment element config type
|
|
168
|
-
*/
|
|
169
|
-
interface PaymentElementConfig extends BaseElementConfig<PaymentAppConfig> {
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* @description Payment element
|
|
173
|
-
*/
|
|
174
|
-
export declare class PaymentElement extends BaseMainElement<PaymentElementConfig, PaymentElementEvents> {
|
|
175
|
-
static elementType: string;
|
|
176
|
-
private _paymentInProgress;
|
|
177
|
-
private readonly paymentTracker;
|
|
178
|
-
private _mountStartedAt;
|
|
179
|
-
private _mountInProgress;
|
|
180
|
-
private _mountPhase;
|
|
181
|
-
private _destroyInProgress;
|
|
182
|
-
private readonly walletLogger;
|
|
183
|
-
constructor(name: string, config: PaymentElementConfig);
|
|
184
|
-
/**
|
|
185
|
-
* @internal
|
|
186
|
-
*/
|
|
187
|
-
setup(): Promise<Partial<PaymentAppConfig> | undefined>;
|
|
188
|
-
mount(container: HTMLElement): Promise<void>;
|
|
189
|
-
/**
|
|
190
|
-
* @description Update payment element configuration with amount validation and appearance Rules support
|
|
191
|
-
*/
|
|
192
|
-
updateConfig(newConfig: Partial<PaymentAppConfig>): Promise<PaymentElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
|
|
193
|
-
/**
|
|
194
|
-
* @internal
|
|
195
|
-
*/
|
|
196
|
-
submit(data?: PaymentSubmitParams): Promise<PaymentSubmitResult>;
|
|
197
|
-
on<T extends keyof PaymentElementEvents>(event: T, handler: (payload: PaymentElementEvents[T]) => void): void;
|
|
198
|
-
unmount(): void;
|
|
199
|
-
destroy(): void;
|
|
200
|
-
protected focus(): void;
|
|
201
|
-
protected blur(): void;
|
|
202
|
-
protected clear(): void;
|
|
203
|
-
}
|
|
204
|
-
export {};
|